Deploy Postmill
Self-hosted AI social media scheduler. Open-source Buffer alternative.
Redis
Just deployed
/data
Just deployed
/var/lib/postgresql/data
Postmill
Just deployed
/uploads
Deploy and Host Postmill on Railway
Postmill is an open-source, self-hosted social media management platform. Schedule and publish posts across multiple social networks, generate content with AI, organize media, and collaborate with your team—all from a single dashboard, as an alternative to Buffer and Hootsuite where you own your data.
About Hosting Postmill
Hosting Postmill requires a PostgreSQL database for persistence (users, workspaces, channels, posts, schedules), Redis for queues and caching, and a persistent volume for uploaded media. The all-in-one container bundles the frontend, backend API and background workers behind an internal nginx listening on port 5000. Database migrations run automatically as a pre-deploy step. Social channels and AI providers are configured inside the app, so no API keys are needed at deploy time. Railway provisions all services and handles networking, SSL, and scaling.
⚠️ Custom domain required: Postmill's session cookie doesn't work on the default
*.up.railway.appdomain, so login will fail there. Add a custom domain (e.g.postmill.yourdomain.com) to the Postmill service before creating your account.
Common Use Cases
- Scheduling and publishing posts across multiple social networks
- AI-assisted content creation and repurposing
- Social media management for agencies and multiple brands
- Team collaboration without per-seat SaaS pricing
Dependencies for Postmill Hosting
- PostgreSQL 17 (persistence for users, channels, posts and schedules)
- Redis (queues and caching)
- Persistent volume (mount path:
/uploadsfor uploaded media)
Deployment Dependencies
Implementation Details
Environment variables (use Railway reference syntax when deploying):
| Variable | Value |
|---|---|
MAIN_URL | https://${{RAILWAY_PUBLIC_DOMAIN}} |
FRONTEND_URL | https://${{RAILWAY_PUBLIC_DOMAIN}} |
NEXT_PUBLIC_BACKEND_URL | https://${{RAILWAY_PUBLIC_DOMAIN}}/api |
BACKEND_INTERNAL_URL | http://localhost:3000 |
PORT | 3000 |
JWT_SECRET | ${{secret(64)}} |
DATABASE_URL | ${{Postgres.DATABASE_URL}} |
REDIS_URL | ${{Redis.REDIS_URL}} |
UPLOAD_DIRECTORY | /uploads |
DISABLE_REGISTRATION | false |
Volume: Mount /uploads for persistent media.
Networking: Public domain targets port 5000 (nginx routes /api to the backend on :3000 and everything else to the frontend on :4200). PORT must stay 3000, since it's the backend's internal port.
Pre-deploy command (applies Prisma migrations):
/app/node_modules/.bin/prisma migrate deploy --schema /app/libraries/nestjs-libraries/src/database/prisma/schema.prisma
After deploying:
- Add your custom domain to the Postmill service (target port
5000).RAILWAY_PUBLIC_DOMAINwill pick it up after a redeploy. - Open
https://your-domain/auth/login, create your account and sign in. - Set
DISABLE_REGISTRATION=trueto keep your instance private.
Why Deploy Postmill 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 Postmill 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.
Template Author
Created and maintained by Douglas Rubim.
GitHub: https://github.com/douglasrubims
Template Content