
Deploy Flowise with postgres
Flowise with Postgres, web UI, auth, and persistent file storage.
flowiseai
Just deployed
/root/.flowise
Just deployed
/var/lib/postgresql/data
Deploy and Host Flowise with Postgres on Railway
Flowise with Postgres is a low-code AI agent and LLM workflow platform powered by the prebuilt Flowise Docker image and a PostgreSQL database. It provides a drag-and-drop web UI for building AI agents, chatbots, RAG pipelines, and automation workflows, while Postgres stores application data in a more production-ready database layer.

About Hosting Flowise with Postgres
Deploying Flowise with Postgres on Railway uses the official Flowise Docker image together with Railway PostgreSQL. Railway runs the Flowise web UI on port 3000, provisions a Postgres database, handles networking between services, and exposes the application through a public Railway domain or custom domain. Flowise uses Postgres for database-backed application data, while a Railway Volume mounted at /root/.flowise keeps local files, API keys, logs, secret files, and uploaded storage available across restarts and redeployments. This setup is better suited for users who want a more durable Flowise deployment than a simple local-file-only setup.
Note This template uses the prebuilt Flowise Docker image and Railway PostgreSQL, so deployment is usually faster than building Flowise from the GitHub repository while still providing a more production-ready database setup.
Common Use Cases
- Building AI agents, chatbots, and LLM workflows with a visual web UI
- Running Flowise with PostgreSQL-backed application data
- Prototyping RAG pipelines with document loaders, embeddings, and vector stores
- Creating internal automation tools that connect LLMs, APIs, memory, and custom logic
- Hosting a more durable Flowise setup with database storage and persistent file storage
Dependencies for Flowise with Postgres Hosting
- Official Flowise Docker image:
flowiseai/flowise:latest - Railway PostgreSQL database service
- Public HTTP access through Railway on port
3000 - Railway Volume mounted at
/root/.flowisefor persistent file storage - Default dashboard credentials using
FLOWISE_USERNAME=adminandFLOWISE_PASSWORD=admin123
Deployment Dependencies
- Flowise GitHub repository: https://github.com/FlowiseAI/Flowise
- Official Flowise Docker image: https://hub.docker.com/r/flowiseai/flowise
- Flowise documentation: https://docs.flowiseai.com
- Flowise environment variables: https://docs.flowiseai.com/configuration/environment-variables
- Railway PostgreSQL: https://docs.railway.com/guides/postgresql
- Railway Public Networking: https://docs.railway.com/networking/public-networking
- Railway Volumes: https://docs.railway.com/reference/volumes
- Railway CLI: https://docs.railway.com/guides/cli
- Railway SSH guide: https://docs.railway.com/guides/ssh
Environment Variables
Use the following environment variables for the Flowise service:
PORT="3000"
FLOWISE_USERNAME="admin"
FLOWISE_PASSWORD="admin123"
DATABASE_TYPE="postgres"
DATABASE_HOST="${{Postgres.PGHOST}}"
DATABASE_PORT="${{Postgres.PGPORT}}"
DATABASE_NAME="${{Postgres.PGDATABASE}}"
DATABASE_USER="${{Postgres.PGUSER}}"
DATABASE_PASSWORD="${{Postgres.PGPASSWORD}}"
PGSSLMODE="disable"
APIKEY_PATH="/root/.flowise"
SECRETKEY_PATH="/root/.flowise"
LOG_PATH="/root/.flowise/logs"
BLOB_STORAGE_PATH="/root/.flowise/storage"
Default login credentials:
Username: admin
Password: admin123
Users can change FLOWISE_USERNAME and FLOWISE_PASSWORD from Railway Variables before or after deployment. For public deployments, it is recommended to replace the default password with a stronger value before sharing the Flowise URL.
PostgreSQL Setup
This template expects a Railway PostgreSQL service to be available in the same project. The Flowise service connects to Postgres using Railway variable references:
DATABASE_HOST="${{Postgres.PGHOST}}"
DATABASE_PORT="${{Postgres.PGPORT}}"
DATABASE_NAME="${{Postgres.PGDATABASE}}"
DATABASE_USER="${{Postgres.PGUSER}}"
DATABASE_PASSWORD="${{Postgres.PGPASSWORD}}"
For Railway internal networking, this template uses:
PGSSLMODE="disable"
If you connect Flowise to an external PostgreSQL provider that requires SSL, change PGSSLMODE to require.
Public Web Access
Flowise with Postgres provides a browser-based web UI. After deployment, expose the Flowise service using Railway Public Networking and open the generated Railway domain or your custom domain in a browser.
Recommended port:
3000
The service should use:
PORT="3000"
Once the Railway domain is active, visit the public URL in your browser and log in using the configured FLOWISE_USERNAME and FLOWISE_PASSWORD values. The default credentials are admin and admin123, unless changed in Railway Variables.
Volume Setup
Mount a Railway Volume at:
/root/.flowise
Postgres stores Flowise database records, but the volume is still useful for local Flowise files such as API key files, secret files, logs, uploaded files, and blob storage. Keeping this volume mounted helps preserve file-based data across service restarts and redeployments.
SSH Usage
SSH is optional and mainly useful for diagnostics. Most users should access Flowise with Postgres through the public web UI instead.
Prerequisites
Ensure you have the necessary setup in place:
- The Railway CLI installed on your local machine
- Logged in with your Railway account using:
railway login
Usage
You can copy the exact SSH command directly from the Railway dashboard:
- Navigate to your project in the Railway dashboard.
- Right-click on the Flowise service you want to connect to.
- Select Copy SSH Command from the dropdown menu.
- Paste the command into your local terminal to connect to the running Flowise container.
Once connected, you can inspect files, review logs, check mounted storage, verify environment variables, test database connectivity, or debug your Flowise deployment from inside the container.
Implementation Details
This template deploys Flowise using the prebuilt official Flowise Docker image:
FROM flowiseai/flowise:latest
It also includes a Railway PostgreSQL service and configures Flowise to use it with:
DATABASE_TYPE="postgres"
This template includes default dashboard credentials so users can deploy quickly:
FLOWISE_USERNAME=admin
FLOWISE_PASSWORD=admin123
Users can change both values by editing Railway Variables before deployment or after the service is running.
For persistent file storage, mount the Railway Volume at /root/.flowise. PostgreSQL handles database-backed data, while the volume keeps local Flowise files available across restarts and redeployments.
Why Deploy Flowise with Postgres 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 Flowise with Postgres 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 Content
flowiseai
flowiseai/flowise