1 <form role=
"form" [formGroup]=
"form">
3 <ngb-tabset class=
"root-tabset bootstrap">
5 <ngb-tab i18n-title
title=
"Instance information">
6 <ng-template ngbTabContent
>
8 <ng-container formGroupName=
"instance">
10 <div i18n
class=
"inner-form-title">Instance
</div>
12 <div class=
"form-group">
13 <label i18n
for=
"instanceName">Name
</label>
15 type=
"text" id=
"instanceName"
16 formControlName=
"name" [ngClass]=
"{ 'input-error': formErrors.instance.name }"
18 <div *
ngIf=
"formErrors.instance.name" class=
"form-error">{{ formErrors.instance.name }}
</div>
21 <div class=
"form-group">
22 <label i18n
for=
"instanceShortDescription">Short description
</label>
24 id=
"instanceShortDescription" formControlName=
"shortDescription" class=
"small"
25 [ngClass]=
"{ 'input-error': formErrors['instance.shortDescription'] }"
27 <div *
ngIf=
"formErrors.instance.shortDescription" class=
"form-error">{{ formErrors.instance.shortDescription }}
</div>
30 <div class=
"form-group">
31 <label i18n
for=
"instanceDescription">Description
</label><my-help helpType=
"markdownText"></my-help>
33 id=
"instanceDescription" formControlName=
"description" textareaWidth=
"500px" [previewColumn]=
"true"
34 [classes]=
"{ 'input-error': formErrors['instance.description'] }"
35 ></my-markdown-textarea>
36 <div *
ngIf=
"formErrors.instance.description" class=
"form-error">{{ formErrors.instance.description }}
</div>
39 <div class=
"form-group">
40 <label i18n
for=
"instanceCategories">Main instance categories
</label>
44 inputId=
"instanceCategories" [options]=
"categoryItems" formControlName=
"categories" showToggleAll=
"false"
45 [defaultLabel]=
"getDefaultCategoryLabel()" [selectedItemsLabel]=
"getSelectedCategoryLabel()"
46 emptyFilterMessage=
"No results found" i18n-emptyFilterMessage
51 <div class=
"form-group">
52 <label i18n
for=
"instanceLanguages">Main languages you/your moderators speak
</label>
56 inputId=
"instanceLanguages" [options]=
"languageItems" formControlName=
"languages" showToggleAll=
"false"
57 [defaultLabel]=
"getDefaultLanguageLabel()" [selectedItemsLabel]=
"getSelectedLanguageLabel()"
58 emptyFilterMessage=
"No results found" i18n-emptyFilterMessage
63 <div i18n
class=
"inner-form-title">Moderation & NSFW
</div>
65 <div class=
"form-group">
66 <my-peertube-checkbox inputName=
"instanceIsNSFW" formControlName=
"isNSFW">
67 <ng-template ptTemplate=
"label">
68 <ng-container i18n
>This instance is dedicated to sensitive or NSFW content
</ng-container>
71 <ng-template ptTemplate=
"help">
73 Enabling it will allow other administrators to know that you are mainly federating sensitive content.
<br /><br />
74 Moreover, the NSFW checkbox on video upload will be automatically checked by default.
77 </my-peertube-checkbox>
80 <div class=
"form-group">
81 <label i18n
for=
"instanceDefaultNSFWPolicy">Policy on videos containing sensitive content
</label>
84 <ng-template ptTemplate=
"customHtml">
86 With
<strong>Do not list
</strong> or
<strong>Blur thumbnails
</strong>, a confirmation will be requested to watch the video.
91 <div class=
"peertube-select-container">
92 <select id=
"instanceDefaultNSFWPolicy" formControlName=
"defaultNSFWPolicy">
93 <option i18n
value=
"do_not_list">Do not list
</option>
94 <option i18n
value=
"blur">Blur thumbnails
</option>
95 <option i18n
value=
"display">Display
</option>
98 <div *
ngIf=
"formErrors.instance.defaultNSFWPolicy" class=
"form-error">{{ formErrors.instance.defaultNSFWPolicy }}
</div>
101 <div class=
"form-group">
102 <label i18n
for=
"instanceTerms">Terms
</label><my-help helpType=
"markdownText"></my-help>
103 <my-markdown-textarea
104 id=
"instanceTerms" formControlName=
"terms" textareaWidth=
"500px" [previewColumn]=
"true"
105 [ngClass]=
"{ 'input-error': formErrors['instance.terms'] }"
106 ></my-markdown-textarea>
107 <div *
ngIf=
"formErrors.instance.terms" class=
"form-error">{{ formErrors.instance.terms }}
</div>
110 <div class=
"form-group">
111 <label i18n
for=
"instanceCodeOfConduct">Code of conduct
</label><my-help helpType=
"markdownText"></my-help>
112 <my-markdown-textarea
113 id=
"instanceCodeOfConduct" formControlName=
"codeOfConduct" textareaWidth=
"500px" [previewColumn]=
"true"
114 [ngClass]=
"{ 'input-error': formErrors['instance.codeOfConduct'] }"
115 ></my-markdown-textarea>
116 <div *
ngIf=
"formErrors.instance.codeOfConduct" class=
"form-error">{{ formErrors.instance.codeOfConduct }}
</div>
119 <div class=
"form-group">
120 <label i18n
for=
"instanceModerationInformation">Moderation information
</label><my-help helpType=
"markdownText"></my-help>
121 <div class=
"label-small-info">Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc
</div>
123 <my-markdown-textarea
124 id=
"instanceModerationInformation" formControlName=
"moderationInformation" textareaWidth=
"500px" [previewColumn]=
"true"
125 [ngClass]=
"{ 'input-error': formErrors['instance.moderationInformation'] }"
126 ></my-markdown-textarea>
127 <div *
ngIf=
"formErrors.instance.moderationInformation" class=
"form-error">{{ formErrors.instance.moderationInformation }}
</div>
130 <div i18n
class=
"inner-form-title">You and your instance
</div>
132 <div class=
"form-group">
133 <label i18n
for=
"instanceAdministrator">Who is behind the instance?
</label>
134 <div class=
"label-small-info">A single person? A non profit? A company?
</div>
136 <my-markdown-textarea
137 id=
"instanceAdministrator" formControlName=
"administrator" textareaWidth=
"500px" textareaHeight=
"75px" [previewColumn]=
"true"
138 [classes]=
"{ 'input-error': formErrors['instance.administrator'] }"
139 ></my-markdown-textarea>
141 <div *
ngIf=
"formErrors.instance.administrator" class=
"form-error">{{ formErrors.instance.administrator }}
</div>
144 <div class=
"form-group">
145 <label i18n
for=
"instanceCreationReason">Why did you create this instance?
</label>
146 <div class=
"label-small-info">To share your personal videos? To open registrations and allow people to upload what they want?
</div>
149 id=
"instanceCreationReason" formControlName=
"creationReason" class=
"small"
150 [ngClass]=
"{ 'input-error': formErrors['instance.creationReason'] }"
152 <div *
ngIf=
"formErrors.instance.creationReason" class=
"form-error">{{ formErrors.instance.creationReason }}
</div>
155 <div class=
"form-group">
156 <label i18n
for=
"instanceMaintenanceLifetime">How long do you plan to maintain this instance?
</label>
157 <div class=
"label-small-info">It's important to know for users who want to register on your instance
</div>
160 id=
"instanceMaintenanceLifetime" formControlName=
"maintenanceLifetime" class=
"small"
161 [ngClass]=
"{ 'input-error': formErrors['instance.maintenanceLifetime'] }"
163 <div *
ngIf=
"formErrors.instance.maintenanceLifetime" class=
"form-error">{{ formErrors.instance.maintenanceLifetime }}
</div>
166 <div class=
"form-group">
167 <label i18n
for=
"instanceBusinessModel">How will you pay the PeerTube instance server?
</label>
168 <div class=
"label-small-info">With you own funds? With users donations? Advertising?
</div>
171 id=
"instanceBusinessModel" formControlName=
"businessModel" class=
"small"
172 [ngClass]=
"{ 'input-error': formErrors['instance.businessModel'] }"
174 <div *
ngIf=
"formErrors.instance.businessModel" class=
"form-error">{{ formErrors.instance.businessModel }}
</div>
181 <ngb-tab i18n-title
title=
"Basic configuration">
182 <ng-template ngbTabContent
>
184 <div i18n
class=
"inner-form-title">Theme & Default route
</div>
186 <ng-container formGroupName=
"theme">
187 <div class=
"form-group">
188 <label i18n
for=
"themeDefault">Global theme
</label>
190 <div class=
"peertube-select-container">
191 <select formControlName=
"default" id=
"themeDefault">
192 <option i18n
value=
"default">default
</option>
194 <option *
ngFor=
"let theme of availableThemes" [value]=
"theme">{{ theme }}
</option>
201 <div class=
"form-group" formGroupName=
"instance">
202 <label i18n
for=
"instanceDefaultClientRoute">Default client route
</label>
203 <div class=
"peertube-select-container">
204 <select id=
"instanceDefaultClientRoute" formControlName=
"defaultClientRoute">
205 <option i18n
value=
"/videos/overview">Videos Discover
</option>
206 <option i18n
value=
"/videos/trending">Videos Trending
</option>
207 <option i18n
value=
"/videos/recently-added">Videos Recently Added
</option>
208 <option i18n
value=
"/videos/local">Local videos
</option>
211 <div *
ngIf=
"formErrors.instance.defaultClientRoute" class=
"form-error">{{ formErrors.instance.defaultClientRoute }}
</div>
214 <div i18n
class=
"inner-form-title">Signup
</div>
216 <ng-container formGroupName=
"signup">
217 <div class=
"form-group">
218 <my-peertube-checkbox
219 inputName=
"signupEnabled" formControlName=
"enabled"
220 i18n-labelText
labelText=
"Signup enabled"
221 ></my-peertube-checkbox>
224 <div class=
"form-group">
225 <my-peertube-checkbox *
ngIf=
"isSignupEnabled()"
226 inputName=
"signupRequiresEmailVerification" formControlName=
"requiresEmailVerification"
227 i18n-labelText
labelText=
"Signup requires email verification"
228 ></my-peertube-checkbox>
231 <div *
ngIf=
"isSignupEnabled()" class=
"form-group">
232 <label i18n
for=
"signupLimit">Signup limit
</label>
234 type=
"text" id=
"signupLimit"
235 formControlName=
"limit" [ngClass]=
"{ 'input-error': formErrors['signup.limit'] }"
237 <div *
ngIf=
"formErrors.signup.limit" class=
"form-error">{{ formErrors.signup.limit }}
</div>
242 <div i18n
class=
"inner-form-title">Users
</div>
244 <ng-container formGroupName=
"user">
245 <div class=
"form-group">
246 <label i18n
for=
"userVideoQuota">User default video quota
</label>
247 <div class=
"peertube-select-container">
248 <select id=
"userVideoQuota" formControlName=
"videoQuota">
249 <option *
ngFor=
"let videoQuotaOption of videoQuotaOptions" [value]=
"videoQuotaOption.value">
250 {{ videoQuotaOption.label }}
254 <div *
ngIf=
"formErrors.user.videoQuota" class=
"form-error">{{ formErrors.user.videoQuota }}
</div>
257 <div class=
"form-group">
258 <label i18n
for=
"userVideoQuotaDaily">User default daily upload limit
</label>
259 <div class=
"peertube-select-container">
260 <select id=
"userVideoQuotaDaily" formControlName=
"videoQuotaDaily">
261 <option *
ngFor=
"let videoQuotaDailyOption of videoQuotaDailyOptions" [value]=
"videoQuotaDailyOption.value">
262 {{ videoQuotaDailyOption.label }}
266 <div *
ngIf=
"formErrors.user.videoQuotaDaily" class=
"form-error">{{ formErrors.user.videoQuotaDaily }}
</div>
271 <div i18n
class=
"inner-form-title">Import
</div>
273 <ng-container formGroupName=
"import">
274 <ng-container formGroupName=
"videos">
276 <div class=
"form-group" formGroupName=
"http">
277 <my-peertube-checkbox
278 inputName=
"importVideosHttpEnabled" formControlName=
"enabled"
279 i18n-labelText
labelText=
"Video import with HTTP URL (i.e. YouTube) enabled"
280 ></my-peertube-checkbox>
283 <div class=
"form-group" formGroupName=
"torrent">
284 <my-peertube-checkbox
285 inputName=
"importVideosTorrentEnabled" formControlName=
"enabled"
286 i18n-labelText
labelText=
"Video import with a torrent file or a magnet URI enabled"
287 ></my-peertube-checkbox>
294 <div i18n
class=
"inner-form-title">Auto-blacklist
</div>
296 <ng-container formGroupName=
"autoBlacklist">
297 <ng-container formGroupName=
"videos">
298 <ng-container formGroupName=
"ofUsers">
300 <div class=
"form-group">
301 <my-peertube-checkbox
302 inputName=
"autoBlacklistVideosOfUsersEnabled" formControlName=
"enabled"
303 i18n-labelText
labelText=
"New videos of users automatically blacklisted enabled"
304 ></my-peertube-checkbox>
312 <div i18n
class=
"inner-form-title">Instance followers
</div>
314 <ng-container formGroupName=
"followers">
315 <ng-container formGroupName=
"instance">
317 <div class=
"form-group">
318 <my-peertube-checkbox
319 inputName=
"followersInstanceEnabled" formControlName=
"enabled"
320 i18n-labelText
labelText=
"Other instances can follow your instance"
321 ></my-peertube-checkbox>
324 <div class=
"form-group">
325 <my-peertube-checkbox
326 inputName=
"followersInstanceManualApproval" formControlName=
"manualApproval"
327 i18n-labelText
labelText=
"Manually approve new instance follower"
328 ></my-peertube-checkbox>
333 <div i18n
class=
"inner-form-title">Instance followings
</div>
335 <ng-container formGroupName=
"followings">
336 <ng-container formGroupName=
"instance">
338 <ng-container formGroupName=
"autoFollowBack">
339 <div class=
"form-group">
340 <my-peertube-checkbox
341 inputName=
"followingsInstanceAutoFollowBackEnabled" formControlName=
"enabled"
342 i18n-labelText
labelText=
"Automatically follow other instances that follow you"
343 ></my-peertube-checkbox>
347 <ng-container formGroupName=
"autoFollowIndex">
348 <div class=
"form-group">
349 <my-peertube-checkbox
350 inputName=
"followingsInstanceAutoFollowIndexEnabled" formControlName=
"enabled"
351 i18n-labelText
labelText=
"Automatically follow instance of the public index (below)"
352 ></my-peertube-checkbox>
355 <div class=
"form-group">
356 <label i18n
for=
"followingsInstanceAutoFollowIndexUrl">Index URL
</label>
358 type=
"text" id=
"followingsInstanceAutoFollowIndexUrl"
359 formControlName=
"indexUrl" [ngClass]=
"{ 'input-error': formErrors['followings.instance.autoFollowIndex.indexUrl'] }"
361 <div *
ngIf=
"formErrors.followings.instance.autoFollowIndex.indexUrl" class=
"form-error">{{ formErrors.followings.instance.autoFollowIndex.indexUrl }}
</div>
369 <div i18n
class=
"inner-form-title">Administrator
</div>
371 <div class=
"form-group" formGroupName=
"admin">
372 <label i18n
for=
"adminEmail">Admin email
</label>
374 type=
"text" id=
"adminEmail"
375 formControlName=
"email" [ngClass]=
"{ 'input-error': formErrors['admin.email'] }"
377 <div *
ngIf=
"formErrors.admin.email" class=
"form-error">{{ formErrors.admin.email }}
</div>
380 <div class=
"form-group" formGroupName=
"contactForm">
381 <my-peertube-checkbox
382 inputName=
"enableContactForm" formControlName=
"enabled"
383 i18n-labelText
labelText=
"Enable contact form"
384 ></my-peertube-checkbox>
390 <ngb-tab i18n-title
title=
"Services">
391 <ng-template ngbTabContent
>
392 <div i18n
class=
"inner-form-title">Twitter
</div>
394 <ng-container formGroupName=
"services">
395 <ng-container formGroupName=
"twitter">
397 <div class=
"form-group">
398 <label i18n
for=
"signupLimit">Your Twitter username
</label>
401 <ng-template ptTemplate=
"customHtml">
402 <ng-container i18n
>Indicates the Twitter account for the website or platform on which the content was published.
</ng-container>
407 type=
"text" id=
"servicesTwitterUsername"
408 formControlName=
"username" [ngClass]=
"{ 'input-error': formErrors['services.twitter.username'] }"
410 <div *
ngIf=
"formErrors.services.twitter.username" class=
"form-error">{{ formErrors.services.twitter.username }}
</div>
413 <div class=
"form-group">
414 <my-peertube-checkbox inputName=
"servicesTwitterWhitelisted" formControlName=
"whitelisted">
415 <ng-template ptTemplate=
"label">
416 <ng-container i18n
>Instance whitelisted by Twitter
</ng-container>
419 <ng-template ptTemplate=
"help">
421 If your instance is whitelisted by Twitter, a video player will be embedded in the Twitter feed on PeerTube video share.
<br />
422 If the instance is not whitelisted, we use an image link card that will redirect on your PeerTube instance.
<br /><br />
423 Check this checkbox, save the configuration and test with a video URL of your instance (https://example.com/videos/watch/blabla) on
424 <a target='_blank' rel='noopener noreferrer' href='https://cards-dev.twitter.com/validator'
>https://cards-dev.twitter.com/validator
</a>
425 to see if you instance is whitelisted.
428 </my-peertube-checkbox>
437 <ngb-tab i18n-title
title=
"Advanced configuration">
438 <ng-template ngbTabContent
>
440 <div i18n
class=
"inner-form-title">Transcoding
</div>
442 <ng-container formGroupName=
"transcoding">
443 <div class=
"form-group">
444 <my-peertube-checkbox inputName=
"transcodingEnabled" formControlName=
"enabled">
445 <ng-template ptTemplate=
"label">
446 <ng-container i18n
>Transcoding enabled
</ng-container>
449 <ng-template ptTemplate=
"help">
450 <ng-container i18n
>If you disable transcoding, many videos from your users will not work!
</ng-container>
452 </my-peertube-checkbox>
455 <ng-container *
ngIf=
"isTranscodingEnabled()">
457 <div class=
"form-group">
458 <my-peertube-checkbox
459 inputName=
"transcodingAllowAdditionalExtensions" formControlName=
"allowAdditionalExtensions"
460 i18n-labelText
labelText=
"Allow additional extensions"
462 <ng-template ptTemplate=
"help">
463 <ng-container i18n
>Allow your users to upload .mkv, .mov, .avi, .flv videos
</ng-container>
465 </my-peertube-checkbox>
468 <div class=
"form-group">
469 <my-peertube-checkbox
470 inputName=
"transcodingAllowAudioFiles" formControlName=
"allowAudioFiles"
471 i18n-labelText
labelText=
"Allow audio files upload"
473 <ng-template ptTemplate=
"help">
474 <ng-container i18n
>Allow your users to upload audio files that will be merged with the preview file on upload
</ng-container>
476 </my-peertube-checkbox>
479 <div class=
"form-group">
480 <label i18n
for=
"transcodingThreads">Transcoding threads
</label>
481 <div class=
"peertube-select-container">
482 <select id=
"transcodingThreads" formControlName=
"threads">
483 <option *
ngFor=
"let transcodingThreadOption of transcodingThreadOptions" [value]=
"transcodingThreadOption.value">
484 {{ transcodingThreadOption.label }}
488 <div *
ngIf=
"formErrors.transcoding.threads" class=
"form-error">{{ formErrors.transcoding.threads }}
</div>
491 <ng-container formGroupName=
"resolutions">
492 <div class=
"form-group" *
ngFor=
"let resolution of resolutions">
493 <my-peertube-checkbox
494 [inputName]=
"getResolutionKey(resolution.id)" [formControlName]=
"resolution.id"
495 i18n-labelText
labelText=
"Resolution {{resolution.label}} enabled"
496 ></my-peertube-checkbox>
503 <div i18n
class=
"inner-form-title">
507 <ng-template ptTemplate=
"customHtml">
508 <ng-container i18n
>Some files are not federated (previews, captions). We fetch them directly from the origin instance and cache them.
</ng-container>
513 <ng-container formGroupName=
"cache">
514 <div class=
"form-group" formGroupName=
"previews">
515 <label i18n
for=
"cachePreviewsSize">Previews cache size
</label>
517 type=
"text" id=
"cachePreviewsSize"
518 formControlName=
"size" [ngClass]=
"{ 'input-error': formErrors['cache.previews.size'] }"
520 <div *
ngIf=
"formErrors.cache.previews.size" class=
"form-error">{{ formErrors.cache.previews.size }}
</div>
523 <div class=
"form-group" formGroupName=
"captions">
524 <label i18n
for=
"cacheCaptionsSize">Video captions cache size
</label>
526 type=
"text" id=
"cacheCaptionsSize"
527 formControlName=
"size" [ngClass]=
"{ 'input-error': formErrors['cache.captions.size'] }"
529 <div *
ngIf=
"formErrors.cache.captions.size" class=
"form-error">{{ formErrors.cache.captions.size }}
</div>
533 <div i18n
class=
"inner-form-title">Customizations
</div>
535 <ng-container formGroupName=
"instance">
536 <ng-container formGroupName=
"customizations">
537 <div class=
"form-group">
538 <label i18n
for=
"customizationJavascript">JavaScript
</label>
540 <ng-template ptTemplate=
"customHtml">
542 Write directly JavaScript code.
<br />Example:
<pre>console.log('my instance is amazing');
</pre>
548 id=
"customizationJavascript" formControlName=
"javascript"
549 [ngClass]=
"{ 'input-error': formErrors['instance.customizations.javascript'] }"
552 <div *
ngIf=
"formErrors.instance.customizations.javascript" class=
"form-error">{{ formErrors.instance.customizations.javascript }}
</div>
555 <div class=
"form-group">
556 <label for=
"customizationCSS">CSS
</label>
559 <ng-template ptTemplate=
"customHtml">
561 Write directly CSS code. Example:
<br /><br />
563 #custom-css {{ '{' }}
568 Prepend with
<em>#custom-css
</em> to override styles. Example:
<br /><br />
570 #custom-css .logged-in-email {{ '{' }}
579 id=
"customizationCSS" formControlName=
"css"
580 [ngClass]=
"{ 'input-error': formErrors['instance.customizations.css'] }"
582 <div *
ngIf=
"formErrors.instance.customizations.css" class=
"form-error">{{ formErrors.instance.customizations.css }}
</div>
591 <input (click)=
"formValidated()" type=
"submit" i18n-value
value=
"Update configuration" [disabled]=
"!form.valid">
592 <span class=
"form-error" i18n *
ngIf=
"!form.valid">It seems the configuration is invalid. Please search potential errors in the different tabs.
</span>