production.yaml.example 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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. login:
  11. # 15 attempts in 5 min
  12. window: 5 minutes
  13. max: 15
  14. ask_send_email:
  15. # 3 attempts in 5 min
  16. window: 5 minutes
  17. max: 3
  18. # Proxies to trust to get real client IP
  19. # If you run PeerTube just behind a local proxy (nginx), keep 'loopback'
  20. # If you run PeerTube behind a remote proxy, add the proxy IP address (or subnet)
  21. trust_proxy:
  22. - 'loopback'
  23. # Your database name will be "peertube"+database.suffix
  24. database:
  25. hostname: 'localhost'
  26. port: 5432
  27. suffix: '_prod'
  28. username: 'peertube'
  29. password: 'peertube'
  30. pool:
  31. max: 5
  32. # Redis server for short time storage
  33. # You can also specify a 'socket' path to a unix socket but first need to
  34. # comment out hostname and port
  35. redis:
  36. hostname: 'localhost'
  37. port: 6379
  38. auth: null
  39. db: 0
  40. # SMTP server to send emails
  41. smtp:
  42. hostname: null
  43. port: 465 # If you use StartTLS: 587
  44. username: null
  45. password: null
  46. tls: true # If you use StartTLS: false
  47. disable_starttls: false
  48. ca_file: null # Used for self signed certificates
  49. from_address: 'admin@example.com'
  50. email:
  51. body:
  52. signature: "PeerTube"
  53. object:
  54. prefix: "[PeerTube]"
  55. # From the project root directory
  56. storage:
  57. tmp: '/var/www/peertube/storage/tmp/' # Used to download data (imports etc), store uploaded files before processing...
  58. avatars: '/var/www/peertube/storage/avatars/'
  59. videos: '/var/www/peertube/storage/videos/'
  60. streaming_playlists: '/var/www/peertube/storage/streaming-playlists/'
  61. redundancy: '/var/www/peertube/storage/videos/'
  62. logs: '/var/www/peertube/storage/logs/'
  63. previews: '/var/www/peertube/storage/previews/'
  64. thumbnails: '/var/www/peertube/storage/thumbnails/'
  65. torrents: '/var/www/peertube/storage/torrents/'
  66. captions: '/var/www/peertube/storage/captions/'
  67. cache: '/var/www/peertube/storage/cache/'
  68. log:
  69. level: 'info' # debug/info/warning/error
  70. rotation:
  71. enabled : true
  72. search:
  73. # Add ability to fetch remote videos/actors by their URI, that may not be federated with your instance
  74. # If enabled, the associated group will be able to "escape" from the instance follows
  75. # That means they will be able to follow channels, watch videos, list videos of non followed instances
  76. remote_uri:
  77. users: true
  78. anonymous: false
  79. trending:
  80. videos:
  81. interval_days: 7 # Compute trending videos for the last x days
  82. # Cache remote videos on your server, to help other instances to broadcast the video
  83. # You can define multiple caches using different sizes/strategies
  84. # Once you have defined your strategies, choose which instances you want to cache in admin -> manage follows -> following
  85. redundancy:
  86. videos:
  87. check_interval: '1 hour' # How often you want to check new videos to cache
  88. strategies: # Just uncomment strategies you want
  89. # -
  90. # size: '10GB'
  91. # # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
  92. # min_lifetime: '48 hours'
  93. # strategy: 'most-views' # Cache videos that have the most views
  94. # -
  95. # size: '10GB'
  96. # # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
  97. # min_lifetime: '48 hours'
  98. # strategy: 'trending' # Cache trending videos
  99. # -
  100. # size: '10GB'
  101. # # Minimum time the video must remain in the cache. Only accept values > 10 hours (to not overload remote instances)
  102. # min_lifetime: '48 hours'
  103. # strategy: 'recently-added' # Cache recently added videos
  104. # min_views: 10 # Having at least x views
  105. csp:
  106. enabled: false
  107. report_only: true # CSP directives are still being tested, so disable the report only mode at your own risk!
  108. report_uri:
  109. tracker:
  110. # If you disable the tracker, you disable the P2P aspect of PeerTube
  111. enabled: true
  112. # Only handle requests on your videos.
  113. # If you set this to false it means you have a public tracker.
  114. # Then, it is possible that clients overload your instance with external torrents
  115. private: true
  116. # Reject peers that do a lot of announces (could improve privacy of TCP/UDP peers)
  117. reject_too_many_announces: false
  118. history:
  119. videos:
  120. # If you want to limit users videos history
  121. # -1 means there is no limitations
  122. # Other values could be '6 months' or '30 days' etc (PeerTube will periodically delete old entries from database)
  123. max_age: -1
  124. views:
  125. videos:
  126. # PeerTube creates a database entry every hour for each video to track views over a period of time
  127. # This is used in particular by the Trending page
  128. # PeerTube could remove old remote video views if you want to reduce your database size (video view counter will not be altered)
  129. # -1 means no cleanup
  130. # Other values could be '6 months' or '30 days' etc (PeerTube will periodically delete old entries from database)
  131. remote:
  132. max_age: -1
  133. ###############################################################################
  134. #
  135. # From this point, all the following keys can be overridden by the web interface
  136. # (local-production.json file). If you need to change some values, prefer to
  137. # use the web interface because the configuration will be automatically
  138. # reloaded without any need to restart PeerTube.
  139. #
  140. # /!\ If you already have a local-production.json file, the modification of the
  141. # following keys will have no effect /!\.
  142. #
  143. ###############################################################################
  144. cache:
  145. previews:
  146. size: 500 # Max number of previews you want to cache
  147. captions:
  148. size: 500 # Max number of video captions/subtitles you want to cache
  149. admin:
  150. # Used to generate the root user at first startup
  151. # And to receive emails from the contact form
  152. email: 'admin@example.com'
  153. contact_form:
  154. enabled: true
  155. signup:
  156. enabled: false
  157. limit: 10 # When the limit is reached, registrations are disabled. -1 == unlimited
  158. requires_email_verification: false
  159. filters:
  160. cidr: # You can specify CIDR ranges to whitelist (empty = no filtering) or blacklist
  161. whitelist: []
  162. blacklist: []
  163. user:
  164. # Default value of maximum video BYTES the user can upload (does not take into account transcoded files).
  165. # -1 == unlimited
  166. video_quota: -1
  167. video_quota_daily: -1
  168. # If enabled, the video will be transcoded to mp4 (x264) with "faststart" flag
  169. # In addition, if some resolutions are enabled the mp4 video file will be transcoded to these new resolutions.
  170. # Please, do not disable transcoding since many uploaded videos will not work
  171. transcoding:
  172. enabled: true
  173. # Allow your users to upload .mkv, .mov, .avi, .flv videos
  174. allow_additional_extensions: true
  175. # If a user uploads an audio file, PeerTube will create a video by merging the preview file and the audio file
  176. allow_audio_files: true
  177. threads: 1
  178. resolutions: # Only created if the original video has a higher resolution, uses more storage!
  179. 240p: false
  180. 360p: false
  181. 480p: false
  182. 720p: false
  183. 1080p: false
  184. 2160p: false
  185. # /!\ EXPERIMENTAL /!\
  186. # /!\ Requires ffmpeg >= 4
  187. # Generate HLS playlists and fragmented MP4 files. Better playback than with WebTorrent:
  188. # * Resolution change is smoother
  189. # * Faster playback in particular with long videos
  190. # * More stable playback (less bugs/infinite loading)
  191. # /!\ Multiplies videos storage by 2 /!\
  192. hls:
  193. enabled: false
  194. import:
  195. # Add ability for your users to import remote videos (from YouTube, torrent...)
  196. videos:
  197. http: # Classic HTTP or all sites supported by youtube-dl https://rg3.github.io/youtube-dl/supportedsites.html
  198. enabled: false
  199. torrent: # Magnet URI or torrent file (use classic TCP/UDP/WebSeed to download the file)
  200. enabled: false
  201. auto_blacklist:
  202. # New videos automatically blacklisted so moderators can review before publishing
  203. videos:
  204. of_users:
  205. enabled: false
  206. # Instance settings
  207. instance:
  208. name: 'PeerTube'
  209. short_description: 'PeerTube, a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.'
  210. description: '' # Support markdown
  211. terms: '' # Support markdown
  212. default_client_route: '/videos/trending'
  213. # Whether or not the instance is dedicated to NSFW content
  214. # Enabling it will allow other administrators to know that you are mainly federating sensitive content
  215. # Moreover, the NSFW checkbox on video upload will be automatically checked by default
  216. is_nsfw: false
  217. # By default, "do_not_list" or "blur" or "display" NSFW videos
  218. # Could be overridden per user with a setting
  219. default_nsfw_policy: 'do_not_list'
  220. customizations:
  221. javascript: '' # Directly your JavaScript code (without <script> tags). Will be eval at runtime
  222. css: '' # Directly your CSS code (without <style> tags). Will be injected at runtime
  223. # Robot.txt rules. To disallow robots to crawl your instance and disallow indexation of your site, add '/' to "Disallow:'
  224. robots: |
  225. User-agent: *
  226. Disallow:
  227. # Security.txt rules. To discourage researchers from testing your instance and disable security.txt integration, set this to an empty string.
  228. securitytxt:
  229. "# 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:"
  230. services:
  231. # Cards configuration to format video in Twitter
  232. twitter:
  233. username: '@Chocobozzz' # Indicates the Twitter account for the website or platform on which the content was published
  234. # If true, a video player will be embedded in the Twitter feed on PeerTube video share
  235. # If false, we use an image link card that will redirect on your PeerTube instance
  236. # Test on https://cards-dev.twitter.com/validator to see if you are whitelisted
  237. whitelisted: false
  238. followers:
  239. instance:
  240. # Allow or not other instances to follow yours
  241. enabled: true
  242. # Whether or not an administrator must manually validate a new follower
  243. manual_approval: false