Going to try Mastodon first for my own instance. thread
Rented a VPS from https://hostwinds.com. Went for the managed tier just to have less things to think of while learning
Actually I would have went for just getting an instance from https://masto.host, but the registration was closed when I tried. So I figured I’d rent a VPS and learn along the way.
Would also enable me to run other services :)
Last night I was considering other ActivityPub implementations (GoToSocial, Friendica, etc) which would have been okay since, after searching around, I found I could still use Mastodon apps with them
And just skimming the instructions for setting up Mastodon, I had the impression that it will not be easy. Friendica's PHP+MySQL to me seemed the most familiar.
gotosocial, being written in Go, was also attractive to me because I've been looking for a project to play around and learn the programming language with... so I thought maybe I could even submit some PRs when I use that
After looking for solutions for "moving" accounts, I realized it will not be easy going from Mastodon to others https://fosstodon.org/@ayo/109543104405658262
Yeah, small reason maybe, but I just did not want to start a new account so here I am this morning, just done with Mastodon's "Preparing your machine" instructions.
Maybe when I moved the account to my own instance and the database is complete I can explore writing my own APIs :)
Now installing the requirements for Mastodon. Some thoughts:
- Their docs assume Ubuntu 20.4 is the OS you have. This is good because there’s a huge community behind Ubuntu and you’re more likely to get help when you need it
- there’s an instruction to set up Ruby and their package manager bundler. I did not have a good experience with this before, so I’m a bit worried here —though they suggested a tool they said will make it easier: rbenv
Oh wait, I want to thank a few people
@Graycot for answering my questions re: vps and self-hosting
@abel also for chatting about mastodon admin stuff and self-hosting in general
@matthew from whom I first learned about gotosocial
@daniel for mentioning friendica, and going through a lot of setting up instances himself and therefore showing it could be fun
Now setting up PostgreSQL. Looks straightforward, should be familiar if you’ve done this before. I do like that they include an optional performance configuration.
This tutorial by DigitalOcean just dropped. Looks streamlined and the website is easier to navigate!
Thanks @kaasbaas for mentioning!
https://www.digitalocean.com/community/tutorials/how-to-install-mastodon-on-ubuntu-20-04
Okay I’m switching over to the Digital Ocean tutorial. Confirmed they just follow the recommendations of the Mastodon team, and so far the website is easier to follow and I’m more confident here that dependencies are updated
I resist the urge to fork the repo for now less branching
Still waiting for bundler to finish installing gems. It pauses a lot and doesn’t show some kind of “loading” progress so you don’t know where you are.
Okay, bundler is done with a bunch of “IMPORTANT!” and deprecation messages.
Not sure if I need to do anything about these —will just proceed
Ah, thanks Digital Ocean for some assurance:
"Once this finishes, there is a lot of output at the end that may appear like it needs to be acted upon. However, you can safely proceed without additional action required."
Actually I just assumed these JS deps are for frontend, but I’m not sure… will find out soon
Alright! All deps are downloaded and installed. Moving on to Mastodon configuration :)
Before I proceed I want to list some skills & resources you need to get through those first steps
1. Money - unless you have a bare metal server lying around, you will need to rent a server (vps, shared, or dedicated). Even if you have your own machine you will need an ISP subscription with a dedicated IP to be connected outside.
2. Server management competency - this is a server-side adventure. You need to find it fun and/or be confident in SSH-ing and sudo-ing for this.
3. Version management - as mentioned previously, installing from source will use git. Not required to be good at it but familiarity with version management using git makes the experience more fun
And of course,
4. Time - just reading around, preparing the machine, installing dependencies, taking notes (toots) took roughly more than half a day already, so don’t expect you will finish it in one sitting if you go the way of manually setting up from source
One thing before continuing the Mastodon configuration itself. The service requires an SMTP for sending emails. I don’t know yet if I can use my existing email server or will have to set up a separate one
Mastodon configuration is interactive: a series of questions you have to answer.
Database and Redis configuration will work as default, so just pressing Enter for questions related to them is easy
Then we are asked for storage solution: whether cloud or local (which is the server Mastodon will run in). Pretty straightforward when choosing local, but not good for multi-user setups
Ah here it is, the SMTP setup. I am asked if I want to send from this server or another. I have an existing one so I will use that :)
So couple of requirements that can be running outside your Mastodon machine: cloud storage and mail server
Up next are a bunch of unexciting commands to setup an Admin account, and then Nginx configuration (for access outside the server) which is just copy-paste from the Mastodon repo
First problem that’s not documented, but is totally my fault, the domain I want to use failed to be certified by Certbot. The issue is because I used it before to test serving a web page with apache2. So certbot is seeing a conflict in name usage. Resolution is stop apache2
@ayo when software has a lot of components I tend to choose for docker instead as it is easier to manage and install. Worth the overhead for some use cases.
What did push you in the direction of hosting your own instance?
@ayo fair enough, good reason to do so. Learning is also the reason to self host it?
@ayo Eventually even the DB!
You can set it on another maachine or on a managed DB on a cloud provider (only if you want to scale, tho)
@ayo Which smtp are you using? Your own?
@ayo Yeah for a mono-instance user, it should be just fine.
For more user, you can easily get blocked (since they will think you are doing it for a commercial purpose).
If that happen, looks for something like Mailgun