Running GoToSocial on NSFN

My current web host is NearlyFreeSpeech.net, which seems to be rather unique as far as hosting companies go. It’s a decidedly do-it-yourself experience1 with pay-what-you-use pricing. And while it is not true VPS hosting, you can do VPS-like things with it via daemons. As far as I know, no one has yet tried running the lightweight fediverse platform GoToSocial on it, and I am pleased to report it is entirely possible. Here’s what I did.

These are based on the bare metal installation instructions, with help from this (members-only) forum post about Etherpad and this blog post about Python/Django.

  • In the NFSN member interface, create a new site (go to the Sites tab and click the “Create a New Site” link in the right-hand sidebar). For server type, I chose “Kitchen Sink”.

  • In a terminal, ssh in to your new site with ssh $USER_$SITENAME@ssh.nyc1.nearlyfreespeech.net. (This assumes you’ve already set up SSH access. If not, you can add SSH keys from the “Profile” tab in the member interface.)

  • Navigate to your “protected” directory: cd /home/protected

  • Create folders for GoToSocial: mkdir -p gotosocial/storage Then switch to your new GTS folder: cd gotosocial. (NFSN now has SSL enabled by default, so you won’t need to make gotosocial/storage/certs. I guess you still can if you really want.)

  • NFSN uses FreeBSD, so download the latest 64-bit FreeBSD release.

    In a web browser, go to the releases page, scroll down to the table with links to binary archives for different operating systems and architectures, and copy the link to freebsd_amd64.tar.gz.

    In the terminal (remember, you should be in /home/protected/gotosocial), do wget $THAT_RELEASE_URL_YOU_JUST_COPIED.

  • Extract it with tar -xzf gotosocial_$GTS_VERSION_freebsd_amd64.tar.gz.

  • Edit the configuration file, config.yaml, as described in the installation instructions. You don’t need to bother with the LetsEncrypt-related settings, as NFSN includes TLS by default.

  • In /home/protected, create a daemon script by, for example, entering touch gotosocial.sh && nano gotosocial.sh. Whatever your file creation method, editor, or filename of choice is, the content should be this:

    #!/bin/sh
    exec /home/protected/gotosocial/gotosocial --config-path=/home/protected/gotosocial/config.yaml server start
    

    Save the file and quit (in nano, Ctrl+S and Ctrl+X respectively). Then make it executable: chmod +x /home/protected/gotosocial.sh

  • Make sure the “web” user has access to the right files and folders: chgrp -R web /home/protected/gotosocial and chmod -R g+w /home/protected/gotosocial. This tripped me up a few times around.

  • In the NFSN member interface for the site, add the daemon and proxy.

    Daemon settings:

    • Tag: gotosocial
    • Command Line: /home/protected/gotosocial.sh
    • Working Directory: /home/protected/gotosocial
    • Run Daemon As: web

    Proxy settings:

    • Protocol: HTTP
    • Base URI: /
    • Document Root: /
    • Target Port: 8080

    When stopping and restarting GoToSocial (e. g. for upgrades), stop and start the daemon via the member interface. However, you can also run the script yourself in the terminal with ./gotosocial.sh. Be very careful not to interrupt upgrades!

  • In the terminal, create your first user as described in the docs. Go to the instance URL and log in.

Troubleshooting

Logs are located in, well, /home/logs.

Cost & Performance

So far, I’m paying about $16 USD a month. I have about 1000 followers and follow about 1100 people, and when livetooting events can post quite frequently. I occasionally run into rate limits on busy #Monsterdon nights and have to lay off for a few minutes. I find in general it handles my needs fine.


I’m sure there’s a lot I’ve forgot, and I’ll probably add more about maintenance, troubleshooting, etc. In the meanwhile, if anyone else has tried this and can make suggestions to improve this guide, or has used NFSN for other fedi platforms like snac, let me know!


  1. The FAQ includes “Is your service easy to use? —No.” 

Arachnid summer/fall highlights

Back in May I recapped the arachnid highlights of the year to date. Since then I’ve found some species I had no idea occurred here, and seen some things in real life that I’d only ever read about! Here’s my personal top 10 arachnid observations from the rest of 2024.

Continue reading Arachnid summer/fall highlights

How To Take Good Up-Close Phone Photos of Bugs

So, I love identifying bugs1 for people online. It’s like solving tiny little mysteries. But often it’s hard for people to get a photo of the bug to begin with, because it’s just so small or fast-moving and all they have is a phone. This post isn’t about getting into phone macro photography; this is a quick guide for taking a basic photo that’s good enough for ID. Continue reading How To Take Good Up-Close Phone Photos of Bugs

