Deploy flowcomments-template
Deploy Flowcomments (Instagram comment & DM automation) on Railway
flowcomments
Just deployed
Just deployed
/var/lib/postgresql/data
Redis
Just deployed
/data
Deploy and Host Flowcomments on Railway
Flowcomments is source-available Instagram comment and DM automation. Deploy the self-host core on Railway in one click: web app, background worker, PostgreSQL, and Redis.
About Hosting Flowcomments on Railway
This template provisions:
- App — Next.js + Prisma, built from the GitHub Dockerfile (web + worker in one service)
- PostgreSQL — managed database (
DATABASE_URL) - Redis — managed queue for automations (
REDIS_URL)
On first boot the container runs prisma migrate deploy, starts the web server, and starts the worker when REDIS_URL is set.
Public networking and a healthcheck on /api/health are included. After deploy, complete the setup wizard and point the Meta webhook at your Railway domain.
Common Use Cases
- Self-host Instagram comment-to-DM automation without managing Postgres/Redis yourself
- Run a private Flowcomments instance for a brand or agency with encrypted credentials
- Spin up a staging environment that mirrors production (app + worker + databases)
Dependencies for Flowcomments Hosting
- Railway account (Hobby plan recommended for always-on Redis + Postgres)
- GitHub access to clone/deploy NathanConde-dev/flowcomments
- Meta Developer App with Instagram messaging and comment permissions
Deployment Dependencies
- Flowcomments repository — app source and Dockerfile
- Railway deploy guide — post-deploy checklist
- Meta for Developers — App credentials and webhook configuration
Why Deploy Flowcomments on Railway
- One-click stack with databases already wired via variable references
- HTTPS public domain out of the box (
NEXT_PUBLIC_URLfollowsRAILWAY_PUBLIC_DOMAIN) - Healthcheck on
/api/healthand restart policy for the app service - Push-to-deploy from GitHub
mainafter the template forks the project
After Deploy
- Open the public Railway URL and complete the setup wizard (
/setup) — create the admin account and Meta App credentials. - Generate a public domain if the template did not assign one, then confirm
NEXT_PUBLIC_URLmatcheshttps://YOUR_DOMAIN. - In Meta for Developers, set the webhook callback to:
https://YOUR_DOMAIN/api/webhook - Connect Instagram under Settings → Instagram.
Environment Variables
| Variable | Source |
|---|---|
DATABASE_URL | ${{Postgres.DATABASE_URL}} |
REDIS_URL | ${{Redis.REDIS_URL}} |
NEXT_PUBLIC_URL | https://${{RAILWAY_PUBLIC_DOMAIN}} |
ENCRYPTION_KEY | generated secret |
SESSION_SECRET | generated secret |
RUN_WORKER | true |
Template Content
flowcomments
NathanConde-dev/flowcommentsRUN_WORKER
PGDATA
PGPORT
POSTGRES_DB
POSTGRES_USER
SSL_CERT_DAYS
RAILWAY_DEPLOYMENT_DRAINING_SECONDS
Redis
redis:8.2REDISPORT
REDISUSER
