Deploy Misskey — Self-Hosted Fediverse Social Server
Self-host Misskey — decentralized microblogging on the Fediverse
Misskey
Just deployed
/misskey/files
Just deployed
/var/lib/postgresql/data
Redis
Just deployed
/data
Deploy and Host Misskey on Railway
Misskey is an open-source, decentralized microblogging platform on the Fediverse — a feature-rich alternative to Mastodon and Twitter/X where you run your own instance, own your data, and federate with the wider ActivityPub network. Reactions, custom emoji, a rich timeline, Pages, Play (mini-apps), and Drive file storage give it a more playful, customizable feel than most Fediverse servers. This template deploys the full three-service stack — Misskey, PostgreSQL, and Redis — wired for Railway.
What This Template Deploys
| Service | Purpose |
|---|---|
| Misskey | The social server, web client, and ActivityPub federation on port 3000 |
| PostgreSQL | Posts, users, follows, and all instance data |
| Redis | Job queue and caching — required, not optional |
All three run on Railway's private network. Redis and Postgres are never publicly exposed, and persistent volumes hold the database and uploaded files.
About Hosting
Misskey is a Node.js application with two hard requirements on Railway that determine whether a deployment works — both handled here.
Redis is mandatory, not an optimization. Misskey uses Redis for its background job queue (federation delivery, notifications, timeline fan-out) and caching. It won't run without a working Redis connection, which is why this is a three-service stack, not two. Both Postgres and Redis are provisioned and wired over the private network.
Misskey configures from a YAML file, which Railway can't mount directly. Normally Misskey reads its settings from /misskey/.config/default.yml — a file with the database, Redis, and URL configuration. Railway doesn't mount config files into containers, so this template generates default.yml at startup from Railway environment variables (database host, Redis host, instance URL, and credentials), bridging Misskey's file-based config to Railway's variable-based model. That translation is the piece a naive Misskey deployment on Railway gets stuck on.
The instance URL is effectively permanent. Misskey bakes the url into its federation identity — it's how other servers address your instance. Changing it after federation begins breaks those relationships, so set it to your final Railway domain (or a custom domain) before the first boot and leave it fixed.
First boot runs database migrations and takes a few minutes. Budget 2 GB RAM; federation and media processing are the main load drivers.
Typical cost: ~$10–15/month on Railway across the three services. Misskey is free and open source; you pay only for infrastructure.
How It Compares
| Misskey (self-hosted) | Mastodon | Bluesky | X (Twitter) | |
|---|---|---|---|---|
| Cost model | Flat ~$10–15/mo infra | Self-host or hosted | Managed | Ad / subscription |
| Federation | ActivityPub | ActivityPub | AT Protocol | None |
| Data ownership | Full — your instance | Full (if self-hosted) | Partial | None |
| Customization | Very high (emoji, themes, Play) | Moderate | Limited | None |
| Own your instance | Yes | Yes | No | No |
| Self-hostable | Yes | Yes | No | No |
Mastodon is the larger Fediverse server but heavier to run and less customizable. Bluesky is decentralized-ish but not truly self-hostable. Misskey's appeal is a rich, highly customizable ActivityPub instance — reactions, custom emoji, mini-apps, and a lively UX — fully under your control and federating with the wider network.
Deploy in Under 5 Minutes
- Click Deploy on Railway — Misskey, PostgreSQL, and Redis build automatically (first boot runs migrations, ~5 minutes)
- Set
MISSKEY_URLto your Railway public domain (or custom domain) — this is permanent, set it before first boot - Confirm the database and Redis reference variables are wired and volumes are mounted
- Open your domain and complete the initial admin setup to create the instance owner
- Configure your instance name, description, and registration settings, then invite users
Federation with other Fediverse servers begins automatically once your instance is live.
Common Use Cases
- Your own Fediverse instance — a self-owned microblogging server federating with Mastodon and the wider ActivityPub network
- Community or niche social server — a themed instance for a group, fandom, or organization with custom emoji and rules
- Twitter/X alternative you control — own your posts, timeline, and moderation instead of a corporate platform
- Creator or brand presence — a customizable, self-hosted home on the Fediverse with your own domain
- Fediverse experimentation — run Misskey's Play mini-apps, Pages, and API to build on ActivityPub
Configuration
| Variable | Required | Description |
|---|---|---|
MISSKEY_URL | Required | Your public HTTPS domain — permanent, baked into federation identity. Set before first boot |
DB_HOST | Auto-injected | PostgreSQL host via Railway reference variable |
DB_PORT | Auto-injected | PostgreSQL port |
DB_NAME | Auto-injected | Database name |
DB_USER | Auto-injected | Database user |
DB_PASS | Auto-injected | Database password |
REDIS_HOST | Auto-injected | Redis host via Railway reference variable |
REDIS_PORT | Auto-injected | Redis port |
MISSKEY_PORT | Pre-set | 3000 |
NODE_ENV | Pre-set | production |
MISSKEY_URLis permanent — set it right the first time. It's baked into your instance's federation identity. Changing it after other servers know you breaks federation, so use your final domain from the start.
Redis is required and volumes are essential. Misskey won't run without Redis. The Postgres volume holds your instance data and the files volume holds uploads — without them, a redeploy wipes your server.
Dependencies for Misskey Hosting
- Railway account — expect ~$10–15/month across the three services
- Persistent volumes for PostgreSQL and uploaded files (included)
- 2 GB RAM recommended for federation and media processing
- Optional: an S3-compatible object store for Drive file storage at scale
Deployment Dependencies
- Misskey GitHub Repository
- Misskey Hub (Admin Docs)
- Misskey Config Example
- Railway Volumes Documentation
Implementation Details
The template runs the official misskey/misskey image on port 3000 against a Railway PostgreSQL service and a Redis service, both on the private network. Because Misskey reads configuration from a default.yml file rather than environment variables, the template generates that file at container startup from Railway variables — database host and credentials, Redis host, and the instance URL — bridging Misskey's file-based config to Railway's variable model.
Redis is a hard dependency: Misskey's job queue (ActivityPub delivery, notifications, timeline fan-out) and caching run on it, and the app won't start without it. PostgreSQL holds all instance data and is backed by a persistent volume, and a second volume holds uploaded files under /misskey/files. On first boot Misskey runs its migrations, which is why the initial deploy takes a few minutes.
MISSKEY_URL is written into the config as the instance's canonical address. It's part of federation identity, so it must be set to the final domain before the instance federates and kept stable afterward. For larger instances, Drive storage can be pointed at S3-compatible object storage rather than the local files volume.
Frequently Asked Questions
Why does it need both Postgres and Redis? PostgreSQL stores all instance data; Redis runs the job queue and caching that Misskey depends on for federation, notifications, and timelines. Misskey won't start without Redis, so it's a required three-service stack.
Why can't I change the instance URL later? Misskey bakes the URL into its federation identity — it's how other servers address yours. Changing it after federation begins breaks those relationships. Set your final domain before first boot.
How does the config work without a YAML file to mount? Misskey normally reads default.yml, which Railway can't mount as a file. This template generates that config at startup from Railway environment variables, so you configure through the Variables tab instead.
Does my instance federate with Mastodon? Yes. Misskey speaks ActivityPub, so it federates with Mastodon, Pleroma, and other ActivityPub servers — users can follow and interact across instances.
Do my posts and files survive a redeploy? Yes. Posts and users live in PostgreSQL and uploads on the files volume, both persistent. Without the volumes, a redeploy would wipe them.
How much RAM does it need? 2 GB is a sensible minimum. Federation delivery and media processing drive memory use, so scale up as your instance and follower graph grow.
Can I customize the look and features? Extensively. Misskey supports custom emoji, themes, Pages, and Play mini-apps, which is a big part of why people choose it over other Fediverse servers.
Why Deploy Misskey 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 Misskey on Railway you get a full Fediverse instance with the hard parts solved — the file-based config bridged to Railway variables, Redis wired in as the required job queue, PostgreSQL and file volumes for persistence, and automatic HTTPS. Own your microblogging server, federate with the wider network, and keep your community's data on infrastructure you control.
Template Content