On this page
- Which server and DNS records does Typebot need?
- How do you prepare the Typebot environment file?
- What does the Typebot Compose file contain?
- How do you publish the builder and viewer over HTTPS?
- Which ports need to be open for Typebot?
- How do you make sure sign-in emails arrive?
- How do you confirm a published bot works?
- How do you back up and upgrade Typebot?
- What usually breaks on a fresh Typebot install?
- Questions
Which server and DNS records does Typebot need?
A plan with 2 GB of memory is the floor for the two Node.js containers and PostgreSQL; 4 GB gives the builder room while you edit large flows. Any of Ubuntu 24.04, Debian 12 or 13, Rocky Linux 9 or AlmaLinux 9 works, because everything runs inside Docker.
- Two host names: one for the builder (
typebot.example.net) and one for the public viewer (bot.example.net). Point A and AAAA records for both at the server, as shown in DNS records. - Docker Engine with the Compose plugin. Follow the Docker Engine tutorial, or deploy the Docker app image and skip that step entirely.
- An SMTP account for outgoing mail, because the builder signs users in with emailed links.
Confirm Docker is ready before going further:
docker --version
docker compose versionHow do you prepare the Typebot environment file?
Create a project directory and generate a 32 character secret; Typebot uses it to encrypt credentials that bots store, so keep a copy somewhere safe.
sudo mkdir -p /opt/typebot && sudo chown deploy: /opt/typebot
cd /opt/typebot
openssl rand -base64 24The command prints exactly 32 characters. Paste it into /opt/typebot/.env together with the other settings:
ENCRYPTION_SECRET=paste-the-32-character-value-here
DATABASE_URL=postgresql://typebot:change-this-db-pass@typebot-db:5432/typebot
NEXTAUTH_URL=https://typebot.example.net
NEXT_PUBLIC_VIEWER_URL=https://bot.example.net
ADMIN_EMAIL=deploy@example.net
DISABLE_SIGNUP=true
SMTP_HOST=smtp.example.net
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USERNAME=bots@example.net
SMTP_PASSWORD=smtp-password
NEXT_PUBLIC_SMTP_FROM=Typebot <bots@example.net>DISABLE_SIGNUP=true stops strangers from opening accounts; the admin address can still sign in, and you invite collaborators from the workspace settings. Lock the file down with chmod 600 .env.
What does the Typebot Compose file contain?
The stack has three services. Both web containers listen on port 3000 internally; publish them only on the loopback interface so that Nginx is the single public entry point.
services:
typebot-db:
image: postgres:16
restart: always
environment:
POSTGRES_DB: typebot
POSTGRES_USER: typebot
POSTGRES_PASSWORD: change-this-db-pass
volumes:
- db-data:/var/lib/postgresql/data
typebot-builder:
image: baptistearno/typebot-builder:latest
restart: always
depends_on:
- typebot-db
env_file: .env
ports:
- "127.0.0.1:8080:3000"
typebot-viewer:
image: baptistearno/typebot-viewer:latest
restart: always
depends_on:
- typebot-db
env_file: .env
ports:
- "127.0.0.1:8081:3000"
volumes:
db-data:Save it as /opt/typebot/compose.yaml. The builder applies database migrations on its first start, so start it and watch the log until it reports that it is ready:
docker compose up -d
docker compose logs -f typebot-builderOnce things work, replace latest with the release tag you tested so that an unattended pull never jumps a major version.
How do you publish the builder and viewer over HTTPS?
Use one Nginx server block per host name and let Certbot add the certificates. On Ubuntu and Debian:
sudo apt install -y nginx certbot python3-certbot-nginxOn Rocky Linux 9 or AlmaLinux 9, enable EPEL first:
sudo dnf install -y epel-release
sudo dnf install -y nginx certbot python3-certbot-nginx
sudo systemctl enable --now nginx
sudo setsebool -P httpd_can_network_connect 1Create /etc/nginx/conf.d/typebot.conf:
server {
listen 80;
listen [::]:80;
server_name typebot.example.net;
client_max_body_size 20m;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 80;
listen [::]:80;
server_name bot.example.net;
location / {
proxy_pass http://127.0.0.1:8081;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}sudo nginx -t && sudo systemctl reload nginx
sudo certbot --nginx -d typebot.example.net -d bot.example.netIf you prefer automatic certificates without Certbot, the same two hosts fit in a short Caddyfile; see Caddy HTTPS.
Which ports need to be open for Typebot?
Only SSH, HTTP and HTTPS need to be reachable. Ports 8080 and 8081 stay private because Compose binds them to 127.0.0.1, which matters since Docker writes its own packet rules and can bypass a host firewall for ports published on all addresses.
# Ubuntu / Debian
sudo ufw allow OpenSSH
sudo ufw allow 80,443/tcp
sudo ufw enable
# Rocky / Alma
sudo firewall-cmd --permanent --add-service=http --add-service=https
sudo firewall-cmd --reloadThen confirm what is actually listening with sudo ss -tlnp: the two Typebot ports should show 127.0.0.1, not 0.0.0.0. More firewall patterns are in firewall rules.
How do you make sure sign-in emails arrive?
Sign-in depends entirely on mail delivery, so use an authenticated relay on port 587 rather than sending directly from the server. Port 25 may not be open for outbound traffic; open a ticket with support before you plan any direct delivery. A relay account with SPF and DKIM for your domain is the dependable route, and SMTP relay for apps walks through the DNS side.
To test, open https://typebot.example.net, enter the admin address and wait for the link. When nothing arrives, the builder log usually names the problem (wrong password, TLS mismatch, rejected sender):
docker compose logs --tail=100 typebot-builder | grep -i smtpWith port 587, keep SMTP_SECURE=false; STARTTLS is negotiated automatically. Set it to true only for implicit TLS on port 465.
How do you confirm a published bot works?
Create a small flow in the builder: a text bubble, an email input and a final message. Press Publish, then open the share link, which should start with https://bot.example.net/. Answer the questions and check the Results tab in the builder; each completed chat appears as a row you can export to CSV.
To embed a bot on another website, copy the snippet from the Share tab. It loads the script from your viewer, so visitors never touch the builder host. A quick health check from the server itself:
curl -I https://bot.example.net
curl -I https://typebot.example.netBoth should answer with a 200 or a redirect, never a 502 from Nginx.
How do you back up and upgrade Typebot?
All bots, results and workspace settings live in PostgreSQL, so a nightly dump plus the .env file is a complete backup:
cd /opt/typebot
docker compose exec -T typebot-db pg_dump -U typebot typebot | gzip > typebot-$(date +%F).sql.gzCopy dumps off the server, or enable the optional daily backups described in daily backups. To upgrade, read the release notes for breaking changes, change the image tags, then pull and recreate:
docker compose pull
docker compose up -d
docker image prune -fThe builder runs any new migrations when it starts. Uploads such as images inside bots need S3-compatible storage configured through the S3_ variables; without it, bots still run but file upload blocks stay unavailable.
What usually breaks on a fresh Typebot install?
- Redirect loop or login link pointing to localhost:
NEXTAUTH_URLdoes not match the real HTTPS address. Fix it and rundocker compose up -dagain. - Shared bots show the builder:
NEXT_PUBLIC_VIEWER_URLis missing or points at the builder host. - Builder restarts in a loop: the encryption secret is not 32 characters long, or the database password differs between the two places it appears.
- 502 Bad Gateway: the containers are still starting.
docker compose psshows their state.
Plans that fit this guide
Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.
Questions about Typebot chat forms
Can visitors use a bot without an account?
Yes. Only people who build bots sign in. Visitors open the viewer link or the embedded widget and chat anonymously.
Is it possible to sign in without email?
Typebot also supports OAuth providers such as GitHub or a generic OpenID Connect server through extra environment variables. Email links remain the simplest option for one administrator.
Why does Typebot need two domains?
The builder is your private workspace while the viewer is the public part. Keeping them apart means you can share bot links widely without advertising the editing interface.
What happens if I lose the encryption secret?
Stored credentials such as API keys inside bot blocks can no longer be decrypted. Keep .env with your backups and never regenerate the secret on a running instance.
Which plan suits a single small team?
A 2 GB plan handles a few editors and modest chat traffic. Move to 4 GB if builds feel slow; the steps are in moving to a larger plan.
More in Self-hosted apps
- Nextcloud on Nginx
- ownCloud Infinite Scale
- Seafile file sync
- Vaultwarden password vault
- Passbolt team password manager
- Gitea Git hosting
- Forgejo Git server
- GitLab Community Edition
- Gogs Git service
- Wiki.js
- BookStack documentation
- Outline knowledge base
- Paperless-ngx documents
- n8n workflow automation
- Activepieces automation
- Plausible Analytics (Community Edition)
- Umami analytics
- Mattermost team chat
- Matrix Synapse with Element
- Jitsi Meet video calls
- ONLYOFFICE Docs with Nextcloud
- HashiCorp Vault secrets server
- OpenBao secrets management
- Infisical secrets manager
- Authelia SSO and forward auth
- Zitadel identity platform
- VS Code in the browser (code-server)
- Joplin Server for notes sync
- Firefly III personal finance
- Snipe-IT asset tracking
- Odoo ERP on Ubuntu or Debian
- ERPNext with frappe_docker
- Dolibarr ERP and CRM with Nginx
- Penpot design tool with Docker
- Planka kanban boards
- Leantime project management
- Wekan boards with Docker
- Cal.com scheduling
- Chatwoot support inbox
- Mautic marketing automation
- DocuSeal document signing
- Metabase dashboards
- Appwrite backend server
- Self-hosted Supabase
- PocketBase backend
- RustDesk relay server
- Traccar GPS tracking
- Redmine project tracker
- The Lounge IRC client
- CyberChef data toolbox
- AFFiNE workspace
- Overleaf Community Edition
- Neko shared virtual browser
- imgproxy image resizing
- NetBox network inventory
- UVdesk help desk
- YetiForce CRM