---
title: "Deploy GoToSocial"
description: "GoToSocial 0.22: lightweight ActivityPub server for the fediverse."
category: "Blogs"
url: https://railway.com/deploy/gotosocial
---

# Deploy GoToSocial

GoToSocial 0.22: lightweight ActivityPub server for the fediverse.

**[Deploy GoToSocial on Railway](https://railway.com/template/gotosocial)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/gotosocial/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Blogs

## Template content

### gotosocial https://codeberg.org/superseriousbusiness/gotosocial/raw/tag/v0.22.1/web/assets/logo.png

- **Image:** superseriousbusiness/gotosocial:0.22.1
- **Start command:** `sh -c 'G=/gotosocial/gotosocial; $G server start & pid=$!; trap "kill -TERM $pid; wait $pid; exit 0" TERM INT; (for i in $(seq 1 60); do sleep 3; out=$($G admin account create --username $ADMIN_USERNAME --email $ADMIN_EMAIL --password $ADMIN_PASSWORD 2>&1) && { $G admin account confirm --username $ADMIN_USERNAME && $G admin account promote --username $ADMIN_USERNAME; echo "[seed] admin $ADMIN_USERNAME created"; break; }; case "$out" in *already*|*taken*|*exists*) echo "[seed] admin already set up"; break;; esac; done) 2>&1 | grep seed & wait $pid'`
- **Health check:** /readyz
- **Public domain:** Yes

## Documentation

# Deploy and Host GoToSocial on Railway

GoToSocial is a lightweight ActivityPub server for the fediverse. It lets you run your own Mastodon-compatible account or small instance that follows and talks to people on Mastodon, Pixelfed, Akkoma and other servers. It has no built-in timeline UI; you use apps such as Phanpy, Elk, Tusky or Ivory.

## About Hosting GoToSocial

This template runs the official `superseriousbusiness/gotosocial:0.22.1` image as one service, with SQLite and media storage on a Railway volume. On first boot a seed step creates an admin account from the variables, confirms it and grants admin rights. Registration is closed, so the instance is yours until you open it. The server trusts Railway's proxy range, so rate limiting sees real client IPs. Important: the host name becomes part of every account address and can never change after you federate, so add your custom domain and set `GTS_HOST` before the first boot if you want one. It uses about 150 MB of memory.

## Common Use Cases

- A personal fediverse account on your own domain
- A small, invite-only instance for friends or a team
- An ActivityPub presence for a project or organisation

## Dependencies for GoToSocial Hosting

- `superseriousbusiness/gotosocial:0.22.1` (official image)
- A Railway volume at `/gotosocial/storage` for SQLite and media

### Deployment Dependencies

- [GoToSocial documentation](https://docs.gotosocial.org)
- [GoToSocial on Codeberg](https://codeberg.org/superseriousbusiness/gotosocial)
- [GoToSocial 0.22.1 release](https://codeberg.org/superseriousbusiness/gotosocial/releases/tag/v0.22.1)

### Implementation Details

| Service | Source | Networking | Storage |
| --- | --- | --- | --- |
| gotosocial | `superseriousbusiness/gotosocial:0.22.1` | public domain on 8080 | volume at `/gotosocial/storage` |

| Variable | Default | Purpose |
| --- | --- | --- |
| `GTS_HOST` | `${{RAILWAY_PUBLIC_DOMAIN}}` | Instance host (never change after federating) |
| `ADMIN_USERNAME` / `ADMIN_EMAIL` | `admin` / `admin@example.com` | Admin created on first boot |
| `ADMIN_PASSWORD` | generated | Its password |
| `GTS_ACCOUNTS_REGISTRATION_OPEN` | `false` | Closes public sign-up |
| `GTS_TRUSTED_PROXIES` | `100.64.0.0/10` | Railway's proxy range |
| `RAILWAY_RUN_UID` | `0` | Runs as root so the volume is writable |

Notes:

- Sign in from any Mastodon client with your instance URL, the admin email and password.
- The settings panel is at `/settings`.

This is a community-maintained deployment package and does not imply affiliation with or endorsement by the GoToSocial project.

## Why Deploy GoToSocial on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying GoToSocial on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Pixelfed](https://railway.com/deploy/OZSdEw) — Explore + Share beautiful photos and videos on the Fediverse
- [Hexo](https://railway.com/deploy/hexo) — Hexo — fast static blog framework with admin editor and S3 media storage
- [Bluesky PDS (Atproto Spaces Alpha)](https://railway.com/deploy/bluesky-pds-atproto-spaces-alpha) — "The Atproto Spaces Alpha" version of Bluesky PDS.

Open this page in a browser: https://railway.com/deploy/gotosocial
