---
title: "Deploy WriteFreely — Self-Hosted Federated Blog"
description: "Self-host WriteFreely — minimalist blogging on the fediverse"
category: "Blogs"
url: https://railway.com/deploy/writefreely-fediverse-blog
---

# Deploy WriteFreely — Self-Hosted Federated Blog

Self-host WriteFreely — minimalist blogging on the fediverse

**[Deploy WriteFreely — Self-Hosted Federated Blog on Railway](https://railway.com/template/writefreely-fediverse-blog)**

- **Creator:** SilverBanana
- **Category:** Blogs

## Template content

### WriteFreely https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/writefreely-light.svg

- **Image:** algernon/writefreely:0.16.0-1

## Documentation

# Deploy and Host WriteFreely on Railway

WriteFreely is a clean, minimalist, open-source blogging platform — the engine behind Write.as — built for writers who want a distraction-free space to publish, with no ads, no tracking, and no algorithm. Its standout feature is native ActivityPub federation: your blog is part of the fediverse, so people on Mastodon and other platforms can follow it directly. This template deploys WriteFreely with SQLite on a persistent volume and federation enabled, so you own your writing space and publish in minutes.

---

## What This Template Deploys

| Service | Purpose |
| --- | --- |
| **WriteFreely** | The blogging platform, editor, and ActivityPub server (Go) |

A single lightweight service — no separate database. WriteFreely uses SQLite stored on a persistent volume at `/data`, which also holds its configuration, so your posts and settings survive redeploys and backups are a single file.

---

## About Hosting

WriteFreely is simple to run, and one behavior is worth understanding to configure it correctly — this template handles it.

**Federation is the differentiator — your blog joins the fediverse.** With `WRITEFREELY_FEDERATION=true` (on by default), your blog is discoverable across the fediverse: Mastodon users and others can follow `@blogname@your-domain` and get your posts in their feed. This is what sets WriteFreely apart from Ghost or WordPress — you're not just publishing a site, you're publishing into a decentralized social network, reaching readers where they already are.

**Environment variables configure the first boot only.** This is the key thing to know: WriteFreely's environment variables are used to build its `config.ini` on the *first* start. Once that file exists on the volume, the env vars are ignored — later changes to them have no effect. So set your admin user, site name, and federation options correctly at first deploy; to change them afterward, edit `config.ini` on the volume directly. Getting this right upfront avoids the "I changed the variable but nothing happened" confusion.

**SQLite on the volume — simple and durable.** WriteFreely uses SQLite by default, the recommended choice for personal and small-to-medium blogs: no separate database service, and backups are a single file on the `/data` volume. Posts, users, and config all live there and survive redeploys. (MySQL is supported via a custom `config.ini` if you later need it.)

**Set your admin account and site name.** `WRITEFREELY_ADMIN_USER` and `WRITEFREELY_ADMIN_PASSWORD` create your administrator (who is also the editor on single-user instances), and `WRITEFREELY_SITE_NAME` sets your blog's title. After deploy, visit `/login` and sign in with those credentials to start writing.

**Single-user or a community.** Run it as a personal single-user blog, or open it up: `WRITEFREELY_SINGLE_USER=false` with registration or invites lets you host a small community of writers on one instance, each with their own blog and fediverse handle.

Typical cost: **~$5/month** on Railway — WriteFreely is remarkably light. It's AGPL-licensed and free, with automatic HTTPS through Railway's edge.

---

## How It Compares

| | WriteFreely (self-hosted) | Medium | Ghost | WordPress |
| --- | --- | --- | --- | --- |
| Focus | Minimalist writing | Publishing platform | Publishing + newsletter | Everything |
| Federation (fediverse) | Native ActivityPub | No | Partial | Plugin |
| Ads / tracking | None | Some | None | Varies |
| Footprint | Very light | N/A | Moderate | Heavier |
| Data ownership | Full — your infra | Vendor | Self or vendor | Full |
| Self-hostable | Yes | No | Yes | Yes |

Medium owns your audience and shows its own prompts. Ghost is excellent but heavier and newsletter-focused. WordPress does everything but is large and plugin-dependent. WriteFreely's edge is doing one thing beautifully — clean, fast, distraction-free writing — with native fediverse federation so your blog reaches Mastodon and beyond, self-hosted at flat cost with your words on infrastructure you own.

---

## Deploy in Under 5 Minutes

1. Click **Deploy on Railway** — WriteFreely builds with a volume for data and config (~2 minutes)
2. Set `WRITEFREELY_ADMIN_USER`, `WRITEFREELY_ADMIN_PASSWORD`, and `WRITEFREELY_SITE_NAME` before first boot
3. Confirm federation and single-user settings are how you want them (they lock in at first boot)
4. Open your Railway domain, then visit `/login` and sign in with your admin credentials
5. Write your first post and publish — it's live and discoverable on the fediverse

To change settings later, edit `config.ini` on the volume, since env vars only apply on first boot.

---

## Common Use Cases

- **Personal blog** — a clean, ad-free space to write, owned entirely by you
- **Fediverse-native publishing** — reach Mastodon and the wider fediverse directly from your blog
- **Small writing community** — host multiple writers on one instance, each with their own blog
- **Privacy-first publishing** — no ads, no tracking, no algorithm between you and your readers

---

## Configuration

| Variable | Required | Description |
| --- | --- | --- |
| `WRITEFREELY_ADMIN_USER` | Required | Administrator username (also editor on single-user instances) |
| `WRITEFREELY_ADMIN_PASSWORD` | Required | Administrator password — set a strong value |
| `WRITEFREELY_SITE_NAME` | Recommended | Your blog's title, also used in federation |
| `WRITEFREELY_FEDERATION` | Pre-set | `true` — ActivityPub federation on by default |
| `WRITEFREELY_SINGLE_USER` | Optional | `false` to run a multi-writer community instance |
| Storage volume | Pre-set | Persistent volume at `/data` for the SQLite database and config |

> **Env vars apply on first boot only.** They build `config.ini` on first start and are then ignored — set your admin, site name, and federation options correctly at deploy, and edit `config.ini` on the volume to change them later.

> **Your data is one file on the volume.** SQLite and config live at `/data`, so posts and settings persist across redeploys and backups are a single file. Set a strong admin password.

---

## Dependencies for WriteFreely Hosting

- Railway account — ~$5/month for the lightweight service
- A persistent Railway volume at `/data` for the database and config (included)
- Nothing else for SQLite mode — no separate database service required
- Optional: a MySQL service and custom `config.ini` for larger multi-user instances

### Deployment Dependencies

- [WriteFreely GitHub Repository](https://github.com/writefreely/writefreely)
- [WriteFreely Documentation](https://writefreely.org/docs)
- [WriteFreely Federation Guide](https://writefreely.org/docs/latest/admin/federation)
- [Railway Volumes Documentation](https://docs.railway.com/volumes)

### Implementation Details

The template runs WriteFreely, a lightweight Go application, as a single service using SQLite stored on a persistent volume at `/data`, which also holds the generated `config.ini`. On first boot, the `WRITEFREELY_*` environment variables are used to construct that configuration file — admin credentials, site name, federation, single-user mode, registration, and invites — after which the file persists on the volume and the environment variables are no longer consulted; subsequent changes must be made by editing `config.ini` directly.

ActivityPub federation is enabled by default (`WRITEFREELY_FEDERATION=true`), so blogs are discoverable across the fediverse and followable from Mastodon and other platforms at `@blogname@your-domain`. Railway provides the public domain and automatic HTTPS at its edge. WriteFreely can run as a single-user personal blog or, with single-user mode disabled and registration or invites enabled, as a small multi-writer community, each writer with their own blog and fediverse handle.

SQLite is the default and recommended database for personal and small-to-medium instances, needing no separate service and making backups a single file; MySQL is supported through a custom `config.ini` for larger deployments. All posts, users, and configuration on the volume are the components to back up.

---

## Frequently Asked Questions

**How does federation work?** With federation enabled by default, your blog joins the fediverse — Mastodon users and others can follow `@blogname@your-domain` and see your posts in their feed. It's what makes WriteFreely more than a standalone blog.

**Why didn't changing an environment variable do anything?** WriteFreely's env vars only build `config.ini` on the first boot; after that they're ignored. To change settings later, edit `config.ini` on the volume directly. Set things correctly at first deploy.

**Which database does it use?** SQLite by default, stored on the `/data` volume — no separate database service, and backups are a single file. MySQL is supported via a custom `config.ini` if you need it for a larger instance.

**Do my posts persist?** Yes — the SQLite database and configuration live on the persistent volume, so your posts, users, and settings survive redeploys. Back up the volume to preserve everything.

**How do I log in?** After deploy, visit `/login` and sign in with the `WRITEFREELY_ADMIN_USER` and `WRITEFREELY_ADMIN_PASSWORD` you set. On single-user instances, the admin is also the editor.

---

## Why Deploy WriteFreely 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 WriteFreely on Railway you get a clean, federated blog with the setup handled — SQLite on a persistent volume, federation enabled, the admin account configured, and automatic HTTPS. A minimalist, ad-free writing space that reaches the fediverse, self-hosted on infrastructure you own.

## Similar templates

- [Pixelfed](https://railway.com/deploy/OZSdEw) — Explore + Share beautiful photos and videos on the Fediverse
- [Hexo](https://railway.com/deploy/hexo) — Self-hosted Hexo blog with editor, comments, and S3 storage
- [NodeBB](https://railway.com/deploy/nodebb) — Node.js based forum software built for the modern web

Open this page in a browser: https://railway.com/deploy/writefreely-fediverse-blog
