]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - README.md
Remove unused webserver configuration
[github/Chocobozzz/PeerTube.git] / README.md
CommitLineData
d3b52378
C
1<h1 align="center">
2 PeerTube
3</h1>
8c308c2b 4
d3b52378 5<h4 align="center">
e755a63a
BB
6Federated (ActivityPub) video streaming platform using P2P (BitTorrent)
7directly in the web browser with <a href="https://github.com/feross/webtorrent">WebTorrent</a>.
d3b52378 8</h4>
88c8d458 9
e755a63a
BB
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/).**
570a60fa 14
d3b52378
C
15<p align="center">
16 <strong>Client</strong>
191ce958 17
d3b52378 18 <br />
8c308c2b 19
d3b52378
C
20 <a href="https://david-dm.org/Chocobozzz/PeerTube?path=client">
21 <img src="https://david-dm.org/Chocobozzz/PeerTube.svg?path=client" alt="Dependency Status" />
22 </a>
23
28974889 24 <a href="https://david-dm.org/Chocobozzz/PeerTube?path=client#info=dev">
d3b52378
C
25 <img src="https://david-dm.org/Chocobozzz/PeerTube/dev-status.svg?path=client" alt="devDependency Status" />
26 </a>
27</p>
28
29<p align="center">
30 <strong>Server</strong>
31
32 <br />
33
34 <a href="https://travis-ci.org/Chocobozzz/PeerTube">
13fc89f4 35 <img src="https://travis-ci.org/Chocobozzz/PeerTube.svg?branch=develop" alt="Build Status" />
d3b52378
C
36 </a>
37
38 <a href="https://david-dm.org/Chocobozzz/PeerTube">
39 <img src="https://david-dm.org/Chocobozzz/PeerTube.svg" alt="Dependencies Status" />
40 </a>
41
28974889 42 <a href="https://david-dm.org/Chocobozzz/PeerTube#info=dev">
d3b52378
C
43 <img src="https://david-dm.org/Chocobozzz/PeerTube/dev-status.svg" alt="devDependency Status" />
44 </a>
45
d31910dd
C
46 <a href="http://standardjs.com/">
47 <img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="JavaScript Style Guide" />
d3b52378 48 </a>
80deae8d 49
5cefff7d 50 <a href="https://kiwiirc.com/client/irc.freenode.net/#peertube">
fcc5f77b 51 <img src="https://img.shields.io/badge/%23peertube-on%20freenode-brightgreen.svg" alt="PeerTube Freenode IRC" />
5cefff7d 52 </a>
d3b52378 53</p>
b4c5a1f8 54
d31910dd
C
55<br />
56
57<p align="center">
45ef55fc 58 <a href="https://peertube.cpy.re">
908f6e5e 59 <img src="https://lutim.cpy.re/mRdBAdeD.png" alt="screenshot" />
d31910dd
C
60 </a>
61</p>
15e3cdaa
C
62
63## Demonstration
64
e755a63a 65Want to see it in action?
1d1b7891 66
d5f345ed 67 * [Demo server](http://peertube.cpy.re)
e755a63a
BB
68 * [Video](https://peertube.cpy.re/videos/watch/f78a97f8-a142-4ce1-a5bd-154bf9386504)
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.
15e3cdaa 74
88c8d458
C
75## Why
76
e755a63a
BB
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.
88c8d458 80
e755a63a
BB
81So we need to have a decentralized network of servers seeding videos (as
82[Diaspora](https://github.com/diaspora/diaspora) for example). But it's not
83enough because one video could become famous and overload the server. It's the
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.
88c8d458 87
8c308c2b
C
88## Features
89
da817527 90- [X] Frontend
361b7df2 91 - [X] Angular frontend
fcaf1e0a
C
92- [X] Join the fediverse
93 - [X] Follow other instances
94 - [X] Unfollow an instance
95 - [X] Get for the followers/following list
8c308c2b
C
96- [X] Upload a video
97 - [X] Seed the video
fcaf1e0a 98 - [X] Send the meta data with ActivityPub to followers
8c308c2b
C
99- [X] Remove the video
100- [X] List the videos
fcaf1e0a 101- [X] View the video in an HTML5 player with WebTorrent
19a08a34 102- [X] Admin panel
900f0d2b 103- [X] OpenGraph tags
604e02ab 104- [X] OEmbed
00871a26 105- [X] Update video
604e02ab 106- [X] Videos view counter
2d7653dc 107- [X] Videos likes/dislikes
604e02ab
C
108- [X] Transcoding to different definitions
109- [X] Download file/torrent
110- [X] User video bytes quota
fcaf1e0a 111- [X] User video channels
604e02ab
C
112- [X] NSFW warnings/settings
113- [X] Video description in markdown
114- [X] User roles (administrator, moderator)
00871a26 115- [X] User registration
604e02ab 116- [X] Video privacy settings (public, unlisted or private)
fcaf1e0a 117- [X] Signaling a video to the admin origin PeerTube instance
604e02ab
C
118- [ ] Videos comments
119- [ ] User playlist
120- [ ] User subscriptions (by tags, author...)
fcaf1e0a 121- [ ] Add "DDOS" security
00871a26 122
8c308c2b 123
94171ec5 124## Installation
8c308c2b 125
e755a63a
BB
126See [wiki](https://github.com/Chocobozzz/PeerTube/wiki) for complete
127installation commands.
199cef3a 128
88c8d458 129### Front compatibility
8c308c2b 130
88c8d458
C
131 * Chromium
132 * Firefox (>= 42 for MediaSource support)
8c308c2b
C
133
134### Dependencies
135
9a989f81 136 * **NodeJS >= 8.x**
85cd99dc 137 * yarn
8c308c2b 138 * OpenSSL (cli)
8c67719c 139 * PostgreSQL
80deae8d 140 * FFmpeg
8c308c2b 141
c35ae59d
C
142#### Debian
143
e755a63a
BB
144 1. Install NodeJS 8.x (current LTS):
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)
0273fe81 148 4. Run:
c35ae59d 149
e755a63a 150```bash
9a989f81 151 $ apt-get update
6f045b57 152 $ apt-get install ffmpeg postgresql openssl
e755a63a 153```
0273fe81
JK
154
155#### Ubuntu 16.04
156
157 1. Install NodeJS 8.x (current LTS): (same as Debian)
158 2. Install yarn: (same as Debian)
159 3. Run:
160
e755a63a 161```bash
9a989f81
C
162 $ apt-get update
163 $ apt-get install ffmpeg postgresql openssl
e755a63a 164```
c35ae59d 165
6e1b11a7
SG
166#### Arch Linux
167
e755a63a 168 1. Run:
6e1b11a7 169
e755a63a 170```bash
6e1b11a7 171 $ pacman -S nodejs yarn ffmpeg postgresql openssl
e755a63a 172```
6e1b11a7 173
e755a63a 174#### Other distributions
94171ec5 175
e755a63a 176Feel free to update this README file in a pull request!
c35ae59d 177
e755a63a 178### Build from the sources
8c308c2b 179
e755a63a 180```bash
80deae8d 181 $ git clone -b master https://github.com/Chocobozzz/PeerTube
d148f3b9 182 $ cd PeerTube
85cd99dc 183 $ yarn install
26939223 184 $ npm run build
e755a63a 185```
94171ec5
C
186
187## Usage
188
f1f4732f
C
189### Production
190
e755a63a 191If you want to run PeerTube in production (which might be a bad idea for now :) ):
f1f4732f 192
e755a63a 193```bash
f1f4732f 194 $ cp config/production.yaml.example config/production.yaml
e755a63a 195```
f1f4732f 196
e755a63a
BB
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`.
f1f4732f 200
e755a63a
BB
201Finally, run the server with the `NODE_ENV` environment variable set to
202`production`:
f1f4732f 203
e755a63a 204```bash
f1f4732f 205 $ NODE_ENV=production npm start
e755a63a 206```
f1f4732f 207
e755a63a
BB
208The administrator password is automatically generated and can be found in the
209logs. You can set another password with:
9a5d2a3f 210
e755a63a 211```bash
9a5d2a3f 212 $ NODE_ENV=production npm run reset-password -- -u root
e755a63a 213```
9a5d2a3f 214
199cef3a 215**Nginx template** (reverse proxy): https://github.com/Chocobozzz/PeerTube/tree/master/support/nginx <br />
10d0963e
C
216**Systemd template**: https://github.com/Chocobozzz/PeerTube/tree/master/support/systemd
217
844e39c2
C
218You can check the application (CORS headers, tracker websocket...) by running:
219
e755a63a 220```bash
844e39c2 221 $ NODE_ENV=production npm run check
e755a63a 222```
844e39c2 223
643a5fc5
C
224### Upgrade
225
e755a63a
BB
226The following commands will upgrade the source (according to your current
227branch), upgrade node modules and rebuild client application:
643a5fc5 228
e755a63a 229```bash
643a5fc5 230 # systemctl stop peertube
4f133041 231 $ npm run upgrade-peertube
643a5fc5 232 # systemctl start peertube
e755a63a 233```
643a5fc5 234
e755a63a 235### Test with three fresh nodes
fd8e5e3c 236
e755a63a 237```bash
fd8e5e3c
C
238 $ npm run clean:server:test
239 $ npm run play
e755a63a 240```
fd8e5e3c 241
e755a63a
BB
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.
fd8e5e3c 244
94171ec5
C
245### Other commands
246
e755a63a 247To print all available commands, run:
94171ec5 248
e755a63a 249```bash
94171ec5 250 $ npm run help
e755a63a 251```
94171ec5 252
6dde6a31
C
253## Contributing
254
e755a63a
BB
255See the [contributing
256guide](https://github.com/Chocobozzz/PeerTube/blob/master/.github/CONTRIBUTING.md)
257to see how to contribute to PeerTube. Spoiler alert: you don't need to be a
258coder to help!
6dde6a31 259
8c308c2b
C
260## Architecture
261
e755a63a 262See [ARCHITECTURE.md](https://github.com/Chocobozzz/PeerTube/blob/master/ARCHITECTURE.md) for a more detailed explanation.
241abd69 263
8c308c2b
C
264### Backend
265
e755a63a
BB
266 * The backend is a REST API.
267 * Servers communicate with each others with [Activity
268 Pub](https://www.w3.org/TR/activitypub/).
269 * Each server has its own users who query it (search videos, query where the
270 torrent URI of this specific video is...).
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.
8c308c2b
C
277
278Here are some simple schemes:
279
d3b52378
C
280<p align="center">
281
a988e81c 282<img src="https://lutim.cpy.re/6Qut3ure.png" alt="Decentralized" />
d3b52378 283
a988e81c 284<img src="https://lutim.cpy.re/NvRAcv6U.png" alt="Watch a video" />
8c308c2b 285
a988e81c 286<img src="https://lutim.cpy.re/pqKm3Q5S.png" alt="Watch a P2P video" />
8c308c2b 287
d3b52378 288</p>