aboutsummaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md141
1 files changed, 84 insertions, 57 deletions
diff --git a/README.md b/README.md
index 077d6b8f0..094d81c4a 100644
--- a/README.md
+++ b/README.md
@@ -3,10 +3,14 @@
3</h1> 3</h1>
4 4
5<h4 align="center"> 5<h4 align="center">
6Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with <a href="https://github.com/feross/webtorrent">WebTorrent</a>. 6Federated (ActivityPub) video streaming platform using P2P (BitTorrent)
7directly in the web browser with <a href="https://github.com/feross/webtorrent">WebTorrent</a>.
7</h4> 8</h4>
8 9
9**PeerTube is sponsored by [Framasoft](https://framatube.org/#en), a non-profit that promotes, spreads and develops free-libre software. If you want to support this project, please [consider donating them](https://soutenir.framasoft.org/en/).** 10**PeerTube is sponsored by [Framasoft](https://framatube.org/#en), a non-profit
11that promotes, spreads and develops free culture in general, and free-libre
12software in particular. If you want to support this project, please [consider
13donating them](https://soutenir.framasoft.org/en/).**
10 14
11<p align="center"> 15<p align="center">
12 <strong>Client</strong> 16 <strong>Client</strong>
@@ -58,20 +62,28 @@ Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly
58 62
59## Demonstration 63## Demonstration
60 64
61Want to see in action? 65Want to see it in action?
62 66
63 * [Demo server](http://peertube.cpy.re) 67 * [Demo server](http://peertube.cpy.re)
64 * [Video](https://peertube.cpy.re/videos/watch/f78a97f8-a142-4ce1-a5bd-154bf9386504) to see how the "decentralization feature" looks like 68 * [Video](https://peertube.cpy.re/videos/watch/f78a97f8-a142-4ce1-a5bd-154bf9386504)
65 * Experimental demo servers that share videos (they are in the same network): [peertube2](http://peertube2.cpy.re), [peertube3](http://peertube3.cpy.re). Since I do experiments with them, sometimes they might not work correctly. 69 to see how the "decentralization feature" looks like
70 * Experimental demo servers that share videos (they are in the same
71 network): [peertube2](http://peertube2.cpy.re),
72 [peertube3](http://peertube3.cpy.re). Since I do experiments with them,
73 sometimes they might not work correctly.
66 74
67## Why 75## Why
68 76
69We can't build a FOSS video streaming alternatives to YouTube, Dailymotion, Vimeo... with a centralized software. One organization alone cannot have enough money to pay bandwidth and video storage of its server. 77We can't build a FOSS video streaming alternatives to YouTube, Dailymotion,
78Vimeo... with a centralized software. One organization alone may not have
79enough money to pay for bandwidth and video storage of its servers.
70 80
71So we need to have a decentralized network (as [Diaspora](https://github.com/diaspora/diaspora) for example). 81So we need to have a decentralized network of servers seeding videos (as
72But it's not enough because one video could become famous and overload the server. 82[Diaspora](https://github.com/diaspora/diaspora) for example). But it's not
73It's the reason why we need to use a P2P protocol to limit the server load. 83enough because one video could become famous and overload the server. It's the
74Thanks to [WebTorrent](https://github.com/feross/webtorrent), we can make P2P (thus bittorrent) inside the web browser right now. 84reason why we need to use a P2P protocol to limit the server load. Thanks to
85[WebTorrent](https://github.com/feross/webtorrent), we can make P2P (thus
86bittorrent) inside the web browser, as of today.
75 87
76## Features 88## Features
77 89
@@ -111,7 +123,8 @@ Thanks to [WebTorrent](https://github.com/feross/webtorrent), we can make P2P (t
111 123
112## Installation 124## Installation
113 125
114See [wiki](https://github.com/Chocobozzz/PeerTube/wiki) for complete installation commands. 126See [wiki](https://github.com/Chocobozzz/PeerTube/wiki) for complete
127installation commands.
115 128
116### Front compatibility 129### Front compatibility
117 130
@@ -128,12 +141,16 @@ See [wiki](https://github.com/Chocobozzz/PeerTube/wiki) for complete installatio
128 141
129#### Debian 142#### Debian
130 143
131 1. Install NodeJS 8.x (current LTS): [https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions) 144 1. Install NodeJS 8.x (current LTS):
132 2. Install yarn: [https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install) 145 [https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions)
146 2. Install yarn:
147 [https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)
133 4. Run: 148 4. Run:
134 149
150```bash
135 $ apt-get update 151 $ apt-get update
136 $ apt-get install ffmpeg postgresql openssl 152 $ apt-get install ffmpeg postgresql openssl
153```
137 154
138#### Ubuntu 16.04 155#### Ubuntu 16.04
139 156
@@ -141,112 +158,122 @@ See [wiki](https://github.com/Chocobozzz/PeerTube/wiki) for complete installatio
141 2. Install yarn: (same as Debian) 158 2. Install yarn: (same as Debian)
142 3. Run: 159 3. Run:
143 160
161```bash
144 $ apt-get update 162 $ apt-get update
145 $ apt-get install ffmpeg postgresql openssl 163 $ apt-get install ffmpeg postgresql openssl
164```
146 165
147#### Arch Linux 166#### Arch Linux
148 167
149 1. Run: 168 1. Run:
150 169
170```bash
151 $ pacman -S nodejs yarn ffmpeg postgresql openssl 171 $ pacman -S nodejs yarn ffmpeg postgresql openssl
172```
152 173
153#### Other distribution... (PR welcome) 174#### Other distributions
154 175
176Feel free to update this README file in a pull request!
155 177
156### Sources 178### Build from the sources
157 179
180```bash
158 $ git clone -b master https://github.com/Chocobozzz/PeerTube 181 $ git clone -b master https://github.com/Chocobozzz/PeerTube
159 $ cd PeerTube 182 $ cd PeerTube
160 $ yarn install 183 $ yarn install
161 $ npm run build 184 $ npm run build
185```
162 186
163## Usage 187## Usage
164 188
165### Production 189### Production
166 190
167If you want to run PeerTube for production (bad idea for now :) ): 191If you want to run PeerTube in production (which might be a bad idea for now :) ):
168 192
193```bash
169 $ cp config/production.yaml.example config/production.yaml 194 $ cp config/production.yaml.example config/production.yaml
195```
170 196
171Then edit the `config/production.yaml` file according to your webserver configuration. Keys set in this file will override those of `config/default.yml`. 197Then edit the `config/production.yaml` file according to your webserver
198configuration. Keys set in this file will override those of
199`config/default.yml`.
172 200
173Finally, run the server with the `production` `NODE_ENV` variable set. 201Finally, run the server with the `NODE_ENV` environment variable set to
202`production`:
174 203
204```bash
175 $ NODE_ENV=production npm start 205 $ NODE_ENV=production npm start
206```
176 207
177The administrator password is automatically generated and can be found in the logs. You can set another password with: 208The administrator password is automatically generated and can be found in the
209logs. You can set another password with:
178 210
211```bash
179 $ NODE_ENV=production npm run reset-password -- -u root 212 $ NODE_ENV=production npm run reset-password -- -u root
213```
180 214
181**Nginx template** (reverse proxy): https://github.com/Chocobozzz/PeerTube/tree/master/support/nginx <br /> 215**Nginx template** (reverse proxy): https://github.com/Chocobozzz/PeerTube/tree/master/support/nginx <br />
182**Systemd template**: https://github.com/Chocobozzz/PeerTube/tree/master/support/systemd 216**Systemd template**: https://github.com/Chocobozzz/PeerTube/tree/master/support/systemd
183 217
184You can check the application (CORS headers, tracker websocket...) by running: 218You can check the application (CORS headers, tracker websocket...) by running:
185 219
220```bash
186 $ NODE_ENV=production npm run check 221 $ NODE_ENV=production npm run check
222```
187 223
188### Upgrade 224### Upgrade
189 225
190The following commands will upgrade the source (according to your current branch), upgrade node modules and rebuild client application: 226The following commands will upgrade the source (according to your current
227branch), upgrade node modules and rebuild client application:
191 228
229```bash
192 # systemctl stop peertube 230 # systemctl stop peertube
193 $ npm run upgrade-peertube 231 $ npm run upgrade-peertube
194 # systemctl start peertube 232 # systemctl start peertube
233```
195 234
196### Development 235### Test with three fresh nodes
197
198In this mode, the server will run requests between instances more quickly, the video durations are limited to a few seconds.
199
200To develop on the server-side (server files are automatically compiled when we modify them and the server restarts automatically too):
201
202 $ npm run dev:server
203
204The server (with the client) will listen on `localhost:9000`.
205
206
207To develop on the client side (client files are automatically compiled when we modify them):
208
209 $ npm run dev:client
210
211The API will listen on `localhost:9000` and the frontend on `localhost:3000` (with hot module replacement, you don't need to refresh the web browser).
212
213**Username**: *root* <br/>
214**Password**: *test*
215
216### Test with 3 fresh nodes
217 236
237```bash
218 $ npm run clean:server:test 238 $ npm run clean:server:test
219 $ npm run play 239 $ npm run play
240```
220 241
221Then you will get access to the three nodes at `http://localhost:900{1,2,3}` with the `root` as username and `test{1,2,3}` for the password. 242Then you will get access to the three nodes at `http://localhost:900{1,2,3}`
243with the `root` as username and `test{1,2,3}` for the password.
222 244
223### Other commands 245### Other commands
224 246
225To print all available command run: 247To print all available commands, run:
226 248
249```bash
227 $ npm run help 250 $ npm run help
251```
228 252
229## Contributing 253## Contributing
230 254
231See the [contributing guide](https://github.com/Chocobozzz/PeerTube/blob/master/.github/CONTRIBUTING.md). 255See the [contributing
232 256guide](https://github.com/Chocobozzz/PeerTube/blob/master/.github/CONTRIBUTING.md)
233See the [server code documentation](https://github.com/Chocobozzz/PeerTube/blob/master/support/doc/server/code.md). 257to see how to contribute to PeerTube. Spoiler alert: you don't need to be a
234 258coder to help!
235See the [client code documentation](https://github.com/Chocobozzz/PeerTube/blob/master/support/doc/client/code.md).
236
237 259
238## Architecture 260## Architecture
239 261
240See [ARCHITECTURE.md](https://github.com/Chocobozzz/PeerTube/blob/master/ARCHITECTURE.md) for a more detailed explication. 262See [ARCHITECTURE.md](https://github.com/Chocobozzz/PeerTube/blob/master/ARCHITECTURE.md) for a more detailed explanation.
241 263
242### Backend 264### Backend
243 265
244 * The backend is a REST API 266 * The backend is a REST API.
245 * Servers communicate with each others with [Activity Pub](https://www.w3.org/TR/activitypub/) 267 * Servers communicate with each others with [Activity
246 * Each server has its own users who query it (search videos, where the torrent URI of this specific video is...) 268 Pub](https://www.w3.org/TR/activitypub/).
247 * If a user upload a video, the server seeds it and sends the video information (name, short description, torrent URI...) its followers 269 * Each server has its own users who query it (search videos, query where the
248 * A server is a tracker responsible for all the videos uploaded in it 270 torrent URI of this specific video is...).
249 * Even if nobody watches a video, it is seeded by the server (through [WebSeed protocol](http://www.bittorrent.org/beps/bep_0019.html)) where the video was uploaded 271 * If a user uploads a video, the server seeds it and sends its followers some
272 metadata (name, short description, torrent URI...).
273 * A server is a tracker responsible for all the videos uploaded in it.
274 * Even if nobody watches a video, it is seeded by the server (through
275 [WebSeed protocol](http://www.bittorrent.org/beps/bep_0019.html)) where the
276 video was uploaded.
250 277
251Here are some simple schemes: 278Here are some simple schemes:
252 279