---
title: "Deploy Typebot | Open-Source Typeform Alternative on Railway"
description: "Self-host Typebot. Open-source advanced chatbot builder on Railway"
category: "Bots"
url: https://railway.com/deploy/typebot-chatbot-builder
---

# 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 on Railway](https://railway.com/template/typebot-chatbot-builder)**

- **Creator:** Heimdall
- **Category:** Bots
- **Total deploys:** 28

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2.1
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### Typebot Viewer https://raw.githubusercontent.com/baptisteArno/typebot.io/892870ff862463d204ecbd9699f68b420bda7d4e/apps/viewer/public/favicon.svg

- **Image:** baptistearno/typebot-viewer:3
- **Public domain:** Yes

### Typebot Builder https://raw.githubusercontent.com/baptisteArno/typebot.io/892870ff862463d204ecbd9699f68b420bda7d4e/apps/builder/public/favicon.svg

- **Image:** baptistearno/typebot-builder:3
- **Public domain:** Yes

## Documentation

![Typebot logo](https://typebot.com/assets/marketing-builder-CGbtQs5X.png)

# 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](#configuring-authentication-for-typebot) 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="you@example.com"
SMTP_PASSWORD="your-smtp-password"
NEXT_PUBLIC_SMTP_FROM="noreply@example.com"
```

After setting either provider, redeploy the builder service. Google OAuth, Facebook, Azure AD, and GitLab are also supported — see [Typebot configuration docs](https://docs.typebot.com/self-hosting/configuration).

## 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-builder** — `baptistearno/typebot-builder:3` (editor UI)
- **typebot-viewer** — `baptistearno/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

| Variable | Service | Description |
|----------|---------|-------------|
| `DATABASE_URL` | Builder, Viewer | PostgreSQL connection string |
| `REDIS_URL` | Builder, Viewer | Redis connection string |
| `ENCRYPTION_SECRET` | Builder, Viewer | 32-char encryption key (must match) |
| `NEXTAUTH_URL` | Builder, Viewer | Builder's public URL |
| `NEXTAUTH_SECRET` | Builder, Viewer | NextAuth session secret (must match) |
| `NEXT_PUBLIC_VIEWER_URL` | Builder, Viewer | Viewer's public URL |
| `HOSTNAME` | Builder, Viewer | Must be `0.0.0.0` for Railway |
| `PORT` | Builder, Viewer | `3000` |

### Deployment Dependencies

- **Runtime**: Node.js (bundled in Docker images)
- **GitHub**: [github.com/baptisteArno/typebot.io](https://github.com/baptisteArno/typebot.io)
- **Docker Hub**: [baptistearno/typebot-builder](https://hub.docker.com/r/baptistearno/typebot-builder), [baptistearno/typebot-viewer](https://hub.docker.com/r/baptistearno/typebot-viewer)
- **Docs**: [docs.typebot.com/self-hosting](https://docs.typebot.com/self-hosting)

## Hardware Requirements for Self-Hosting Typebot

| Resource | Minimum | Recommended |
|----------|---------|-------------|
| CPU | 2 cores | 4 cores |
| RAM | 2 GB | 4 GB |
| Storage | 5 GB | 20 GB |
| Runtime | Docker / Node.js 24 | Docker 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

| Feature | Typebot | Landbot | Botpress |
|---------|---------|---------|----------|
| Open source | Yes (FSL) | No | Yes (MIT) |
| Self-host | Yes | No | Yes |
| Visual builder | Yes | Yes | Yes |
| AI/LLM support | Yes | Limited | Yes |
| WhatsApp | Paid tier | Yes | Yes |
| Pricing | Free self-host | From $45/mo | Free 500 msg/mo |
| Chat limits | Unlimited (self-host) | Plan-based | Plan-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.


## Similar templates

- [Telegram JavaScript Bot](https://railway.com/deploy/5lRkWa) — A template for Telegram bot in JavaScript using grammY
- [Cobalt Tools [Updated Aug ’26]](https://railway.com/deploy/cobalt) — Cobalt Tools [Aug ’26] (Media Downloader, Converter & Automation) Self Host
- [Telegram Gateway](https://railway.com/deploy/railway-telegram-gateway) — Multi-bot Telegram webhook gateway with real-time WebSocket event streaming

Open this page in a browser: https://railway.com/deploy/typebot-chatbot-builder
