Deploy Typebot | Open-Source Typeform Alternative on Railway
Railway

Deploy Typebot | Open-Source Typeform Alternative on Railway

Self-host Typebot. Open-source advanced chatbot builder on Railway

Deploy Typebot | Open-Source Typeform Alternative on Railway

DBs

/var/lib/postgresql/data

Just deployed

/data

Just deployed

Just deployed

Typebot logo

Deploy and Host Typebot on Railway

Deploy Typebot on Railway to get a self-hosted, open-source chatbot builder with a visual drag-and-drop editor. Self-host Typebot to own your data, avoid per-chat pricing, and integrate AI-powered conversational flows into any website or WhatsApp channel.

This Railway template pre-configures Typebot Builder (the editor UI), Typebot Viewer (the bot runtime), PostgreSQL 16 for persistent storage, and Redis for caching — all wired together and ready to use.

Getting Started with Typebot on Railway

After deployment, open the Builder URL — you'll see the sign-in page. Typebot requires at least one authentication provider configured before you can sign in (see Configuring Authentication below). Once signed in, create a workspace, then click Create a typebot to open the visual flow editor. Drag blocks from the sidebar to build your first conversational flow — start with a Text block to greet users, add Input blocks to collect data, and use Logic blocks for branching. Click Publish to make your bot live on the Viewer URL.

The Viewer URL is the public-facing service where published bots run. You don't visit it directly — embed it on your website or share individual bot links with users.

Configuring Authentication for Typebot

Typebot requires at least one auth provider. The easiest options:

GitHub OAuth:

# 1. Go to https://github.com/settings/developers → New OAuth App
# 2. Set Homepage URL to your Builder URL
# 3. Set Authorization callback URL to:
#    https:///api/auth/callback/github
# 4. Add these env vars to typebot-builder:
GITHUB_CLIENT_ID="your-client-id"
GITHUB_CLIENT_SECRET="your-client-secret"

Email Magic Links (requires SMTP):

# Add these env vars to typebot-builder:
SMTP_HOST="smtp.example.com"
SMTP_PORT="587"
SMTP_USERNAME="[email protected]"
SMTP_PASSWORD="your-smtp-password"
NEXT_PUBLIC_SMTP_FROM="[email protected]"

After setting either provider, redeploy the builder service. Google OAuth, Facebook, Azure AD, and GitLab are also supported — see Typebot configuration docs.

About Hosting Typebot

Typebot is an open-source conversational form and chatbot builder with 9,500+ GitHub stars. It replaces static forms with engaging chat interfaces that achieve higher completion rates.

  • Visual drag-and-drop flow editor with 30+ block types
  • AI-ready: native OpenAI/LLM integration for intelligent responses
  • Embed anywhere: websites, WhatsApp, standalone pages
  • Conditional logic, variables, and branching for complex flows
  • Google Sheets, webhooks, Zapier, and Make integrations
  • Fair Source License (FSL) — free to self-host

The architecture is multi-service: the Builder (Next.js) handles bot creation and management, while the Viewer (Next.js) executes published bots for end users. Both share a PostgreSQL database and Redis cache layer.

Why Deploy Typebot on Railway

  • One-click deploy with PostgreSQL and Redis pre-configured
  • No per-chat or per-bot pricing — pay only for infrastructure
  • Full data ownership — conversations stay on your server
  • Scale builder and viewer independently
  • Private networking between services for security

Common Use Cases for Typebot

  • Lead qualification — Engage website visitors with conversational flows that qualify leads before routing to sales
  • Customer support — AI-powered chatbots that pull from knowledge bases and reduce ticket volume
  • Conversational surveys — Replace static forms with chat-based surveys for 2-3x higher completion rates
  • User onboarding — Interactive setup wizards with conditional branching based on user responses

Dependencies for Self-Hosted Typebot on Railway

  • typebot-builderbaptistearno/typebot-builder:3 (editor UI)
  • typebot-viewerbaptistearno/typebot-viewer:3 (bot runtime)
  • PostgreSQL 16 — Primary database for bots, workspaces, and conversation data
  • Redis — Caching layer for session data and rate limiting

Environment Variables Reference for Typebot

