Deploy Typebot
Self-hosted chatbot builder with a visual drag-and-drop editor
Just deployed
valkey
Just deployed
/data
Just deployed
/var/lib/postgresql/data
Just deployed
Deploy and Host Typebot on Railway
Typebot is an open-source chatbot builder: you assemble conversational flows in a drag-and-drop editor and publish them as a standalone page, an embedded widget or a chat bubble on your site. It handles branching logic, variables, input validation, payments and integrations, and collects every response for you to export.
About Hosting Typebot
Typebot is two applications, not one. The builder is the editor you log into; the viewer is the public runtime your visitors reach. They are deployed separately and given separate URLs, because the builder should sit behind your login while the viewer is meant to be open to the world. This template deploys both, along with Postgres for flows and results and Valkey for sessions. File uploads are off by default — see below for why, and how to switch them on.
Read this before you deploy: how you log in
This is the part that catches people, so it is worth being blunt about.
Typebot has no username-and-password login and no default admin account. It only offers the sign-in methods whose credentials are set, so with none of the options below configured the builder deploys fine but shows no way to sign in at all, including for you. Set one before your first visit.
Railway blocks outbound SMTP on the Free, Trial and Hobby plans, so emailed magic links only work on Pro. You have two options:
- Sign in with GitHub or Google instead. Set
GITHUB_CLIENT_IDandGITHUB_CLIENT_SECRET, orGOOGLE_AUTH_CLIENT_IDandGOOGLE_AUTH_CLIENT_SECRET, and that provider appears on the sign-in page. This works on every plan, because it needs no email. Point the OAuth app's callback athttps:///api/auth/callback/github(or.../google). - Use email sign-in on a Pro plan. Add
SMTP_HOST,SMTP_PORT,SMTP_USERNAME,SMTP_PASSWORDandNEXT_PUBLIC_SMTP_FROM(your sender address, such asbot@yourdomain.com) to the builder. Email sign-in only appears onceNEXT_PUBLIC_SMTP_FROMis set. Transactional providers like Resend, SendGrid or Postmark all work.
Add ADMIN_EMAIL to the builder with the address you will sign in with — that account becomes the administrator and is exempt from workspace limits.
Common Use Cases
- Lead qualification forms that feel like a conversation instead of a wall of fields
- Customer onboarding and product recommendation quizzes
- Support triage that collects context before handing off to a human
- Booking and registration flows embedded in an existing site
- Surveys where branching logic decides what gets asked next
Dependencies for Typebot Hosting
- Postgres — flows, workspaces, submitted results
- Valkey — session storage for in-progress conversations
- An external S3 bucket, only if you want file uploads — not provisioned here; see the file-uploads section below
- A sign-in method — OAuth credentials, or SMTP on a Pro plan. See above.
Deployment Dependencies
Implementation Details
The builder and viewer run the same pinned version (3.19.1) and must stay in step — a viewer older than the builder can fail to render blocks the builder knows about. NEXT_PUBLIC_VIEWER_URL tells the builder where published bots live, and NEXTAUTH_URL must match the builder's own public URL or sign-in callbacks break.
ENCRYPTION_SECRET encrypts the credentials your flows store for third-party integrations. It is generated at deploy time. Rotating it makes every saved integration credential unreadable, so leave it alone once bots are live.
File uploads need a bucket that Railway cannot provide. Typebot stores
uploaded images and files under a public/ prefix and serves them to bot
visitors by direct URL, so its documentation requires two things on the bucket:
an access policy granting anonymous s3:GetObject on public/*, and a CORS
rule allowing PUT from any origin.
Railway buckets support neither — public access is not available and bucket
policies have no effect, so an anonymous read returns AccessDenied. A Railway
bucket would accept the files and then fail to show them to anyone visiting your
bot. Rather than ship that, this template leaves S3 unset, which simply disables
the upload feature; everything else works.
To enable uploads, point Typebot at Cloudflare R2, Amazon S3, Backblaze B2 or any S3-compatible store you can set a policy on, and add to both the builder and the viewer:
S3_ACCESS_KEY=...
S3_SECRET_KEY=...
S3_BUCKET=your-bucket
S3_ENDPOINT=s3.your-provider.com # bare hostname, no https://
S3_PORT=443
S3_SSL=true
S3_REGION=auto
S3_ENDPOINT must be a hostname — Typebot’s S3 client rejects a full URL.
DISABLE_SIGNUP=false lets anyone who reaches the builder create an account. Once your own account exists, set it to true — otherwise the builder URL is an open registration page. New accounts get the UNLIMITED workspace plan by default (DEFAULT_WORKSPACE_PLAN), so close sign-ups as soon as your own account exists.
Upgrades
The builder and viewer are pinned to Typebot 3.19.1. Upgrade both together by bumping both image tags at once, and back up Postgres first — new versions migrate the database on start.
Backups
Bots, results and users live in Postgres. Turn on volume backups for the Postgres service (its volume's Backups tab) and keep a recent pg_dump outside Railway, since Railway backups restore only within the same project.
Why Deploy Typebot 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 Typebot 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
