aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-20 15:01:54 +0200
committerChocobozzz <me@florianbigard.com>2021-04-20 15:01:54 +0200
commit4024c44f9027a32809931de0692d40d001df721c (patch)
tree4403f1149143a0c0e7176c30d7077bb648ae4911
parent46460547caf558d50040acc75b25373ea07fc83c (diff)
parent1c82e4eee3b6ce0edca18157b11aff8d5bf3dacd (diff)
downloadPeerTube-4024c44f9027a32809931de0692d40d001df721c.tar.gz
PeerTube-4024c44f9027a32809931de0692d40d001df721c.tar.zst
PeerTube-4024c44f9027a32809931de0692d40d001df721c.zip
Merge branch 'release/3.1.0' into develop
-rw-r--r--FAQ.md192
-rw-r--r--server/initializers/database.ts13
2 files changed, 12 insertions, 193 deletions
diff --git a/FAQ.md b/FAQ.md
index 602a76631..15a7ee827 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -1,191 +1 @@
1# FAQ Moved on https://joinpeertube.org/faq
2
3<!-- Table of contents generated with DocToc: https://github.com/thlorenz/doctoc -->
4<!-- START doctoc generated TOC please keep comment here to allow auto update -->
5<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
6
7
8- [Why did you create PeerTube?](#why-did-you-create-peertube)
9- [I don't like the name "PeerTube"](#i-dont-like-the-name-peertube)
10- [If nobody watches a video, is it seeded?](#if-nobody-watches-a-video-is-it-seeded)
11- [Which container formats can I use for the videos I want to upload?](#which-container-formats-can-i-use-for-the-videos-i-want-to-upload)
12- [I want to change my domain name, how can I do that?](#i-want-to-change-my-domain-name-how-can-i-do-that)
13- [Why do we have to put our Twitter username in the PeerTube configuration?](#why-do-we-have-to-put-our-twitter-username-in-the-peertube-configuration)
14- [How are video views counted?](#how-are-video-views-counted)
15- [Should I have a big server to run PeerTube?](#should-i-have-a-big-server-to-run-peertube)
16 - [CPU](#cpu)
17 - [RAM](#ram)
18 - [Storage](#storage)
19 - [Network](#network)
20- [Can I seed videos with my classic BitTorrent client (Transmission, rTorrent...)?](#can-i-seed-videos-with-my-classic-bittorrent-client-transmission-rtorrent)
21- [Why host on GitHub and Framagit?](#why-host-on-github-and-framagit)
22- [Are you going to use a blockchain (like Steem)?](#are-you-going-to-use-a-blockchain-like-steem)
23- [Are you going to support advertisements?](#are-you-going-to-support-advertisements)
24- [What is "creation dynamic" and why not modify it?](#what-is-creation-dynamic-and-why-not-modify-it)
25- [I have found a security vulnerability in PeerTube. Where and how should I report it?](#i-have-found-a-security-vulnerability-in-peertube-where-and-how-should-i-report-it)
26- [Does PeerTube ensure federation compatibility with previous version?](#does-peertube-ensure-federation-compatibility-with-previous-version)
27- [Are specific versions of PeerTube long term supported?](#are-specific-versions-of-peertube-long-term-supported)
28- [When approximately can I expect the next version of PeerTube to arrive?](#when-approximately-can-i-expect-the-next-version-of-peertube-to-arrive)
29
30<!-- END doctoc generated TOC please keep comment here to allow auto update -->
31
32## Why did you create PeerTube?
33
34We can't build a FOSS video streaming alternative to YouTube, Dailymotion,
35Vimeo... with centralized software. One organization alone may not have
36enough money to pay for bandwidth and video storage of its servers.
37
38Our stance is that only a decentralized network of servers can provide an
39acceptable answer to technical issues (bandwidth, transcoding expenses, etc.)
40and social answers (need for a particular moderation policy, preserving
41content, etc.).
42
43While a paragraph is not enough to answer all these problems, PeerTube has
44very early prided itself on using a contributory design, both for creating
45communities as federated nodes (as [Mastodon](https://joinmastodon.org/) for
46example), and for seeding videos (instances can seed each other's videos). But that's not
47enough because one video could become popular and overload the server. That is
48why we need to use P2P in the web browser using WebRTC to limit the server load.
49
50
51## I don't like the name "PeerTube"
52
53PeerTube is just the name of the software. You can install it on your
54server, and choose a name you want. For example, [this instance](https://framatube.org/)
55is named "Framatube".
56
57
58## If nobody watches a video, is it seeded?
59
60Yes, the player also downloads the video from the server using HTTP.
61It can also be helped by other servers using [redundancy](https://docs.joinpeertube.org/contribute-architecture?id=redundancy-between-instances).
62
63
64## Which container formats can I use for the videos I want to upload?
65
66WEBM, MP4 or OGV videos are supported by default (they are streamable formats),
67but instance administrators can additionally enable support for additional formats
68when transcoding is enabled on their instance.
69
70
71## I want to change my domain name, how can I do that?
72
73It's not officially supported, but you can try the `update-host` script: https://docs.joinpeertube.org/maintain-tools?id=update-hostjs
74
75
76## Why do we have to put our Twitter username in the PeerTube configuration?
77
78You don't have to: we set a default value if you don't have a Twitter account.
79We need this information because Twitter requires an account for links share/videos embed on their platform.
80
81
82## How are video views counted?
83
84Your web browser sends a view to the server after 30 seconds of playback.
85If a video is less than 30 seconds in length, a view is sent after 75% of the video duration.
86After giving a view, that IP address cannot add another view in the next hour.
87Views are buffered, so don't panic if the view counter stays the same after you watched a video.
88
89
90## Should I have a big server to run PeerTube?
91
92PeerTube should run happily on a virtual machine with 2 threads/vCPUs, at least 1 Gb of RAM and enough storage for videos. In terms of bandwidth, a lot will depend on which PeerTube instances you federate with and what your relation with them is (more about that below).
93
94As a real life example, the PeerTube demonstration server [https://peertube.cpy.re](https://peertube.cpy.re) runs on 2 vCores and 2GB of RAM. Average consumption is:
95 * **CPU**: nginx ~ 2%, peertube ~ 10%, postgres ~ 1%, redis ~ 1%
96 * **RAM**: nginx ~ 1MB, peertube ~ 150MB, postgres ~ 30MB, redis ~ 20MB
97 * **Network**: ~200GB sent per month (https://framatube.org: ~1.5TB sent per month)
98
99### CPU
100
101Except for video transcoding, a PeerTube instance is not CPU bound. Neither Nginx, PeerTube itself, PostgreSQL nor Redis require a lot of computing power. If it were only for those, one could easily get by with just one thread/vCPU.
102
103You will hugely benefit from at least a second thread though, because of transcoding. Transcoding _is_ very cpu intensive. It serves two purposes on a PeerTube instance: it ensures all videos can be played optimally in the web interface, and it generates different resolutions for the same video. PeerTube support for offloading transcoding to other machines is being discussed, but not yet implemented. See https://github.com/Chocobozzz/PeerTube/issues/947 .
104
105### RAM
106
1071/2 GB of RAM should be plenty for a basic PeerTube instance, which usually takes at most 150 MB in RAM. The only reason you might want more would be if you colocate your Redis or PostgreSQL services on a non-SSD system.
108
109### Storage
110
111There are two important angles to storage: disk space usage and sustained read speed.
112
113To make a rough estimate of your disk space usage requirements, you want to know the answer to three questions:
114- What is the total size of the videos you wish to stream?
115- Do you want to enable transcoding? If so, do you want to provide multiple resolutions per video? Try this out with a few videos and you will get an idea of how much extra space is required per video and estimate a multiplication factor for future space allocation.
116- Which sharing mechanisms do you want to enable? Just WebTorrent, or also HLS with p2p? If you want both, this will double your storage needs.
117
118In terms of read speed, you want to make sure that you can saturate your network uplink serving PeerTube videos. This should not be a problem with SSD disks, whereas traditional HDD should be accounted for: typical sustained read rates for [a well tuned system](support/doc/production.md#tcpip-tuning) with a 7200rpm hard disk should hover around 120 MB/s or 960 Mbit/s. The latter should be enough for a typical 1 Gbit/s network uplink.
119
120### Network
121
122A rough estimate of a traditional server's video streaming network capacity is usually quite straightforward. You simply divide your server's available bandwidth by the average bandwidth per stream, and you have an upper bound.
123
124Take a server for example with a 1 Gbit/s uplink for example pushing out 1080p60 streams at 5 Mbit/s per stream. That means the absolute theoretical upper capacity bound is 200 simultaneous viewers if your server's disk i/o can keep up. Expect a bit less in practice.
125
126But what if you need to serve more users? That's where PeerTube's federation feature shines. If other PeerTube instances following yours, chances are they have decided to mirror part of your instance! The feature is called "server redundancy" and caches your most popular videos to help serve additional viewers. While viewers themselves contribute a little additional bandwidth while watching the video in their browsers (mostly during surges), mirroring servers have a much greater uplink and will help your instance with sustained higher concurrent streaming.
127
128If all your preparations and friends' bandwidth is not enough, you might prefer serving files from a CDN ; see our [remote storage guide](https://docs.joinpeertube.org/admin-remote-storage).
129
130
131## Can I seed videos with my classic BitTorrent client (Transmission, rTorrent...)?
132
133Yes you can, but you won't be able to send data to users that watch the video in their web browser.
134
135
136## Why host on GitHub and Framagit?
137
138Historical reason.
139
140
141## Are you going to use a blockchain (like Steem)?
142
143Short answer: no, since like most appchains/votechains, it modifies the dynamic of creation, and as such cannot be integrated into mainline PeerTube. Read more about that in [the dedicated section](#what-is-creation-dynamic-and-why-not-modify-it).
144
145
146## Are you going to support advertisements?
147
148Short answer: no, we don't want advertisers to dictate which content should be financed.
149That would modify the dynamic of creation; as such it cannot be integrated into mainline PeerTube.
150Read more about that in [the dedicated section](#what-is-creation-dynamic-and-why-not-modify-it).
151
152The long answer is probably more subtle. YouTube has shaped generations of video creators by making it easy to place ads;
153but making big money with the platform can be a challenge.
154A typical video ad runs between $.10 and $.30 per 1000 views (as of March 2018).
155More than 70% of video creators use ads as the main way to make money on YouTube, yet less than 3% of video creators make a living out of their YouTube activity (with partnerships and commissions, otherwise counting only ad revenue it drops to 1%).
156Read more about it in the 2018 study by Mathias Bärtl, [*YouTube channels, uploads and views: A statistical analysis of the past 10 years*](https://www.dropbox.com/s/0cq4wtxm83s95t2/10.1177%401354856517736979.pdf?dl=0).
157To the best of our knowledge, small and medium-community creators are better off getting support from their community on platforms such as Liberapay, Tipeee or Patreon.
158Moreover, don't forget that advertisers already pay considering YouTube's large user base; with PeerTube's way smaller user base and refusal of user profiling, a pay-per-view that's lower than YouTube's could only be expected.
159
160
161## What is "creation dynamic" and why not modify it?
162
163We define creation dynamic as the way any original content, regardless of its monetary value, is created and incentivized.
164We want to stay neutral by limiting the influence of our platform on authors as much as possible. We are not curators, and want to limit the scope of PeerTube instance owners and administrators' responsibilities to moderation tasks only.
165
166If you still want to use a functionality potentially altering that state of things, then you could interface with our upcoming plug-in system, which will be the place to integrate such features in the near future.
167
168With that being said, know that we are not against these features *per se*.
169We are always open to discussion about potential PRs bringing in features, even of that kind. But we certainly won't dedicate our limited resources to develop them ourselves when there is so much to be done elsewhere.
170
171
172## I have found a security vulnerability in PeerTube. Where and how should I report it?
173
174We have a policy for contributions related to security. Please refer to [SECURITY.md](./SECURITY.md)
175
176
177## Does PeerTube ensure federation compatibility with previous version?
178
179We **try** to keep compatibility with the latest minor version (2.3.1 with 2.2 for example).
180We don't have resources to keep compatibility with other versions.
181
182
183## Are specific versions of PeerTube long term supported?
184
185We don't have enough resource to maintain a PeerTube LTS version.
186Please always upgrade to the latest version.
187
188
189## When approximately can I expect the next version of PeerTube to arrive?
190
191Anything from 2 to 6 months, with no promises.
diff --git a/server/initializers/database.ts b/server/initializers/database.ts
index 4c9d7c610..edf12bc41 100644
--- a/server/initializers/database.ts
+++ b/server/initializers/database.ts
@@ -51,18 +51,27 @@ const dbname = CONFIG.DATABASE.DBNAME
51const username = CONFIG.DATABASE.USERNAME 51const username = CONFIG.DATABASE.USERNAME
52const password = CONFIG.DATABASE.PASSWORD 52const password = CONFIG.DATABASE.PASSWORD
53const host = CONFIG.DATABASE.HOSTNAME 53const host = CONFIG.DATABASE.HOSTNAME
54const ssl = CONFIG.DATABASE.SSL
55const port = CONFIG.DATABASE.PORT 54const port = CONFIG.DATABASE.PORT
56const poolMax = CONFIG.DATABASE.POOL.MAX 55const poolMax = CONFIG.DATABASE.POOL.MAX
57 56
57let dialectOptions: any = {}
58
59if (CONFIG.DATABASE.SSL) {
60 dialectOptions = {
61 ssl: {
62 rejectUnauthorized: false
63 }
64 }
65}
66
58const sequelizeTypescript = new SequelizeTypescript({ 67const sequelizeTypescript = new SequelizeTypescript({
59 database: dbname, 68 database: dbname,
60 dialect: 'postgres', 69 dialect: 'postgres',
70 dialectOptions,
61 host, 71 host,
62 port, 72 port,
63 username, 73 username,
64 password, 74 password,
65 ssl,
66 pool: { 75 pool: {
67 max: poolMax 76 max: poolMax
68 }, 77 },