VariableServiceDescription
DATABASE_URLBuilder, ViewerPostgreSQL connection string
REDIS_URLBuilder, ViewerRedis connection string
ENCRYPTION_SECRETBuilder, Viewer32-char encryption key (must match)
NEXTAUTH_URLBuilder, ViewerBuilder's public URL
NEXTAUTH_SECRETBuilder, ViewerNextAuth session secret (must match)
NEXT_PUBLIC_VIEWER_URLBuilder, ViewerViewer's public URL
HOSTNAMEBuilder, ViewerMust be 0.0.0.0 for Railway
PORTBuilder, Viewer3000

Deployment Dependencies

Hardware Requirements for Self-Hosting Typebot

ResourceMinimumRecommended
CPU2 cores4 cores
RAM2 GB4 GB
Storage5 GB20 GB
RuntimeDocker / Node.js 24Docker Compose

PostgreSQL and Redis add ~512 MB RAM overhead. Builder and Viewer each use ~256-512 MB.

Self-Hosting Typebot with Docker Compose

Clone the repo and use the official Docker Compose setup:

git clone https://github.com/baptisteArno/typebot.io.git
cd typebot.io
cp .env.example .env
# Edit .env with your database URL, encryption secret, and auth provider
docker compose up -d

Or run with standalone Docker images:

docker run -d --name typebot-builder \
  -e DATABASE_URL="postgresql://user:pass@db:5432/typebot" \
  -e REDIS_URL="redis://redis:6379" \
  -e ENCRYPTION_SECRET="your-32-char-secret" \
  -e NEXTAUTH_URL="https://builder.example.com" \
  -e NEXT_PUBLIC_VIEWER_URL="https://bot.example.com" \
  -e NEXTAUTH_SECRET="your-session-secret" \
  -e HOSTNAME="0.0.0.0" \
  -p 3000:3000 \
  baptistearno/typebot-builder:3

Is Typebot Free to Self-Host?

Typebot is licensed under the Functional Source License (FSL) — free to self-host with no per-chat limits. The official cloud service starts at $39/month for 2,000 chats. Self-hosting on Railway costs only the infrastructure (~$5-15/month depending on usage). Premium features like WhatsApp integration and SSO require a paid license even when self-hosted.

Typebot vs Landbot vs Botpress

FeatureTypebotLandbotBotpress
Open sourceYes (FSL)NoYes (MIT)
Self-hostYesNoYes
Visual builderYesYesYes
AI/LLM supportYesLimitedYes
WhatsAppPaid tierYesYes
PricingFree self-hostFrom $45/moFree 500 msg/mo
Chat limitsUnlimited (self-host)Plan-basedPlan-based

Typebot's strength is its clean visual editor and full self-hosting support with no chat limits.

FAQ

What is Typebot and why self-host it? Typebot is an open-source chatbot and conversational form builder. Self-hosting gives you unlimited chats, full data ownership, and no monthly SaaS fees — you pay only for infrastructure.

What does this Railway template deploy for Typebot? It deploys four services: the Typebot Builder (editor UI), Typebot Viewer (bot runtime), PostgreSQL 16 (database), and Redis (caching). All services are wired together with private networking.

Why does Typebot need PostgreSQL and Redis on Railway? PostgreSQL stores all bot definitions, workspace data, and conversation results. Redis handles caching, rate limiting, and session storage for faster response times.

How do I configure authentication for self-hosted Typebot on Railway? Typebot requires at least one auth provider. Add GitHub OAuth credentials (GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET) or SMTP settings for email magic links to the builder service, then redeploy.

Can I embed self-hosted Typebot chatbots on my website? Yes. After publishing a bot in the Builder, use the embed code (script tag or iframe) with your Viewer URL. Typebot supports standard embed, popup, and bubble embed modes.

How do I connect Typebot to OpenAI or other AI providers? In the flow editor, add an OpenAI block and configure your API key. Typebot supports any OpenAI-compatible API endpoint for chat completions, including self-hosted LLMs.


Template Content

More templates in this category

View Template
calm-fair
GitHub PR lifecycle tracker for Slack: reviews, reactions, cleanup

Yogen P
View Template
Telegram JavaScript Bot
A template for Telegram bot in JavaScript using grammY

Agampreet Singh
View Template
Cobalt Tools [Updated Apr ’26]
Cobalt Tools [Apr ’26] (Media Downloader, Converter & Automation) Self Host

shinyduo