Installing PeerTube using Docker on Reclaim Cloud

What is PeerTube?

PeerTube, developed by Framasoft, is an open source, decentralized alternative to video platforms like YouTube and Vimeo. According to their website:

Our aim is not to replace them, but rather to simultaneously offer something else, with different values.

Currently PeerTube is not available to install from the Marketplace. In this guide we’ll cover how to install it using Docker.

Creating the Environment

The first thing we need to do is create an environment. Click New Environment in the upper left of your Reclaim Cloud Dashboard.
New Environment

To install PeerTube using Docker you will need to setup a Docker Engine on Reclaim Cloud by clicking on the downward-facing arrow next to the Docker tab:

After that select Docker Engine:

At the next prompt create the domain (mypeertube.us.reclaim.cloud), name the server (My Peertube), and decide in what region you want the app to live (USA).

After the Docker Engine is created you can login to the web SSH tool and create the peertube directory within the home directory (keep in mind you can also find these instructions in the PeerTube docs here):

mkdir -p /home/peertube

Now move into that directory:

cd /home/peertube

From within /home/peertube create the reverse proxy directory:

mkdir -p ./docker-volume/traefik

Get the latest reverse proxy configuration:

curl https://raw.githubusercontent.com/chocobozzz/PeerTube/master/support/docker/production/config/traefik.toml > ./docker-volume/traefik/traefik.toml

Create Let’s Encrypt ACME certificates as JSON file:

touch ./docker-volume/traefik/acme.json

Needs to have file mode 600:

chmod 600 ./docker-volume/traefik/acme.json

Get the latest Compose file:

curl https://raw.githubusercontent.com/chocobozzz/PeerTube/master/support/docker/production/docker-compose.yml > docker-compose.yml

Get the latest .env file:

curl https://raw.githubusercontent.com/Chocobozzz/PeerTube/master/support/docker/production/.env > .env

Now you will need to edit the .env file with your PeerTube instance URL, email, and database settings:

nano ./.env

In the .env file you must replace the following:

  • <MY POSTGRES USERNAME>
  • <MY POSTGRES PASSWORD>
  • <MY DOMAIN> without ‘https://’
  • <MY EMAIL ADDRESS>

Here is an example of what the first part of an .env file looks like:

Be sure to replace all instances of <MY DOMAIN> (without 'https://) and <MY EMAIL ADDRESS> in all areas they are required.

After that, you should be ready to spin up the environment using the following command:

docker-compose up

Finally, you can use the following commands to get your login and password for the PeerTube instance you have just installed:

docker-compose logs peertube | grep -A1 root

After that go to your domain and login by appending /admin or /login, for this example it would be http://mypeertube.us.reclaim.cloud/login.

For more information on administering PeerTube see their extensive documentation. Also, the command line interface (CLI) tool is extremely useful for copying over videos from existing Vimeo or YouTube channels.

2 Likes