Starting an Island On Bare Metal

@oliphant@writer.oliphant.social

In Setting up your own island I explained how you can take an existing Ubuntu server and install a Dockerized version of GTS.

Some people find that ridiculous overhead if they are already running on a VPS. So this is for people who prefer a bare metal install.

We'll use K&T Host for this example, as they are my favorite host. However, Greenhost is very similar and shares similar perks, for those who pay their bill in euros instead of dollars.

Perks

Why K&T Host?

  • 100% Green Energy! (This is the number one reason)
  • Cheap! $3.75/mo for hosting
  • You still have direct server SSH access
  • Built-in security upgrades and database backups

In short, you get all the perks of a managed host, while still having server-level access and the ability to make configuration changes.

Why GoToSocial?

For a few reasons. The first is that, compared to Mastodon, GoToSocial is very simple and requires a fraction of the resources required for Mastodon, which automatically makes it cheaper to host, easy to set up and configure, and you don't have to do anything at all with nginx, it has its own webserver and letsencrypt (https) support, too.

It was intended to be used for small communities, it was not designed or optimized for hundreds of thousands of users per server, which is perfect for our network of small island servers.

In addition to Postgres, it supports sqlite and can store assets on disk, which means you won't need to worry about configuring a database or cloud storage (though that's certainly an option). In this tutorial, K&T Host uses Postgres, but you should not have to configure it yourself.

You can probably run it off of a Raspberry Pi (though I suspect you'll need a super fast SD card to handle writing in a performant fashion to the sqlite db).

No, you don't have to know anything about Golang to use it.

Setting up your host on K&T

Let's assume you have already gone to a domain name registrar and picked up a domain name.

Hit the order hosting button to start provisioning your account. You'll need to enter in your domain name at that time.

At this point, a ticket will be created for you in the system, and you'll be able to review the progress of that ticket to see how long before your instance is ready. You'll be sent instructions through the ticketing system on how to set up a CNAME or other record to direct your domain name to K&T host.

Once that has been confirmed, they'll send you a message when the site is set up.

SSH Access

This part is a little tricky, insofar as there is contradictory documentation about this. Don't use the link above. Instead, look in your email for a message like this:

AppCloud Setup

Take note of the App Cloud info, as you'll need that username and password to log in.

Your ssh is going to be handled like so:

ssh [user from email]@ssh.knthost.com

Use the 'App Cloud' password from your email.

Set Up Your First User

We'll be using Step #4 from these instructions.

First, we need to generate a unique password. GTS won't let us create a user with a weak password.

$ openssl rand -base64 24 
eA/HSr80X+WWF1E+r8QnDQTqd4eFBmxm

(Don't use the password above, that's just an example.)

Once you have that, you're ready to create your first admin user. Other users can go through the signup process as normal if you like, but if you don't want to enable signups, this is how you can grant access to others.

cd /apps/gotosocial

./gotosocial --config-path ./config.yaml admin account create --username LOGINNAME --email EMAILADDRESS --password 'PASSWORD'

That creates your user, but we're not done yet.

Your first user should have admin privileges, so you can manage federation.

Do this, using the LOGINNAME name you used above:

./gotosocial --config-path ./config.yaml admin account promote --username LOGINNAME

Note: Only use the promote option if you want the user to become an admin.

You might as well also confirm the email address.

./gotosocial --config-path ./config.yaml admin account confirm --username LOGINNAME

While you're here, you should edit the config.yaml to turn this into an island, which primarily means putting it in allowlist mode. As such, only minimal edits are required. Changes to this file will require a restart of GTS, but I'll show you how to do that.

nano config.yaml

First, we edit the file, scrolling down to instance-federation-mode and change it to allowlist. You can optionally enable signups in the account area of the file, too.

Everything else should be configured for you in terms of binding IPs and database access, though if you have SMTP settings, you can update them here, too, but GTS doesn't require that.

Once you're done, hit Ctrl + X to exit out of the file, and Y to save.

Once that's done, you need to restart:

touch /system/action/gotosocial.restart

Now try logging in with your new admin user. You'll likely have a ticket with K&T asking you to confirm everything is working, so be sure to let them know or close out the ticket as necessary.

You will log in at the /settings endpoint for your server. Example: https://dos.1sland.social/settings.

Join an Island Network

Different island networks will have different procedures, but joining ION is easy.

https://codeberg.org/oliphant/islands/src/branch/main/ion#the-ion-archipelago-documentation

We look forward to seeing you in the archipelago!

How to Use This Thing?

This is a helpful post from Island One Admin that can give you a few pointers for getting started with your GoToSocial island, setting up your server and profile.

Managing federation is handled in the /settings area of your server. Log in there to handle allowlisting and approve signups, as well as set instance details about your island.

Good luck!

— @oli 🐘