Logo       PBase-Foundation

Funkwhale

Here is how to install the Funkwhale federated ActivityPub music sharing platform. It provides an Nginx frontend, the main Python based service, a Redis cache and a PostgreSQL database backend. If your host is registered in DNS the installer will use Let's Encrypt to setup HTTPS.

After installing the first two preconfig packages be sure to modify the configuration files in the
/usr/local/pbase-data/admin-only/module-config.d/ directory to specify your SMTP and Let's Encrypt parameters.

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

(Compatibility: EL8/CentOS 8 only)

Extras

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

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

Configuration Options

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

This is the Funkwhale configuration options file. These defaults are appropriate for most use cases. Be sure to select the current downloadable Funkwhale version.

{
"pbase_funkwhale" : {
"funkwhaleVersion": "1.0",
"port": 5000,
"addNgnixProxy": true,
"useSubDomain": false,
"subDomainName": ""
}
}

(Limitations: the addNgnixProxy, subDomainName, and alternateDomains fields are not implemented in 1.0)

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 Funkwhale 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": "funkwhale",
"user": "funkwhale",
"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:
https://docs.funkwhale.audio/admin/configuration.html#environment-variables

{
"pbase_s3storage" : {
"s3Enabled": false,
"s3Bucket": "",
"awsAccessKeyId": "",
"awsSecretAccessKeyId": "",
"awsS3RegionName": "",
"awsS3CustomDomain": "",
"awsS3EndpointUrl": "",
"awsLocation": "",
"proxyMedia": "",
"s3AliasHost": ""
}
}