overview

note - this is a WIP while i find time to write this down

notes on installing mastodon in a self-hosted manner where the front end is largely proxied by cloudflare’s tunneld services and object storage is handled on an S3 server someplace in the cloud.

pre-requisites

you’re gonna need the following

  • a domain with the ability to control your DNS
  • if you want to use the cloudflare biz, you’re going to need to have the DNS and the account elements setup on cloudflare in advance of this because, well, cloudflare’s going to be the front end of things.
  • S3 storage location. i’m using wasabi, but you can use S3 or cloudflare’s R2 solution adjust accordingly.
  • let’s encrypt misc. i have some funkiness associated with other home services that i stick behind a reverse proxy. if you want to have access to the mastodon service on the local LAN without going out and back for things, you’ll need to install the certs on the hosting node directly. there is some tunneling-fu that i use to handle this.

docker-compose.yml

  • use the stock mastodon docker-compose.yml (available via github)
  • remove the build: references (just comment them out)
  • i bake the version into the image that i’m pulling (e.g., image: tootsuite/mastodon:4.3.0)
  • i use elasticsearch (the es instance) i need to see what’s going on with this for the rpi installation. you might not necessarily want this. i need to figure out if this is available for arm64 architecture.

postgress signup

  • generate a password for the postgress user
    • i do this from 1password and have this integrated into my production keychain injection
docker run --rm --name postgres           \
-v <volume path>:/var/lib/postgresql/data \
-e POSTGRES_PASSWORD=<password>           \
-d <image name>

db setup

cloudflared setup