default.yaml 14 KB

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