2023.01.25
I was curious about Mastodon but only interested in joining if I could have the name I wanted: @Aubrie@aubrielee.com. The promise of open source is control and customizability, is it not?
I already had a personal website at aubrielee.com hosted on GitHub Pages. Rather than rent a new domain, I set up my own Mastodon instance on a subdomain, verse.aubrielee.com. Then, I changed my display name from Aubrie@verse.aubrielee.com to Aubrie@aubrielee.com by setting up HTTP redirects and editing my Mastodon .env file.
I’ll describe my process in more detail in case it helps anyone else.
I wanted to:
The general stages were:
For hosting, I chose DigitalOcean because of its reputation. Setting up my Mastodon instance required creating a new Droplet.
To create the Droplet:
I had aubrielee.com and wanted to set up on verse.aubrielee.com rather than rent another domain and fragment my domain architecture. This guide assumes you already have a domain—e.g., something.com—and you want to set up your Mastodon server on a subdomain—e.g., social.something.com.
Now that I had the Droplet and domain connected, I could go through the setup of the Mastodon app on the Droplet.
Users-iMac:~ user$ ssh root@##.###.###.### The authenticity of host '##.###.###.### (##.###.###.###)' can't be established. ECDSA key fingerprint is […]. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added ##.###.###.###' (ECDSA) to the list of known hosts. Enter passphrase for key '/Users/user/.ssh/id_rsa':
Welcome to the Mastodon first-time setup! Domain name: social.something.com Do you want to store user-uploaded files on the cloud? No
SMTP server: localhost SMTP port: 587 SMTP username: SMTP password: SMTP authentication: plain SMTP OpenSSL verify mode: none E-mail address to send e-mails "from": Mastodon <notifications@social.something.com> Send a test e-mail with this configuration right now? no
It is time to create an admin account that you'll be able to use from the browser! Username: Name E-mail: name@something.com You can login with the password: […] The web interface should be momentarily accessible via https://social.something.com/
When I logged into my instance, I didn’t have an Administration tab. I changed my account role to Owner by entering my Mastodon instance via Terminal and using a tootctl command.
Instead of using Terminal, you can also use the console in DigitalOcean near the top right of the web interface of your Droplet. This console is now my preferred way of entering my instance, rather than SSHing in on my computer.
root@hostname:~# apt install ruby ruby-bundler
root@hostname:~# sudo su mastodon
mastodon@hostname:/root$ cd ~ mastodon@hostname:~$ cd live/bin/
mastodon@hostname:~/live/bin$ RAILS_ENV=production ./tootctl accounts modify Name --role Owner
Now you should have full admin privileges.
Setting up a custom domain allows your display name to be @Name@something.com instead of @Name@social.something.com. (I believe, theoretically, the display domain could be arbitrary, e.g., @Name@anythingelse.com.) To display a custom domain, I set HTML redirects in GitHub Pages for three web resources: host-meta, nodeinfo, and webfinger. I also had to edit my Mastodon .env file.
Users-iMac:~ user$ curl -k https://social.something.com/.well-known/host-meta
githubpagesusername.github.io/.well-known/host-meta
Users-iMac:~ user$ curl -k https://social.something.com/.well-known/nodeinfo
githubpagesusername.github.io/.well-known/nodeinfo
Users-iMac:~ user$ curl -k https://social.something.com/.well-known/webfinger?resource=acct:name@social.something.com
githubpagesusername.github.io/.well-known/webfinger
mastodon@hostname:~$ cd /home/mastodon/live
mastodon@hostname:~/live$ vim .env.production
LOCAL_DOMAIN=something.com WEB_DOMAIN=social.something.com
mastodon@hostname:~/live$ exit
root@hostname:~# systemctl restart mastodon-web root@hostname:~# systemctl restart mastodon-streaming root@hostname:~# systemctl restart mastodon-sidekiq
Now everything should be ready! Post, boost, follow at will. Follow me, even: https://verse.aubrielee.com/@Aubrie.
Thank you to the people who saved me with their advice. Here are some resources I consulted along the way:
2024.02.28 Update:
For a long time, I’ve been wanting to embed an excerpt of my timeline into this website. I’ve now done so at https://aubrielee.com/more using i.j’s Mastodon embed timeline widget. Many thanks to i.j for being so kind and helpful in getting it set up!
I appreciate support of any kind, whether that’s sharing this page, telling me what you thought, or treating me to something yummy:
Venmo: @aubrie
PayPal: aubrieality
Ko-fi: