---
title: "Deploy flowcomments-template"
description: "Deploy Flowcomments (Instagram comment & DM automation) on Railway"
category: "Other"
url: https://railway.com/deploy/flowcomments-template
---

# Deploy flowcomments-template

Deploy Flowcomments (Instagram comment & DM automation) on Railway

**[Deploy flowcomments-template on Railway](https://railway.com/template/flowcomments-template)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/flowcomments-template/manifest.json

- **Creator:** Condev Software House
- **Category:** Other

## Template content

### flowcomments

- **Source:** https://github.com/NathanConde-dev/flowcomments
- **Health check:** /api/health
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

## Documentation

# 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](https://github.com/NathanConde-dev/flowcomments)
- Meta Developer App with Instagram messaging and comment permissions

### Deployment Dependencies

- [Flowcomments repository](https://github.com/NathanConde-dev/flowcomments) — app source and Dockerfile
- [Railway deploy guide](https://github.com/NathanConde-dev/flowcomments/blob/main/docs/RAILWAY_DEPLOY.md) — post-deploy checklist
- [Meta for Developers](https://developers.facebook.com/) — 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_URL` follows `RAILWAY_PUBLIC_DOMAIN`)
- Healthcheck on `/api/health` and restart policy for the app service
- Push-to-deploy from GitHub `main` after the template forks the project

## After Deploy

1. Open the public Railway URL and complete the setup wizard (`/setup`) — create the admin account and Meta App credentials.
2. Generate a public domain if the template did not assign one, then confirm `NEXT_PUBLIC_URL` matches `https://YOUR_DOMAIN`.
3. In Meta for Developers, set the webhook callback to:
   `https://YOUR_DOMAIN/api/webhook`
4. 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` |


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/flowcomments-template
