Deploy Postmill

Self-hosted AI social media scheduler. Open-source Buffer alternative.

Deploy Postmill

Just deployed

/data

/var/lib/postgresql/data

Just deployed

/uploads

Deploy and Host Postmill on Railway

Deploy 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.app domain, 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: /uploads for uploaded media)

Deployment Dependencies

Implementation Details

Environment variables (use Railway reference syntax when deploying):

VariableValue
MAIN_URLhttps://${{RAILWAY_PUBLIC_DOMAIN}}
FRONTEND_URLhttps://${{RAILWAY_PUBLIC_DOMAIN}}
NEXT_PUBLIC_BACKEND_URLhttps://${{RAILWAY_PUBLIC_DOMAIN}}/api
BACKEND_INTERNAL_URLhttp://localhost:3000
PORT3000
JWT_SECRET${{secret(64)}}
DATABASE_URL${{Postgres.DATABASE_URL}}
REDIS_URL${{Redis.REDIS_URL}}
UPLOAD_DIRECTORY/uploads
DISABLE_REGISTRATIONfalse

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:

  1. Add your custom domain to the Postmill service (target port 5000). RAILWAY_PUBLIC_DOMAIN will pick it up after a redeploy.
  2. Open https://your-domain/auth/login, create your account and sign in.
  3. Set DISABLE_REGISTRATION=true to 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

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
121
View Template
Evolution API with n8n
Automate WhatsApp workflows with Evolution API, n8n, and Postgres.

codestorm
113
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
867