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.” 

My spidering kit

You don’t need a DSLR, professional science equipment, or even a really expensive smartphone to get up close with spiders (or any other bugs). I’ve been using my cheap-ass smartphone and gear cobbled together from the dollar store for years. So, here’s what I’m using right now, as well as some recommendations for other stuff I’ve used in the past. Continue reading My spidering kit

Recap: The 2018 City Manager’s Address

Photo from @imfgtoronto.

“The iceberg is gone, global warming has taken care of that,” jokes new City Manager Chris Murray as he begins his speech.

The iceberg, a municipal budget infographic portraying the City of Toronto’s billions of dollars in approved but unfunded capital projects, had become a cult favourite among City Hall wonks—you know, the kind of people who have cult favourite municipal budget infographics. These are the kind of people who go to the IMFG‘s annual City Manager’s Address, which took place at the end of November. (Slides available here.) Continue reading Recap: The 2018 City Manager’s Address

Nightmare Rectangle Round-up: Anti-Fascism, Tech, #Arachtober

Header: reproduction of a Jewish Labour Bund election poster from Ukraine. Description of the original: “Poster stating ‘There where we live, there is our country! A democratic republic! Full political and national rights for Jews! Ensure that the voice of the Jewish working class is heard at the constituent assembly!’ Kiev, ca. 1918. The poster further urges Jews to vote for the Bund candidates, Slate 9, in an election following the Russian revolution, when non-Bolshevik parties were still being tolerated by the Communist regime. From the Archives of the YIVO Institute for Jewish Research, New York.”

The second installation of links I’ve been reading/sharing/whatever. Continue reading Nightmare Rectangle Round-up: Anti-Fascism, Tech, #Arachtober