Logo       PBase-Foundation


Here is how to install the Mastodon federated ActivityPub messaging platform. 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-mastodon
yum -y install pbase-postgres
yum -y install pbase-mastodon

(Compatibility: EL8/CentOS 8 only)


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-mastodon package places default option files under the /usr/local/pbase-data/admin-only/module-config.d/ directory.

This is the Mastodon configuration options file. These defaults are appropriate for most use cases.

"pbase_mastodon" : {
"port": 3000,
"addNgnixProxy": true,
"subDomainName": "",
"webDomainName": "",
"alternateDomains": "",
"singleUserMode": false,
"authorizedFetch": false,
"limitedFederationMode": false

(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 Mastodon 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": "mastodon_production",
"user": "mastodon",
"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": ""