# How to Deploy Flowise LLM App Builder
Flowise is an open-source, drag-and-drop builder for LLM apps — chatbots, RAG pipelines, agents — assembled visually from nodes. The hosted demo is fine for tinkering, but self-hosting gives you control over data, credentials, and the API your apps call. This guide deploys Flowise properly so your work doesn't evaporate on restart.
The mistake: running Flowise with default storage
Out of the box, Flowise uses a local SQLite file. In a containerized deployment the filesystem is ephemeral, so every redeploy wipes your chatflows, credentials, and chat history. The fix is to point Flowise at an external database. Flowise supports PostgreSQL and MySQL via environment variables — exactly what a managed database platform provides.
Configure Flowise for production
Flowise is configured almost entirely through environment variables:
# Database (use managed Postgres)
DATABASE_TYPE=postgres
DATABASE_HOST=<host>
DATABASE_PORT=5432
DATABASE_NAME=<db>
DATABASE_USER=<user>
DATABASE_PASSWORD=<password>
# Authentication — never run Flowise open to the internet
FLOWISE_USERNAME=admin
FLOWISE_PASSWORD=<strong-password>
# Encryption key for stored credentials (set this explicitly!)
FLOWISE_SECRETKEY_OVERWRITE=<random-32-byte-secret>
PORT=3000Two settings people forget:
FLOWISE_USERNAME/FLOWISE_PASSWORDgate the editor. Without them, anyone who finds your URL can edit flows and read your API keys.FLOWISE_SECRETKEY_OVERWRITEis the key Flowise uses to encrypt stored credentials. If you don't set it explicitly, a regenerated key on redeploy makes previously stored credentials undecryptable.
Containerize
Flowise publishes an official image, so the Dockerfile is thin:
FROM flowiseai/flowise:latest
EXPOSE 3000
CMD ["flowise", "start"]Or run the published image directly if your platform lets you deploy from an image reference.
Deploy on PandaStack
- 1Provision a managed PostgreSQL (14.x or 16.x). PandaStack auto-wires
DATABASE_URL, and you can read host/port/name/user/password from it to populate the FlowiseDATABASE_*vars. - 2Create a container app in the [dashboard](https://dashboard.pandastack.io) from the Flowise image or a repo containing the Dockerfile above. It builds via rootless BuildKit and serves an HTTPS URL with automatic SSL.
- 3Set the env vars above, including auth and the secret key, as encrypted environment variables.
- 4Open the HTTPS URL, log in, and build your chatflows. They now persist in your managed Postgres.
Why a managed DB matters here
| Without external DB | With managed Postgres |
|---|---|
| Flows lost on redeploy | Flows persist |
| No multi-replica support | Shared state across replicas |
| Manual backups | Scheduled + manual backups |
Because PandaStack databases include scheduled and manual backups, your visually built pipelines are backed up like any other data — no extra work.
Using the API
Once a chatflow works in the editor, Flowise exposes it as an API endpoint. You call it from your app:
curl https://<flowise-app>/api/v1/prediction/<chatflow-id> \
-H 'Authorization: Bearer <flowise-api-key>' \
-H 'Content-Type: application/json' \
-d '{"question": "What is your refund policy?"}'Generate API keys inside Flowise and treat them as secrets. This is the bridge from visual building to a real integration.
Operational tips
- LLM provider keys: store OpenAI/Anthropic/etc. credentials inside Flowise's credential store (encrypted with your secret key), not in plaintext config.
- Resource sizing: Flowise itself is modest, but flows that load large documents or run embeddings want a memory-optimized tier. Start small and scale up.
- Scale-to-zero caveat: on the free tier, an idle instance cold-starts on the next request. For an internal tool that's acceptable; for a customer-facing chatbot, keep an instance warm on a paid tier.
- Updates: pin a specific Flowise image tag rather than
latestso a redeploy doesn't silently pull a breaking version.
Verify
After deploy, log in, create a trivial chatflow (LLM node + chat input/output), redeploy the app, and confirm the flow is still there. That round-trip proves your database persistence is wired correctly — the whole point of self-hosting.
References
- [Flowise documentation](https://docs.flowiseai.com/)
- [Flowise: Database configuration](https://docs.flowiseai.com/configuration/databases)
- [Flowise: Authorization](https://docs.flowiseai.com/configuration/authorization)
- [Flowise GitHub](https://github.com/FlowiseAI/Flowise)
Self-hosting Flowise is mostly about persistence and auth — get those right and you have a private, durable LLM app builder. PandaStack's managed Postgres (with backups) and encrypted env vars make it a two-step deploy. Try it on the free tier at [dashboard.pandastack.io](https://dashboard.pandastack.io).