Logo       PBase-Foundation

PeerTube

Here is how to install the PeerTube federated video hosting and sharing platform. It provides a PostgreSQL database backend. It assumes your host is registered in DNS. The installer will use Let's Encrypt to setup HTTPS.

After running the first two preconfig packages be sure to modify the configuration files in the /usr/local/pbase-data/admin-only/module-config.d/ directory.

Specifically, the pbase_lets_encrypt.json must be changed to hold your site administrator's email address. And the pbase_smtp.json file must be changed to hold your outgoing SMTP email server information.

yum -y install https://pbase-foundation.com/pbase-preconfig.rpm
yum -y install pbase-preconfig-postgres-peertube
yum -y install pbase-postgres
yum -y install activpb-peertube

Compatibility: EL8/CentOS 8 only

Extras

You should secure your server with pbase-firewall-enable, sync your clocks with pbase-timesync-enable for ActivityPub if your server doesn't already have NTP, and lock down SSH access with the pbase-ssh-fail2ban package.

yum -y install pbase-ssh-fail2ban
yum -y install pbase-timesync-enable
yum -y install pbase-firewall-enable

Configuration Options

The pbase-preconfig-postgres-peertube package places default option files under the /usr/local/pbase-data/admin-only/module-config.d/ directory.

This is the Let's Encrypt configuration options file. Be sure to set the emailAddress. If your server is not registered in DNS you should set executeCertbotCmd to false.

{
"pbase_lets_encrypt" : {
"enableAutoRenew": true,
"executeCertbotCmd": true,
"additionalSubDomain": "",
"emailAddress": "yoursysadmin@yourrealmail.com"
}
}

(Limitations: the additionalSubDomain field is not implemented in 1.0)

This is the SMTP configuration options file. The defaults are typical for a Mailgun client.
Be sure to set the password field with the correct value from the SMTP provider.

{
"pbase_smtp" : {
"server": "smtp.mailgun.org",
"port": 587,
"login": "postmaster@mail.example.com",
"password": "mysmtppassword",
"authMethod": "plain",
"openSSLVerifyMode": "none"
}
}

This is the Postgres configuration options file. The defaults are typical for a standalone Peertube server stack with a local Postgres server and generally will not need to be modified.
But for an external database server this must be edited to point to it.

"pbase_postgres": [
{
"default": {
"hostName": "localhost",
"port": "5432",
"startService": true,
"enableRemoteAccess": true,
"install": true,
"database": [
{
"name": "peertube_prod",
"user": "peertube",
"password": "mypostgrespassword",
"grantCreateDatabase": true
}
]
}
}
]
}

(Limitations: only one database at a time the startService, enableRemoteAccess, and install fields are not implemented in 1.0)

This is the S3 storage configuration options file. To use S3, set the s3Enabled to 'true' and fill in the rest of the values as documented in:

{
"pbase_s3storage" : {
"s3Enabled": false,
"s3Bucket": "",
"awsAccessKeyId": "",
"awsSecretAccessKeyId": "",
"awsS3RegionName": "",
"awsS3AliasHost": "",
"awsS3HostName": ""
}
}