3 <!-- START doctoc generated TOC please keep comment here to allow auto update -->
4 <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
7 - [Debian / Ubuntu and derivatives](#debian--ubuntu-and-derivatives)
8 - [Arch Linux](#arch-linux)
9 - [CentOS 7](#centos-7)
14 - [Other distributions](#other-distributions)
16 <!-- END doctoc generated TOC please keep comment here to allow auto update -->
18 ## Debian / Ubuntu and derivatives
19 1. On a fresh Debian/Ubuntu, as root user, install basic utility programs needed for the installation
22 # apt-get install curl sudo unzip vim
25 2. It would be wise to disable root access and to continue this tutorial with a user with sudoers group access
27 3. Install certbot (choose instructions for nginx and your distribution) :
28 [https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions)
29 4. Install NodeJS 8.x (current LTS):
30 [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)
31 5. Install yarn, and be sure to have a recent version (>= 1.5.1, the latest release):
32 [https://yarnpkg.com/en/docs/install#linux-tab](https://yarnpkg.com/en/docs/install#linux-tab)
37 $ sudo apt install nginx ffmpeg postgresql postgresql-contrib openssl g++ make redis-server git
38 $ ffmpeg -version # Should be >= 3.x
39 $ g++ -v # Should be >= 5.x
42 If you still have a 2.x version of FFmpeg on Ubuntu:
44 $ sudo add-apt-repository ppa:jonathonf/ffmpeg-3
46 $ sudo apt install ffmpeg
49 Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis:
51 $ sudo systemctl start redis postgresql
59 $ sudo pacman -S nodejs yarn ffmpeg postgresql openssl redis git wget unzip python2 base-devel npm nginx
62 Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis:
64 $ sudo systemctl start redis postgresql
69 1. Install NodeJS 8.x (current LTS):
70 [https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora)
72 [https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)
73 3. Install or compile ffmpeg:
74 * Install - [https://linoxide.com/linux-how-to/install-ffmpeg-centos-7/](https://linoxide.com/linux-how-to/install-ffmpeg-centos-7/)
75 * Compile - [https://gist.github.com/mustafaturan/7053900#file-latest-ffmpeg-centos6-sh](https://gist.github.com/mustafaturan/7053900#file-latest-ffmpeg-centos6-sh)
80 $ sudo yum install epel-release centos-release-scl
82 $ sudo yum install nginx postgresql postgresql-server postgresql-contrib openssl gcc-c++ make redis git devtoolset-7
85 5. You need to use a more up to date version of G++ in order to run the yarn install command, hence the installation of devtoolset-7.
87 $ sudo scl enable devtoolset-7 bash
90 Later when you invoke any node command, please prefix them with `CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++`, such as with:
93 $ sudo -H -u peertube CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++ yarn install --production --pure-lockfile
96 Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis:
98 $ sudo service redis start
99 $ sudo service postgresql start
104 0. Upgrade your packages:
108 1. Add a user with sudoers group access:
110 useradd my-peertube-user
111 passwd my-peertube-user
112 usermod my-peertube-user -a -G wheel # Add my-peertube-user to sudoers
115 2. (Optional) Install certbot (choose instructions for nginx and your distribution) :
116 [https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions)
117 3. Install NodeJS 8.x (current LTS):
118 [https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora)
120 [https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)
121 5. Enable [RPM Fusion](https://rpmfusion.org) for Fedora (available for x86, x86_64, armhfp)
123 sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
125 This is necessary because `ffmpeg` is not in the Fedora repos.
129 sudo dnf install nginx ffmpeg postgresql-server postgresql-contrib openssl gcc-c++ make redis git
130 ffmpeg -version # Should be >= 3.x
131 g++ -v # Should be >= 5.x
135 _from [PostgreSQL documentation](https://www.postgresql.org/download/linux/redhat/):_
136 > Due to policies for Red Hat family distributions, the PostgreSQL installation will not be enabled for automatic start or have the database initialized automatically.
139 sudo postgresql-setup initdb
140 sudo systemctl enable postgresql.service
141 sudo systemctl start postgresql.service
143 sudo systemctl enable nginx.service
144 sudo systemctl start nginx.service
146 sudo systemctl enable redis.service
147 sudo systemctl start redis.service
151 By default, you cannot acces your server via public IP. To do so, you must configure firewall:
153 # Ports used by peertube dev setup
154 sudo firewall-cmd --permanent --zone=public --add-port=3000/tcp
155 sudo firewall-cmd --permanent --zone=public --add-port=9000/tcp
157 sudo firewall-cmd --permanent --zone=public --add-service=http
158 sudo firewall-cmd --permanent --zone=public --add-service=https
160 sudo firewall-cmd --reload
162 9. Configure max ports
164 This is necessary if you are running dev setup, otherwise you will have errors with `nodemon`
166 echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
168 [More info](https://stackoverflow.com/questions/34662574/node-js-getting-error-nodemon-internal-watch-failed-watch-enospc#34664097)
172 On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail:
174 1. bootstrap pkg, initialize db and install peertube's dependencies, always as root (sudo not yet installed):
178 # pkg install -y sudo bash wget git python nginx pkgconf vips postgresql96-server postgresql96-contrib redis openssl node npm yarn ffmpeg unzip
181 2. Allow users in the wheel group (hope you don't forgot to add your user on wheel group!) to use sudo
186 Uncomment the line 90
191 3. Enable nginx, redis, postgresql services and initialize database
194 # sysrc postgresql_enable="YES"
195 # sysrc redis_enable="YES"
196 # sysrc nginx_enable="YES"
199 Initialize database and start services
201 # service postgresql initdb
202 # service postgresql start
203 # service redis start
204 # service nginx start
211 brew install ffmpeg nginx postgresql openssl gcc make redis git yarn
216 brew services run postgresql
217 brew services run redis
222 * Add this to ``/etc/portage/sets/peertube``:
226 media-video/ffmpeg[x264] # Optionnally add vorbis,vpx
233 media-libs/vips[jpeg,png,exif]
235 # Optionnal, client for Let’s Encrypt:
237 # app-crypt/certbot-nginx
240 * Compile the peertube set:
245 * Initialize the PostgreSQL database if you just merged it:
247 emerge --config postgresql
250 * (For OpenRC) Enable and then start the services (replace with the correct PostgreSQL slot):
253 rc-update add postgresql-10
254 rc-service redis start
255 rc-service postgresql-10 start
258 ## Other distributions
260 Feel free to update this file in a pull request!