production.yaml.example 9.1 KB

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