production.yaml.example 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  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 "peertube"+database.suffix
  32. database:
  33. hostname: 'localhost'
  34. port: 5432
  35. suffix: '_prod'
  36. username: 'peertube'
  37. password: 'peertube'
  38. pool:
  39. max: 5
  40. # Redis server for short time storage
  41. # You can also specify a 'socket' path to a unix socket but first need to
  42. # comment out hostname and port
  43. redis:
  44. hostname: 'localhost'
  45. port: 6379
  46. auth: null
  47. db: 0
  48. # SMTP server to send emails
  49. smtp:
  50. hostname: null
  51. port: 465 # If you use StartTLS: 587
  52. username: null
  53. password: null
  54. tls: true # If you use StartTLS: false
  55. disable_starttls: false
  56. ca_file: null # Used for self signed certificates
  57. from_address: 'admin@example.com'
  58. email:
  59. body:
  60. signature: "PeerTube"
  61. subject:
  62. prefix: "[PeerTube]"
  63. # From the project root directory
  64. storage:
  65. tmp: '/var/www/peertube/storage/tmp/' # Use to download data (imports etc), store uploaded files before processing...
  66. avatars: '/var/www/peertube/storage/avatars/'
  67. videos: '/var/www/peertube/storage/videos/'
  68. streaming_playlists: '/var/www/peertube/storage/streaming-playlists/'
  69. redundancy: '/var/www/peertube/storage/redundancy/'
  70. logs: '/var/www/peertube/storage/logs/'
  71. previews: '/var/www/peertube/storage/previews/'
  72. thumbnails: '/var/www/peertube/storage/thumbnails/'
  73. torrents: '/var/www/peertube/storage/torrents/'
  74. captions: '/var/www/peertube/storage/captions/'
  75. cache: '/var/www/peertube/storage/cache/'
  76. plugins: '/var/www/peertube/storage/plugins/'
  77. log:
  78. level: 'info' # debug/info/warning/error
  79. rotation:
  80. enabled : true # Enabled by default, if disabled make sure that 'storage.logs' is pointing to a folder handled by logrotate
  81. search:
  82. # Add ability to fetch remote videos/actors by their URI, that may not be federated with your instance
  83. # If enabled, the associated group will be able to "escape" from the instance follows
  84. # That means they will be able to follow channels, watch videos, list videos of non followed instances
  85. remote_uri:
  86. users: true
  87. anonymous: false
  88. trending:
  89. videos:
  90. interval_days: 7 # Compute trending videos for the last x days
  91. # Cache remote videos on your server, to help other instances to broadcast the video
  92. # You can define multiple caches using different sizes/strategies
  93. # Once you have defined your strategies, choose which instances you want to cache in admin -> manage follows -> following
  94. redundancy:
  95. videos:
  96. check_interval: '1 hour' # How often you want to check new videos to cache
  97. strategies: # Just uncomment strategies you want
  98. # -
  99. # size: '10GB'
  100. # # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
  101. # min_lifetime: '48 hours'
  102. # strategy: 'most-views' # Cache videos that have the most views
  103. # -
  104. # size: '10GB'
  105. # # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
  106. # min_lifetime: '48 hours'
  107. # strategy: 'trending' # Cache trending videos
  108. # -
  109. # size: '10GB'
  110. # # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
  111. # min_lifetime: '48 hours'
  112. # strategy: 'recently-added' # Cache recently added videos
  113. # min_views: 10 # Having at least x views
  114. csp:
  115. enabled: false
  116. report_only: true # CSP directives are still being tested, so disable the report only mode at your own risk!
  117. report_uri:
  118. tracker:
  119. # If you disable the tracker, you disable the P2P aspect of PeerTube
  120. enabled: true
  121. # Only handle requests on your videos.
  122. # If you set this to false it means you have a public tracker.
  123. # Then, it is possible that clients overload your instance with external torrents
  124. private: true
  125. # Reject peers that do a lot of announces (could improve privacy of TCP/UDP peers)
  126. reject_too_many_announces: false
  127. history:
  128. videos:
  129. # If you want to limit users videos history
  130. # -1 means there is no limitations
  131. # Other values could be '6 months' or '30 days' etc (PeerTube will periodically delete old entries from database)
  132. max_age: -1
  133. views:
  134. videos:
  135. # PeerTube creates a database entry every hour for each video to track views over a period of time
  136. # This is used in particular by the Trending page
  137. # PeerTube could remove old remote video views if you want to reduce your database size (video view counter will not be altered)
  138. # -1 means no cleanup
  139. # Other values could be '6 months' or '30 days' etc (PeerTube will periodically delete old entries from database)
  140. remote:
  141. max_age: -1
  142. plugins:
  143. # The website PeerTube will ask for available PeerTube plugins and themes
  144. # This is an unmoderated plugin index, so only install plugins/themes you trust
  145. index:
  146. enabled: true
  147. check_latest_versions_interval: '12 hours' # How often you want to check new plugins/themes versions
  148. url: 'https://packages.joinpeertube.org'
  149. ###############################################################################
  150. #
  151. # From this point, all the following keys can be overridden by the web interface
  152. # (local-production.json file). If you need to change some values, prefer to
  153. # use the web interface because the configuration will be automatically
  154. # reloaded without any need to restart PeerTube.
  155. #
  156. # /!\ If you already have a local-production.json file, the modification of the
  157. # following keys will have no effect /!\.
  158. #
  159. ###############################################################################
  160. cache:
  161. previews:
  162. size: 500 # Max number of previews you want to cache
  163. captions:
  164. size: 500 # Max number of video captions/subtitles you want to cache
  165. admin:
  166. # Used to generate the root user at first startup
  167. # And to receive emails from the contact form
  168. email: 'admin@example.com'
  169. contact_form:
  170. enabled: true
  171. signup:
  172. enabled: false
  173. limit: 10 # When the limit is reached, registrations are disabled. -1 == unlimited
  174. requires_email_verification: false
  175. filters:
  176. cidr: # You can specify CIDR ranges to whitelist (empty = no filtering) or blacklist
  177. whitelist: []
  178. blacklist: []
  179. user:
  180. # Default value of maximum video BYTES the user can upload (does not take into account transcoded files).
  181. # -1 == unlimited
  182. video_quota: -1
  183. video_quota_daily: -1
  184. # If enabled, the video will be transcoded to mp4 (x264) with "faststart" flag
  185. # In addition, if some resolutions are enabled the mp4 video file will be transcoded to these new resolutions.
  186. # Please, do not disable transcoding since many uploaded videos will not work
  187. transcoding:
  188. enabled: true
  189. # Allow your users to upload .mkv, .mov, .avi, .flv videos
  190. allow_additional_extensions: true
  191. # If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
  192. allow_audio_files: true
  193. threads: 1
  194. resolutions: # Only created if the original video has a higher resolution, uses more storage!
  195. 240p: false
  196. 360p: false
  197. 480p: false
  198. 720p: false
  199. 1080p: false
  200. 2160p: false
  201. # Generate videos in a WebTorrent format (what we do since the first PeerTube release)
  202. # If you also enabled the hls format, it will multiply videos storage by 2
  203. webtorrent:
  204. enabled: true
  205. # /!\ Requires ffmpeg >= 4.1
  206. # Generate HLS playlists and fragmented MP4 files. Better playback than with WebTorrent:
  207. # * Resolution change is smoother
  208. # * Faster playback in particular with long videos
  209. # * More stable playback (less bugs/infinite loading)
  210. # If you also enabled the webtorrent format, it will multiply videos storage by 2
  211. hls:
  212. enabled: false
  213. import:
  214. # Add ability for your users to import remote videos (from YouTube, torrent...)
  215. videos:
  216. http: # Classic HTTP or all sites supported by youtube-dl https://rg3.github.io/youtube-dl/supportedsites.html
  217. enabled: false
  218. torrent: # Magnet URI or torrent file (use classic TCP/UDP/WebSeed to download the file)
  219. enabled: false
  220. auto_blacklist:
  221. # New videos automatically blacklisted so moderators can review before publishing
  222. videos:
  223. of_users:
  224. enabled: false
  225. # Instance settings
  226. instance:
  227. name: 'PeerTube'
  228. short_description: 'PeerTube, a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.'
  229. description: 'Welcome to this PeerTube instance!' # Support markdown
  230. terms: 'No terms for now.' # Support markdown
  231. code_of_conduct: '' # Supports markdown
  232. # Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc
  233. moderation_information: '' # Supports markdown
  234. # Why did you create this instance?
  235. creation_reason: ''
  236. # Who is behind the instance? A single person? A non profit?
  237. administrator: ''
  238. # How long do you plan to maintain this instance?
  239. maintenance_lifetime: ''
  240. # How will you pay the PeerTube instance server? With you own funds? With users donations? Advertising?
  241. business_model: ''
  242. # If you want to explain on what type of hardware your PeerTube instance runs
  243. # Example: "2 vCore, 2GB RAM..."
  244. hardware_information: '' # Supports Markdown
  245. # What are the main languages of your instance? To interact with your users for example
  246. # Uncomment or add the languages you want
  247. # List of supported languages: https://peertube.cpy.re/api/v1/videos/languages
  248. languages:
  249. # - en
  250. # - es
  251. # - fr
  252. # You can specify the main categories of your instance (dedicated to music, gaming or politics etc)
  253. # Uncomment or add the category ids you want
  254. # List of supported categories: https://peertube.cpy.re/api/v1/videos/categories
  255. categories:
  256. # - 1 # Music
  257. # - 2 # Films
  258. # - 3 # Vehicles
  259. # - 4 # Art
  260. # - 5 # Sports
  261. # - 6 # Travels
  262. # - 7 # Gaming
  263. # - 8 # People
  264. # - 9 # Comedy
  265. # - 10 # Entertainment
  266. # - 11 # News & Politics
  267. # - 12 # How To
  268. # - 13 # Education
  269. # - 14 # Activism
  270. # - 15 # Science & Technology
  271. # - 16 # Animals
  272. # - 17 # Kids
  273. # - 18 # Food
  274. default_client_route: '/videos/trending'
  275. # Whether or not the instance is dedicated to NSFW content
  276. # Enabling it will allow other administrators to know that you are mainly federating sensitive content
  277. # Moreover, the NSFW checkbox on video upload will be automatically checked by default
  278. is_nsfw: false
  279. # By default, "do_not_list" or "blur" or "display" NSFW videos
  280. # Could be overridden per user with a setting
  281. default_nsfw_policy: 'do_not_list'
  282. customizations:
  283. javascript: '' # Directly your JavaScript code (without <script> tags). Will be eval at runtime
  284. css: '' # Directly your CSS code (without <style> tags). Will be injected at runtime
  285. # Robot.txt rules. To disallow robots to crawl your instance and disallow indexation of your site, add '/' to "Disallow:'
  286. robots: |
  287. User-agent: *
  288. Disallow:
  289. # Security.txt rules. To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string.
  290. securitytxt:
  291. "# 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:"
  292. services:
  293. # Cards configuration to format video in Twitter
  294. twitter:
  295. username: '@Chocobozzz' # Indicates the Twitter account for the website or platform on which the content was published
  296. # If true, a video player will be embedded in the Twitter feed on PeerTube video share
  297. # If false, we use an image link card that will redirect on your PeerTube instance
  298. # Change it to "true", and then test on https://cards-dev.twitter.com/validator to see if you are whitelisted
  299. whitelisted: false
  300. followers:
  301. instance:
  302. # Allow or not other instances to follow yours
  303. enabled: true
  304. # Whether or not an administrator must manually validate a new follower
  305. manual_approval: false
  306. followings:
  307. instance:
  308. # If you want to automatically follow back new instance followers
  309. # If this option is enabled, use the mute feature instead of deleting followings
  310. # /!\ Don't enable this if you don't have a reactive moderation team /!\
  311. auto_follow_back:
  312. enabled: false
  313. # If you want to automatically follow instances of the public index
  314. # If this option is enabled, use the mute feature instead of deleting followings
  315. # /!\ Don't enable this if you don't have a reactive moderation team /!\
  316. auto_follow_index:
  317. enabled: false
  318. index_url: 'https://instances.joinpeertube.org'
  319. theme:
  320. default: 'default'