production.yaml.example 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. listen:
  2. hostname: 'localhost'
  3. port: 9000
  4. # Correspond to your reverse proxy server_name/listen configuration
  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. 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: -1
  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: true
  165. ###############################################################################
  166. #
  167. # From this point, all the following keys can be overridden by the web interface
  168. # (local-production.json file). If you need to change some values, prefer to
  169. # use the web interface because the configuration will be automatically
  170. # reloaded without any need to restart PeerTube.
  171. #
  172. # /!\ If you already have a local-production.json file, the modification of the
  173. # following keys will have no effect /!\.
  174. #
  175. ###############################################################################
  176. cache:
  177. previews:
  178. size: 500 # Max number of previews you want to cache
  179. captions:
  180. size: 500 # Max number of video captions/subtitles you want to cache
  181. admin:
  182. # Used to generate the root user at first startup
  183. # And to receive emails from the contact form
  184. email: 'admin@example.com'
  185. contact_form:
  186. enabled: true
  187. signup:
  188. enabled: false
  189. limit: 10 # When the limit is reached, registrations are disabled. -1 == unlimited
  190. requires_email_verification: false
  191. filters:
  192. cidr: # You can specify CIDR ranges to whitelist (empty = no filtering) or blacklist
  193. whitelist: []
  194. blacklist: []
  195. user:
  196. # Default value of maximum video BYTES the user can upload (does not take into account transcoded files).
  197. # -1 == unlimited
  198. video_quota: -1
  199. video_quota_daily: -1
  200. # If enabled, the video will be transcoded to mp4 (x264) with "faststart" flag
  201. # In addition, if some resolutions are enabled the mp4 video file will be transcoded to these new resolutions.
  202. # Please, do not disable transcoding since many uploaded videos will not work
  203. transcoding:
  204. enabled: true
  205. # Allow your users to upload .mkv, .mov, .avi, .wmv, .flv, .f4v, .3g2, .3gp, .mts, m2ts, .mxf, .nut videos
  206. allow_additional_extensions: true
  207. # If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
  208. allow_audio_files: true
  209. threads: 1
  210. resolutions: # Only created if the original video has a higher resolution, uses more storage!
  211. 0p: false # audio-only (creates mp4 without video stream, always created when enabled)
  212. 240p: false
  213. 360p: false
  214. 480p: false
  215. 720p: false
  216. 1080p: false
  217. 2160p: false
  218. # Generate videos in a WebTorrent format (what we do since the first PeerTube release)
  219. # If you also enabled the hls format, it will multiply videos storage by 2
  220. # If disabled, breaks federation with PeerTube instances < 2.1
  221. webtorrent:
  222. enabled: true
  223. # /!\ Requires ffmpeg >= 4.1
  224. # Generate HLS playlists and fragmented MP4 files. Better playback than with WebTorrent:
  225. # * Resolution change is smoother
  226. # * Faster playback in particular with long videos
  227. # * More stable playback (less bugs/infinite loading)
  228. # If you also enabled the webtorrent format, it will multiply videos storage by 2
  229. hls:
  230. enabled: false
  231. import:
  232. # Add ability for your users to import remote videos (from YouTube, torrent...)
  233. videos:
  234. http: # Classic HTTP or all sites supported by youtube-dl https://rg3.github.io/youtube-dl/supportedsites.html
  235. enabled: false
  236. # You can use an HTTP/HTTPS/SOCKS proxy with youtube-dl
  237. proxy:
  238. enabled: false
  239. url: ""
  240. torrent: # Magnet URI or torrent file (use classic TCP/UDP/WebSeed to download the file)
  241. enabled: false
  242. auto_blacklist:
  243. # New videos automatically blacklisted so moderators can review before publishing
  244. videos:
  245. of_users:
  246. enabled: false
  247. # Instance settings
  248. instance:
  249. name: 'PeerTube'
  250. short_description: 'PeerTube, a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.'
  251. description: 'Welcome to this PeerTube instance!' # Support markdown
  252. terms: 'No terms for now.' # Support markdown
  253. code_of_conduct: '' # Supports markdown
  254. # Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc
  255. moderation_information: '' # Supports markdown
  256. # Why did you create this instance?
  257. creation_reason: ''
  258. # Who is behind the instance? A single person? A non profit?
  259. administrator: ''
  260. # How long do you plan to maintain this instance?
  261. maintenance_lifetime: ''
  262. # How will you pay the PeerTube instance server? With your own funds? With users donations? Advertising?
  263. business_model: ''
  264. # If you want to explain on what type of hardware your PeerTube instance runs
  265. # Example: "2 vCore, 2GB RAM..."
  266. hardware_information: '' # Supports Markdown
  267. # What are the main languages of your instance? To interact with your users for example
  268. # Uncomment or add the languages you want
  269. # List of supported languages: https://peertube.cpy.re/api/v1/videos/languages
  270. languages:
  271. # - en
  272. # - es
  273. # - fr
  274. # You can specify the main categories of your instance (dedicated to music, gaming or politics etc)
  275. # Uncomment or add the category ids you want
  276. # List of supported categories: https://peertube.cpy.re/api/v1/videos/categories
  277. categories:
  278. # - 1 # Music
  279. # - 2 # Films
  280. # - 3 # Vehicles
  281. # - 4 # Art
  282. # - 5 # Sports
  283. # - 6 # Travels
  284. # - 7 # Gaming
  285. # - 8 # People
  286. # - 9 # Comedy
  287. # - 10 # Entertainment
  288. # - 11 # News & Politics
  289. # - 12 # How To
  290. # - 13 # Education
  291. # - 14 # Activism
  292. # - 15 # Science & Technology
  293. # - 16 # Animals
  294. # - 17 # Kids
  295. # - 18 # Food
  296. default_client_route: '/videos/trending'
  297. # Whether or not the instance is dedicated to NSFW content
  298. # Enabling it will allow other administrators to know that you are mainly federating sensitive content
  299. # Moreover, the NSFW checkbox on video upload will be automatically checked by default
  300. is_nsfw: false
  301. # By default, "do_not_list" or "blur" or "display" NSFW videos
  302. # Could be overridden per user with a setting
  303. default_nsfw_policy: 'do_not_list'
  304. customizations:
  305. javascript: '' # Directly your JavaScript code (without <script> tags). Will be eval at runtime
  306. css: '' # Directly your CSS code (without <style> tags). Will be injected at runtime
  307. # Robot.txt rules. To disallow robots to crawl your instance and disallow indexation of your site, add '/' to "Disallow:'
  308. robots: |
  309. User-agent: *
  310. Disallow:
  311. # Security.txt rules. To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string.
  312. securitytxt:
  313. "# 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:"
  314. services:
  315. # Cards configuration to format video in Twitter
  316. twitter:
  317. username: '@Chocobozzz' # Indicates the Twitter account for the website or platform on which the content was published
  318. # If true, a video player will be embedded in the Twitter feed on PeerTube video share
  319. # If false, we use an image link card that will redirect on your PeerTube instance
  320. # Change it to "true", and then test on https://cards-dev.twitter.com/validator to see if you are whitelisted
  321. whitelisted: false
  322. followers:
  323. instance:
  324. # Allow or not other instances to follow yours
  325. enabled: true
  326. # Whether or not an administrator must manually validate a new follower
  327. manual_approval: false
  328. followings:
  329. instance:
  330. # If you want to automatically follow back new instance followers
  331. # If this option is enabled, use the mute feature instead of deleting followings
  332. # /!\ Don't enable this if you don't have a reactive moderation team /!\
  333. auto_follow_back:
  334. enabled: false
  335. # If you want to automatically follow instances of the public index
  336. # If this option is enabled, use the mute feature instead of deleting followings
  337. # /!\ Don't enable this if you don't have a reactive moderation team /!\
  338. auto_follow_index:
  339. enabled: false
  340. # Host your own using https://framagit.org/framasoft/peertube/instances-peertube#peertube-auto-follow
  341. index_url: ''
  342. theme:
  343. default: 'default'
  344. broadcast_message:
  345. enabled: false
  346. message: '' # Support markdown
  347. level: 'info' # 'info' | 'warning' | 'error'
  348. dismissable: false
  349. search:
  350. # Add ability to fetch remote videos/actors by their URI, that may not be federated with your instance
  351. # If enabled, the associated group will be able to "escape" from the instance follows
  352. # That means they will be able to follow channels, watch videos, list videos of non followed instances
  353. remote_uri:
  354. users: true
  355. anonymous: false
  356. # Use a third party index instead of your local index, only for search results
  357. # Useful to discover content outside of your instance
  358. # If you enable search_index, you must enable remote_uri search for users
  359. # If you do not enable remote_uri search for anonymous user, your instance will redirect the user on the origin instance
  360. # instead of loading the video locally
  361. search_index:
  362. enabled: false
  363. # URL of the search index, that should use the same search API and routes
  364. # than PeerTube: https://docs.joinpeertube.org/api-rest-reference.html
  365. # You should deploy your own with https://framagit.org/framasoft/peertube/search-index,
  366. # and can use https://search.joinpeertube.org/ for tests, but keep in mind the latter is an unmoderated search index
  367. url: ''
  368. # You can disable local search, so users only use the search index
  369. disable_local_search: false
  370. # If you did not disable local search, you can decide to use the search index by default
  371. is_default_search: false