default.yaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. # /!\ YOU SHOULD NOT UPDATE THIS FILE, USE production.yaml instead /!\ #
  2. listen:
  3. hostname: '127.0.0.1'
  4. port: 9000
  5. # Correspond to your reverse proxy server_name/listen configuration (i.e., your public PeerTube instance URL)
  6. webserver:
  7. https: false
  8. hostname: 'localhost'
  9. port: 9000
  10. rates_limit:
  11. api:
  12. # 50 attempts in 10 seconds
  13. window: 10 seconds
  14. max: 100
  15. login:
  16. # 15 attempts in 5 min
  17. window: 5 minutes
  18. max: 15
  19. signup:
  20. # 2 attempts in 5 min (only succeeded attempts are taken into account)
  21. window: 5 minutes
  22. max: 2
  23. ask_send_email:
  24. # 3 attempts in 5 min
  25. window: 5 minutes
  26. max: 3
  27. # Proxies to trust to get real client IP
  28. # If you run PeerTube just behind a local proxy (nginx), keep 'loopback'
  29. # If you run PeerTube behind a remote proxy, add the proxy IP address (or subnet)
  30. trust_proxy:
  31. - 'loopback'
  32. # Your database name will be database.name OR "peertube"+database.suffix
  33. database:
  34. hostname: 'localhost'
  35. port: 5432
  36. ssl: false
  37. suffix: '_dev'
  38. username: 'peertube'
  39. password: 'peertube'
  40. pool:
  41. max: 5
  42. # You can also specify a 'socket' path to a unix socket but first need to
  43. # comment out hostname and port
  44. redis:
  45. hostname: 'localhost'
  46. port: 6379
  47. auth: null
  48. db: 0
  49. smtp:
  50. # smtp or sendmail
  51. transport: smtp
  52. # Path to sendmail command. Required if you use sendmail transport
  53. sendmail: null
  54. hostname: null
  55. port: 465
  56. username: null
  57. password: null
  58. tls: true
  59. disable_starttls: false
  60. ca_file: null # Used for self signed certificates
  61. from_address: 'admin@example.com'
  62. email:
  63. body:
  64. signature: "PeerTube"
  65. subject:
  66. prefix: "[PeerTube]"
  67. # From the project root directory
  68. storage:
  69. tmp: 'storage/tmp/' # Use to download data (imports etc), store uploaded files before processing...
  70. avatars: 'storage/avatars/'
  71. videos: 'storage/videos/'
  72. streaming_playlists: 'storage/streaming-playlists/'
  73. redundancy: 'storage/redundancy/'
  74. logs: 'storage/logs/'
  75. previews: 'storage/previews/'
  76. thumbnails: 'storage/thumbnails/'
  77. torrents: 'storage/torrents/'
  78. captions: 'storage/captions/'
  79. cache: 'storage/cache/'
  80. plugins: 'storage/plugins/'
  81. # Overridable client files : logo.svg, favicon.png and icons/*.png (PWA) in client/dist/assets/images
  82. # Could contain for example assets/images/favicon.png
  83. # If the file exists, peertube will serve it
  84. # If not, peertube will fallback to the default fil
  85. client_overrides: 'storage/client-overrides/'
  86. log:
  87. level: 'info' # debug/info/warning/error
  88. rotation:
  89. enabled : true
  90. maxFileSize: 12MB
  91. maxFiles: 20
  92. anonymizeIP: false
  93. log_ping_requests: true
  94. trending:
  95. videos:
  96. interval_days: 7 # Compute trending videos for the last x days
  97. # Cache remote videos on your server, to help other instances to broadcast the video
  98. # You can define multiple caches using different sizes/strategies
  99. # Once you have defined your strategies, choose which instances you want to cache in admin -> manage follows -> following
  100. redundancy:
  101. videos:
  102. check_interval: '1 hour' # How often you want to check new videos to cache
  103. strategies: # Just uncomment strategies you want
  104. # -
  105. # size: '10GB'
  106. # # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
  107. # min_lifetime: '48 hours'
  108. # strategy: 'most-views' # Cache videos that have the most views
  109. # -
  110. # size: '10GB'
  111. # # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
  112. # min_lifetime: '48 hours'
  113. # strategy: 'trending' # Cache trending videos
  114. # -
  115. # size: '10GB'
  116. # # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
  117. # min_lifetime: '48 hours'
  118. # strategy: 'recently-added' # Cache recently added videos
  119. # min_views: 10 # Having at least x views
  120. # Other instances that duplicate your content
  121. remote_redundancy:
  122. videos:
  123. # 'nobody': Do not accept remote redundancies
  124. # 'anybody': Accept remote redundancies from anybody
  125. # 'followings': Accept redundancies from instance followings
  126. accept_from: 'anybody'
  127. csp:
  128. enabled: false
  129. report_only: true # CSP directives are still being tested, so disable the report only mode at your own risk!
  130. report_uri:
  131. tracker:
  132. # If you disable the tracker, you disable the P2P aspect of PeerTube
  133. enabled: true
  134. # Only handle requests on your videos.
  135. # If you set this to false it means you have a public tracker.
  136. # Then, it is possible that clients overload your instance with external torrents
  137. private: true
  138. # Reject peers that do a lot of announces (could improve privacy of TCP/UDP peers)
  139. reject_too_many_announces: false
  140. history:
  141. videos:
  142. # If you want to limit users videos history
  143. # -1 means there is no limitations
  144. # Other values could be '6 months' or '30 days' etc (PeerTube will periodically delete old entries from database)
  145. max_age: -1
  146. views:
  147. videos:
  148. # PeerTube creates a database entry every hour for each video to track views over a period of time
  149. # This is used in particular by the Trending page
  150. # PeerTube could remove old remote video views if you want to reduce your database size (video view counter will not be altered)
  151. # -1 means no cleanup
  152. # Other values could be '6 months' or '30 days' etc (PeerTube will periodically delete old entries from database)
  153. remote:
  154. max_age: '30 days'
  155. plugins:
  156. # The website PeerTube will ask for available PeerTube plugins and themes
  157. # This is an unmoderated plugin index, so only install plugins/themes you trust
  158. index:
  159. enabled: true
  160. check_latest_versions_interval: '12 hours' # How often you want to check new plugins/themes versions
  161. url: 'https://packages.joinpeertube.org'
  162. federation:
  163. videos:
  164. federate_unlisted: false
  165. cache:
  166. previews:
  167. size: 500 # Max number of previews you want to cache
  168. captions:
  169. size: 500 # Max number of video captions/subtitles you want to cache
  170. admin:
  171. # Used to generate the root user at first startup
  172. # And to receive emails from the contact form
  173. email: 'admin@example.com'
  174. contact_form:
  175. enabled: true
  176. signup:
  177. enabled: false
  178. limit: 10 # When the limit is reached, registrations are disabled. -1 == unlimited
  179. requires_email_verification: false
  180. filters:
  181. cidr: # You can specify CIDR ranges to whitelist (empty = no filtering) or blacklist
  182. whitelist: []
  183. blacklist: []
  184. user:
  185. # Default value of maximum video BYTES the user can upload (does not take into account transcoded files).
  186. # -1 == unlimited
  187. video_quota: -1
  188. video_quota_daily: -1
  189. # If enabled, the video will be transcoded to mp4 (x264) with "faststart" flag
  190. # In addition, if some resolutions are enabled the mp4 video file will be transcoded to these new resolutions.
  191. # Please, do not disable transcoding since many uploaded videos will not work
  192. transcoding:
  193. enabled: true
  194. # Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
  195. allow_additional_extensions: true
  196. # If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
  197. allow_audio_files: true
  198. threads: 1
  199. resolutions: # Only created if the original video has a higher resolution, uses more storage!
  200. 0p: false # audio-only (creates mp4 without video stream, always created when enabled)
  201. 240p: false
  202. 360p: false
  203. 480p: false
  204. 720p: false
  205. 1080p: false
  206. 1440p: false
  207. 2160p: false
  208. # Generate videos in a WebTorrent format (what we do since the first PeerTube release)
  209. # If you also enabled the hls format, it will multiply videos storage by 2
  210. # If disabled, breaks federation with PeerTube instances < 2.1
  211. webtorrent:
  212. enabled: true
  213. # /!\ Requires ffmpeg >= 4.1
  214. # Generate HLS playlists and fragmented MP4 files. Better playback than with WebTorrent:
  215. # * Resolution change is smoother
  216. # * Faster playback in particular with long videos
  217. # * More stable playback (less bugs/infinite loading)
  218. # If you also enabled the webtorrent format, it will multiply videos storage by 2
  219. hls:
  220. enabled: false
  221. live:
  222. enabled: false
  223. # Limit lives duration
  224. # -1 == unlimited
  225. max_duration: -1 # For example: '5 hours'
  226. # Limit max number of live videos created on your instance
  227. # -1 == unlimited
  228. max_instance_lives: 20
  229. # Limit max number of live videos created by a user on your instance
  230. # -1 == unlimited
  231. max_user_lives: 3
  232. # Allow your users to save a replay of their live
  233. # PeerTube will transcode segments in a video file
  234. # If the user daily/total quota is reached, PeerTube will stop the live
  235. # /!\ transcoding.enabled (and not live.transcoding.enabled) has to be true to create a replay
  236. allow_replay: false
  237. # Your firewall should accept traffic from this port in TCP if you enable live
  238. rtmp:
  239. port: 1935
  240. # Allow to transcode the live streaming in multiple live resolutions
  241. transcoding:
  242. enabled: true
  243. threads: 2
  244. resolutions:
  245. 240p: false
  246. 360p: false
  247. 480p: false
  248. 720p: false
  249. 1080p: false
  250. 1440p: false
  251. 2160p: false
  252. import:
  253. # Add ability for your users to import remote videos (from YouTube, torrent...)
  254. videos:
  255. http: # Classic HTTP or all sites supported by youtube-dl https://rg3.github.io/youtube-dl/supportedsites.html
  256. enabled: false
  257. # IPv6 is very strongly rate-limited on most sites supported by youtube-dl
  258. force_ipv4: false
  259. # You can use an HTTP/HTTPS/SOCKS proxy with youtube-dl
  260. proxy:
  261. enabled: false
  262. url: ""
  263. torrent: # Magnet URI or torrent file (use classic TCP/UDP/WebSeed to download the file)
  264. enabled: false
  265. auto_blacklist:
  266. # New videos automatically blacklisted so moderators can review before publishing
  267. videos:
  268. of_users:
  269. enabled: false
  270. instance:
  271. name: 'PeerTube'
  272. short_description: 'PeerTube, an ActivityPub-federated video streaming platform using P2P directly in your web browser.'
  273. description: 'Welcome to this PeerTube instance!' # Support markdown
  274. terms: 'No terms for now.' # Support markdown
  275. code_of_conduct: '' # Supports markdown
  276. # Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc
  277. moderation_information: '' # Supports markdown
  278. # Why did you create this instance?
  279. creation_reason: '' # Supports Markdown
  280. # Who is behind the instance? A single person? A non profit?
  281. administrator: '' # Supports Markdown
  282. # How long do you plan to maintain this instance?
  283. maintenance_lifetime: '' # Supports Markdown
  284. # How will you pay the PeerTube instance server? With your own funds? With users donations? Advertising?
  285. business_model: '' # Supports Markdown
  286. # If you want to explain on what type of hardware your PeerTube instance runs
  287. # Example: "2 vCore, 2GB RAM..."
  288. hardware_information: '' # Supports Markdown
  289. # What are the main languages of your instance? To interact with your users for example
  290. # Uncomment or add the languages you want
  291. # List of supported languages: https://peertube.cpy.re/api/v1/videos/languages
  292. languages:
  293. # - en
  294. # - es
  295. # - fr
  296. # You can specify the main categories of your instance (dedicated to music, gaming or politics etc)
  297. # Uncomment or add the category ids you want
  298. # List of supported categories: https://peertube.cpy.re/api/v1/videos/categories
  299. categories:
  300. # - 1 # Music
  301. # - 2 # Films
  302. # - 3 # Vehicles
  303. # - 4 # Art
  304. # - 5 # Sports
  305. # - 6 # Travels
  306. # - 7 # Gaming
  307. # - 8 # People
  308. # - 9 # Comedy
  309. # - 10 # Entertainment
  310. # - 11 # News & Politics
  311. # - 12 # How To
  312. # - 13 # Education
  313. # - 14 # Activism
  314. # - 15 # Science & Technology
  315. # - 16 # Animals
  316. # - 17 # Kids
  317. # - 18 # Food
  318. default_client_route: '/videos/trending'
  319. # Whether or not the instance is dedicated to NSFW content
  320. # Enabling it will allow other administrators to know that you are mainly federating sensitive content
  321. # Moreover, the NSFW checkbox on video upload will be automatically checked by default
  322. is_nsfw: false
  323. # By default, "do_not_list" or "blur" or "display" NSFW videos
  324. # Could be overridden per user with a setting
  325. default_nsfw_policy: 'do_not_list'
  326. customizations:
  327. javascript: '' # Directly your JavaScript code (without <script> tags). Will be eval at runtime
  328. css: '' # Directly your CSS code (without <style> tags). Will be injected at runtime
  329. # Robot.txt rules. To disallow robots to crawl your instance and disallow indexation of your site, add '/' to "Disallow:'
  330. robots: |
  331. User-agent: *
  332. Disallow:
  333. # Security.txt rules. To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string.
  334. securitytxt:
  335. "# If you would like to report a security issue\n# you may report it to:\nContact: https://github.com/Chocobozzz/PeerTube/blob/develop/SECURITY.md\nContact: mailto:"
  336. services:
  337. # Cards configuration to format video in Twitter
  338. twitter:
  339. username: '@Chocobozzz' # Indicates the Twitter account for the website or platform on which the content was published
  340. # If true, a video player will be embedded in the Twitter feed on PeerTube video share
  341. # If false, we use an image link card that will redirect on your PeerTube instance
  342. # Change it to "true", and then test on https://cards-dev.twitter.com/validator to see if you are whitelisted
  343. whitelisted: false
  344. followers:
  345. instance:
  346. # Allow or not other instances to follow yours
  347. enabled: true
  348. # Whether or not an administrator must manually validate a new follower
  349. manual_approval: false
  350. followings:
  351. instance:
  352. # If you want to automatically follow back new instance followers
  353. # Only follows accepted followers (in case you enabled manual followers approbation)
  354. # If this option is enabled, use the mute feature instead of deleting followings
  355. # /!\ Don't enable this if you don't have a reactive moderation team /!\
  356. auto_follow_back:
  357. enabled: false
  358. # If you want to automatically follow instances of the public index
  359. # If this option is enabled, use the mute feature instead of deleting followings
  360. # /!\ Don't enable this if you don't have a reactive moderation team /!\
  361. auto_follow_index:
  362. enabled: false
  363. # Host your own using https://framagit.org/framasoft/peertube/instances-peertube#peertube-auto-follow
  364. index_url: ''
  365. theme:
  366. default: 'default'
  367. broadcast_message:
  368. enabled: false
  369. message: '' # Support markdown
  370. level: 'info' # 'info' | 'warning' | 'error'
  371. dismissable: false
  372. search:
  373. # Add ability to fetch remote videos/actors by their URI, that may not be federated with your instance
  374. # If enabled, the associated group will be able to "escape" from the instance follows
  375. # That means they will be able to follow channels, watch videos, list videos of non followed instances
  376. remote_uri:
  377. users: true
  378. anonymous: false
  379. # Use a third party index instead of your local index, only for search results
  380. # Useful to discover content outside of your instance
  381. # If you enable search_index, you must enable remote_uri search for users
  382. # If you do not enable remote_uri search for anonymous user, your instance will redirect the user on the origin instance
  383. # instead of loading the video locally
  384. search_index:
  385. enabled: false
  386. # URL of the search index, that should use the same search API and routes
  387. # than PeerTube: https://docs.joinpeertube.org/api-rest-reference.html
  388. # You should deploy your own with https://framagit.org/framasoft/peertube/search-index,
  389. # and can use https://search.joinpeertube.org/ for tests, but keep in mind the latter is an unmoderated search index
  390. url: ''
  391. # You can disable local search, so users only use the search index
  392. disable_local_search: false
  393. # If you did not disable local search, you can decide to use the search index by default
  394. is_default_search: false