Skip to content

This is a BastilleBSD Template to bootstrap Mastodon (Microblogging)

License

Notifications You must be signed in to change notification settings

ddowse/mastodon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mastodon

This is a BastilleBSD template to bootstrap Mastodon in a FreeBSD jail. Find out more about BastilleBSD by reading the documentation.

A tutorial how to install Mastodon on FreeBSD can be found in Stefano Marinelli's Website Installing Mastodon inside a FreeBSD jail.

The rc(8) scripts needed to start the services at boottime are taken from Stefano Marinelli's fine tutorial. Kudos!

bastille bootstrap https://codeberg.org/ddowse/mastodon
bastille template TARGET ddowse/mastodon --arg DOMAIN=mastodon.example.org --arg EMAIL=mailbox@example.org 

Detailed beginners description

Prerequisite (Software)

PostgreSQL

You will need access to a PostgreSQL Server.

Login to the database server and create the user for your Mastodon instance as described in Mastodon's Documentation here.

Add a new entry to your pg_hba.conf

Example!

host    mastodon        mastodon        10.0.0.10/32            trust

In case you don't have a running PostgreSQL then just create a new Jail and bootstrap this yaazkal/bastille-postgres BastilleBSD template.

Example!

bastille create postges 13.1-RELEASE 10.0.0.10
bastille bootstrap https://github.com/yaazkal/bastille-postgres
bastille template yaazkal/bastille-postgres
bastille cmd postgres su - postgres -c "psql -c 'CREATE USER mastodon CREATEDB;'"
bastille cmd postgres sh -c 'echo "host    mastodon        mastodon        10.0.0.10/32            trust" >> /var/db/postgres/data14/pg_hba.conf'

Redis

Mastodon needs access to a Redis server. Redis Server is installed as a dependency anyway so to simplify things for beginners the redis daemon will run in unprotected mode. Please check the Bastillefile for more details.

In the mastodon setup process enter the jails IP instead of localhost.

TLS certificate

Make sure Port 80/443 are open. Port 80 is only needed to get a TLS certificate from Let's Encrypt.

Bootstrap

bastille bootstrap https://codeberg.org/ddowse/mastodon

This nextstep will run the commands found in the Bastillefile It is wise to create a zfs snapshot of the jail before applying it. In case something goes wrong you can easily rollback. Read more about ZFS snapshots on the FreeBSD Documentation

bastille template TARGET ddowse/mastodon --arg DOMAIN=mastodon.example.org --arg EMAIL=mailbox@example.org

About

This is a BastilleBSD Template to bootstrap Mastodon (Microblogging)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages