production.yaml.example 17 KB

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