This is a condensed guide for running Mastodon on any compatible device with balenaCloud. The readme is limited to the bare minumum required for starting the service on your own device. For more comprehensive walkthrough, please see here.
- Create an account on balenaCloud. No credit card necessary
- Decide whether you want to use your own domain or the one provided by the Balena Cloud. Balena URL can be found on the Balena Dashboard under PUBLIC DEVICE URL
- Clone the repo
git clone https://github.com/dsevastianov/balena-mastodon
, update LOCAL_DOMAIN indocker-compose.yml
with chosen domain name (no slashes), Balena domain name will look something like6c45c13f642b9487a21f159392b33aac.balena-devices.com
- Open
.gitignore
and uncomment.balena
. This will ensure that your secrets will not be committed by mistake - Assuming that you have Docker installed on your machine, run
config.sh
(orconfig.ps1
on Windows) to generate secrets and update relevant variables in.balena/secrets/.env.production
. Alternatively, update the following variables manually:SECRET_KEY_BASE
,OTP_SECRET
,VAPID_PRIVATE_KEY
,VAPID_PUBLIC_KEY
. balena push <your_fleet_name>
- Once the deployment is complete, open chosen domain name in the borwser. Enter username, email, and password and click Sign Up button
- Go to balenaCloud Dashboard and open terminal session for
web
service - Execute
tootctl accounts modify <username> --role admin --confirm --approve
- Now you can login to your Mastodon server with
<username>
, no email confirmation neccesary
You'll need to provide SMTP details in .balena/secrets/.env.production
to start onboarding new users automatically. See Mastodon documentation on other configuration options, including support for external storage with Amazon S3 and SWIFT, Tor for darknet, ElasticSearch for full text search, etc.