I Can Put My Leg Back On You Can’t: How Spiders Regrow Limbs

The reference, for those of you lucky enough not to recognize it.

Recently I found a tiny four-legged running crab spider (family Philodromidae) in Trinity-Bellwoods and brought it home to keep temporarily until it grew its legs back. It was so small that I could keep it in a 45 mL plastic cup with a tiny chip of bark. I fed it sugar syrup on the end of a Q-tip, and then (as it was too small and terrified for the flightless fruit flies I raise for Sabella, my pet black widow) I made it a (disgusting) fruit fly-and-syrup mush to drink. It soon molted and grew back three legs, and was then big enough to catch fruit flies. I think it grew back the last leg its next molt, but perhaps dropped it again when it nearly escaped one night as I tried to feed it—a sign, to me, that it was time to release it. I made sure it ate again, then set it free at the spot in the park that I found it. It immediately caught a small green plant bug and raced off, lightning-fast and good as new.

I chronicled the whole thing on Mastodon, and received many replies from people who had no idea spiders could regrow legs! So here is a proper post about the phenomenon. Continue reading I Can Put My Leg Back On You Can’t: How Spiders Regrow Limbs

Recent arachnid lifers & rarities

It recently occurred to me that I first got into spiders around 2013 or 2014, which means that, unbelievably, I have been spidering for ten years. I mostly go to the same sites and recognize most of the spiders and mites I see, so I have gotten more interested in observing their behaviour rather than trying to identify them. But every now and then I do come across some that are totally new to me, or ones that I only see rarely. Here’s some of the “lifers” and rarities I’ve come across this year so far, with links to the corresponding iNaturalist observations.

Continue reading Recent arachnid lifers & rarities

Fun With the Command Line

Lately I’ve been trying to learn more about Bash and command-line tools like curl and jq. It’s just fiddling around, but it’s fun and surprisingly addictive.

A few recent mini-projects:

You can’t spell “Toronto City Council” without “TTY”

Screenshot of the 2mmis.sh main menu and help

2mmis is a command-line interface for TMMIS, the Toronto City Council Meeting Management Information System. They revamped the site earlier this year; the front end still isn’t terribly impressive, but on the back end, they’ve implemented an (apparently undocumented) API that serves data in JSON format.

At first I thought about using it to generate simple static web pages with meeting and agenda data, but it was less complicated to make something completely terminal-based. It can show you monthly schedules, committee information, meeting agendas, and more. It’s just curl, jq, and a lot of printf statements, basically.

Party like it’s 1199

Screenshot of temporal-hours.sh help and clock output

Recently, with the clocks “falling back”, there was a lot of the usual Discourse on fedi (as I’m sure there was on other social media) about Daylight Savings Time and what would be better, and I felt compelled to remind people of how they did it in medieval Europe (among other premodern societies): the night and day were each divided into twelve hours, no matter how long they were. This meant that in more northerly latitudes, during the winter nighttime hours would be longer than daytime hours, and vice versa during summer.

It’s obviously completely unfeasible in this age of time zones and rapid travel, but just for kicks, temporal-hours.sh calculates the hour according to this system based on your geographic location. It uses jq and the SunriseSunset.io API to find sunrise and sunset times for your location, then just calculates the length of the night and day and divides each by 12. You can turn it into a little clock running in your terminal by calling it with watch, and be on medieval time all the time.

“Hacking” Metazooa

The Metazooa game screen appears "torn away" to reveal a diagram of the phylogenetic tree underneath.

Metazooa is a fun Wordle-style guessing game where you try to narrow down the mystery animal based on its phylogenetic relationship to the species you guessed. My only gripe is that the set list of species you can choose from is very biased towards mammals and vertebrates in general. Like, there’s three species of Equus alone (horses, zebras, and donkeys), but only four species of arachnids!

I tried looking at the various scripts to see how it worked, but they’re all heavily obfuscated. However, a list of all the common names you can guess, plus the scientific name of the mystery animal, is right there in the web page’s source code when you load a new game! So I put together this script which uses curl, grep and sort to load thousands of Metazooa practice games, grab each mystery animal’s name, and delete the dupes to produce a list of all the possible species. Then I plugged it into NCBI’s Common Tree generator to produce the complete phylogenetic tree. The repo also includes the complete list of common names and the scientific names they correspond to.


I’m just a beginner at this, so the code is not that good. If you see room for improvement or want to offer some helpful hints, leave a comment—or make a pull request or issue on Codeberg!