Deploying a Typebot App
Introduction
Typebot lets you build conversational flows and embed them anywhere. This guide shows how to containerize Typebot with a Dockerfile, connect it to PostgreSQL and Redis, add optional storage, and deploy it to Klutch.sh over HTTP.
Prerequisites
- GitHub repository containing your Dockerfile.
- PostgreSQL database (managed or deployed separately).
- Redis instance for cache/queues.
- Klutch.sh project ready in klutch.sh/app.
Project structure
.└── DockerfileSample Dockerfile
FROM baptistearno/typebot:latest
# Default portENV PORT=3000EXPOSE 3000Required environment variables
DATABASE_URL– PostgreSQL connection string, e.g.,postgres://USER:PASSWORD@HOST:PORT/DBREDIS_URL– Redis connection string, e.g.,redis://:PASSWORD@HOST:6379NEXTAUTH_URL– public URL, e.g.,https://example-app.klutch.shNEXTAUTH_SECRET– strong secret for sessionsENCRYPTION_SECRET– strong secret for flow encryptionPORT– internal port (default3000)
Optional environment variables
STORAGE_LOCAL– set totrueto store assets locally.STORAGE_BUCKET/STORAGE_ENDPOINT/STORAGE_ACCESS_KEY_ID/STORAGE_SECRET_ACCESS_KEY– if using S3-compatible storage.NODE_ENV=production
Persistence
If using local storage, attach a volume:
- Mount path:
/app/storage - Size: based on expected assets/exports
Networking
- Protocol: HTTP
- Internal port:
3000 - Users reach
https://example-app.klutch.shwhile Klutch.sh routes to port3000inside the container.
Health check (recommended)
curl -I http://localhost:3000Deployment on Klutch.sh
- Push your Dockerfile to GitHub.
- In klutch.sh/app, create a new app and select GitHub as the source.
- Klutch.sh automatically detects the Dockerfile in the repository root.
- Choose HTTP traffic and set the internal port to
3000. - Add environment variables for
DATABASE_URL,REDIS_URL,NEXTAUTH_URL,NEXTAUTH_SECRET, andENCRYPTION_SECRET. Mark secrets as sensitive. - Optionally attach a persistent volume at
/app/storageif storing assets locally. - Deploy. After the app starts, sign in and create your first bot.
Verification
-
UI: open
https://example-app.klutch.shand confirm the dashboard loads. -
Quick API check (if applicable):
Terminal window curl -I https://example-app.klutch.sh
Next steps
- Configure custom domains and email providers.
- Enable object storage for better scalability if you handle large assets.
- Set up backups for PostgreSQL and Redis snapshots.