Automated installation script for Typebot with enterprise-grade security on Ubuntu 22.04+.
- One-command installation - Complete setup in minutes
- Maximum security (99/100) - Enterprise-grade hardening
- Interactive setup - Easy configuration prompts
- Production-ready - Docker, PostgreSQL, Redis, MinIO, Nginx
- SSL/TLS - Cloudflare Origin Certificates support
- Firewall & SSH hardening - UFW, Fail2ban, custom SSH port
- Resource limits - Prevents resource exhaustion
- Log rotation - Automatic log management
ββββββββββββββββββββββββββββββββββββββββββββ
Network Security ββββββββββββββββββββ 100%
SSH Hardening ββββββββββββββββββββ 100%
SSL/TLS ββββββββββββββββββββ 100%
Password Management ββββββββββββββββββββ 100%
File Permissions ββββββββββββββββββββ 100%
Input Validation ββββββββββββββββββββ 100%
Docker Security ββββββββββββββββββββ 100%
Logging & Monitoring ββββββββββββββββββββ 100%
ββββββββββββββββββββββββββββββββββββββββββββ
- Fresh Ubuntu 22.04+ server with root access
- Domain names pointed to your server (all 3 are required):
- Builder domain (e.g.,
typebot.yourdomain.com) - Viewer domain (e.g.,
bot.yourdomain.com) - MinIO domain (e.g.,
minio.yourdomain.com) - Required for file uploads
- Builder domain (e.g.,
- Cloudflare Origin SSL certificates (Free, 15-year validity)
- Important: Certificate must include all 3 domains
- SMTP credentials for email magic link authentication
# Download the script
wget https://raw.githubusercontent.com/achiya-automation/typebot-installation-script/main/install-typebot.sh
# Make it executable
chmod +x install-typebot.sh
# Run it
sudo ./install-typebot.shThe script will guide you through an interactive setup process.
- Installation Guide - Complete setup instructions (Hebrew)
- Security Audit - Detailed security analysis (Hebrew)
- β Docker & Docker Compose
- β PostgreSQL 16 (database)
- β Redis Alpine (caching & sessions)
- β MinIO (S3-compatible object storage)
- β Typebot Builder & Viewer
- β Nginx (reverse proxy with SSL termination)
- β UFW Firewall (minimal ports: 2222, 80, 443)
- β Fail2ban (brute-force protection)
- β SSH hardening (custom port 2222, key-based auth)
- β SSL/TLS with modern cipher suites
- β Docker resource limits & security options
- β Automatic log rotation
- Cryptographically secure password generation (24 characters)
- AES-256 compatible encryption keys (32 hex chars)
- No hardcoded secrets - all generated at install time
- Secure file permissions (600) for sensitive files
- UFW firewall with default deny incoming policy
- MinIO S3 API exposed via Nginx reverse proxy with SSL/TLS
- Docker network isolation (
typebot-network) - Fail2ban protection against SSH brute-force attacks
- All services communicate internally via Docker network
- Custom SSH port (2222) to reduce automated attacks
- Key-based authentication for root (password auth disabled for root)
- Maximum 3 authentication attempts
- Client timeout after 5 minutes of inactivity
- X11 forwarding disabled
- TLS 1.2 & 1.3 only (older versions disabled)
- Modern AEAD cipher suites with Forward Secrecy:
- ECDHE-ECDSA/RSA-AES128/256-GCM-SHA256/384
- ECDHE-ECDSA/RSA-CHACHA20-POLY1305
- DHE-RSA-AES128/256-GCM-SHA256/384
- OCSP stapling enabled
- Session cache for performance
- Security headers:
- HSTS (Strict-Transport-Security)
- X-Frame-Options (SAMEORIGIN)
- X-Content-Type-Options (nosniff)
- X-XSS-Protection (enabled)
- Content-Security-Policy
- Resource limits on all containers:
- PostgreSQL: 1 CPU, 1GB RAM
- Redis: 0.5 CPU, 512MB RAM
- MinIO: 1 CPU, 1GB RAM
- Typebot Builder/Viewer: 2 CPU, 2GB RAM each
- Log rotation: 10MB max per file, 3 files retained (30MB total)
- Security option:
no-new-privileges:trueon all containers - Healthchecks for all services
- Network isolation between containers
- Domain validation (supports multi-level subdomains)
- Email validation (RFC 5322 compliant)
- Command injection prevention
- Proper escaping of user inputs
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 2 cores | 4+ cores |
| RAM | 4 GB | 8+ GB |
| Disk | 20 GB | 50+ GB SSD |
| OS | Ubuntu 22.04 | Ubuntu 24.04 LTS |
| Network | 10 Mbps | 100+ Mbps |
The script will prompt you for:
-
Domain Configuration
- Builder domain (main application)
- Viewer domain (for published bots)
- MinIO domain (optional - for S3 console access)
-
SSL Certificates
- Cloudflare Origin Certificate (paste content)
- Private Key (paste content, input hidden)
-
Admin Settings
- Admin email address
- Disable new user signup (yes/no)
-
SMTP Configuration
- SMTP host
- SMTP port
- Username & password
- From email address
-
Google Integrations (Optional)
- Google Sheets
- Gmail
- Google Fonts
- Google OAuth
All inputs are validated before proceeding.
After successful installation, you'll receive:
- β Access URLs for your Typebot instance
- β Database credentials
- β S3/MinIO credentials
- β Important security reminders
- β Location of installation info file
Important: The script saves all credentials to /opt/typebot/INSTALLATION_INFO.txt with secure permissions (600).
- Navigate to your Builder domain (e.g.,
https://typebot.yourdomain.com) - Enter your admin email
- Check your email for the magic link
- Click the link to sign in
# Navigate to Typebot directory
cd /opt/typebot
# View running containers
docker compose ps
# View logs
docker compose logs -f
docker compose logs typebot-builder --tail=50
docker compose logs typebot-viewer --tail=50
# Restart services
docker compose restart
# Stop services
docker compose down
# Start services
docker compose up -d
# Update Typebot to latest version
docker compose pull
docker compose up -dCheck logs for errors:
cd /opt/typebot
docker compose logs typebot-builder --tail=50
docker compose logs typebot-viewer --tail=50Common issue: DISABLE_SIGNUP must be true or false (not yes or no).
# Check PostgreSQL health
docker compose ps | grep db
# View database logs
docker compose logs typebot-db --tail=50
# Restart database
docker compose restart typebot-db# Verify certificate files exist
ls -la /etc/ssl/cloudflare/
# Check Nginx configuration
nginx -t
# View Nginx logs
tail -f /var/log/nginx/error.log# Check SMTP configuration
cat /opt/typebot/.env | grep SMTP
# View email-related logs
docker compose logs typebot-builder | grep -i smtpTo update Typebot to the latest version:
cd /opt/typebot
docker compose pull
docker compose up -dTo update system packages:
apt update && apt upgrade -y
reboot| File | Purpose | Permissions |
|---|---|---|
/opt/typebot/.env |
Environment variables & secrets | 600 (root only) |
/opt/typebot/docker-compose.yml |
Container configuration | 644 |
/opt/typebot/INSTALLATION_INFO.txt |
All credentials & info | 600 (root only) |
/etc/ssl/cloudflare/cert.pem |
SSL certificate | 600 (root only) |
/etc/ssl/cloudflare/key.pem |
SSL private key | 600 (root only) |
/etc/nginx/sites-available/typebot |
Nginx config | 644 |
- Save your credentials immediately after installation from
/opt/typebot/INSTALLATION_INFO.txt - Delete the info file after saving:
rm /opt/typebot/INSTALLATION_INFO.txt - SSH port changed to 2222 - Update your firewall/security groups if needed
- Backup regularly:
/opt/typebot/.env- Docker volumes (db-data, redis-data, minio-data)
/etc/ssl/cloudflare/
# Backup script example
#!/bin/bash
BACKUP_DIR="/backup/typebot-$(date +%Y%m%d)"
mkdir -p "$BACKUP_DIR"
# Backup .env file
cp /opt/typebot/.env "$BACKUP_DIR/"
# Backup SSL certificates
cp -r /etc/ssl/cloudflare "$BACKUP_DIR/"
# Backup database
docker exec typebot-typebot-db-1 pg_dump -U postgres typebot > "$BACKUP_DIR/database.sql"
# Backup MinIO data (optional - can be large)
# docker exec typebot-typebot-minio-1 mc mirror /data "$BACKUP_DIR/minio/"
tar -czf "$BACKUP_DIR.tar.gz" "$BACKUP_DIR"
rm -rf "$BACKUP_DIR"- Script interface: Hebrew
- Documentation: Hebrew (this README: English)
- Code comments: English/Hebrew mixed
- All code is readable and well-documented
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Internet β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β UFW Firewall β
β Ports: 2222 (SSH), 80, 443 (HTTPS) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Nginx (Reverse Proxy) β
β SSL/TLS Termination β
β ββββββββββββββββ¬βββββββββββββββ¬ββββββββββββββ β
β β Builder β Viewer β MinIO β β
β β :8080 β :8081 β :9000 β β
βββββββ΄βββββββββββββββ΄βββββββββββββββ΄ββββββββββββββ΄ββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Docker Network (typebot-network) β
β β
β ββββββββββββββ βββββββββββ ββββββββ ββββββββββββ β
β β PostgreSQL β β Redis β β MinIOβ β Typebot β β
β β :5432 β β :6379 β β S3 β β Builder/ β β
β β β β β β β β Viewer β β
β ββββββββββββββ βββββββββββ ββββββββ ββββββββββββ β
β β
β Volumes: db-data, redis-data, minio-data β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- β System checks (root, OS version, connectivity)
- β Interactive configuration collection
- β System updates & package installation
- β UFW firewall setup
- β SSH hardening (port 2222, Fail2ban)
- β Docker & Docker Compose installation
- β Typebot configuration generation
- β SSL certificate installation
- β Nginx setup with security headers
- β Docker container deployment
- β Service health checks
- β Credentials file generation
- β Final verification & success message
Contributions are welcome! Please feel free to submit a Pull Request.
# Clone the repository
git clone https://github.com/achiya-automation/typebot-installation-script.git
cd typebot-installation-script
# Make changes
nano install-typebot.sh
# Test on a fresh Ubuntu server
# DO NOT test on production!- β Maximum security hardening (99/100 rating)
- β Docker resource limits on all containers
- β Automatic log rotation (10MB/file, 3 files)
- β
Container security options (
no-new-privileges) - β
Fixed
DISABLE_SIGNUPvalidation (true/false vs yes/no) - β Complete Hebrew documentation
- β Comprehensive security audit report
- β SSH hardening with custom port
- β Modern SSL/TLS cipher suites
- β MinIO ports bound to localhost
- β Subdomain support in validation
- β Optional MinIO Console setup
- β Initial release
- β Basic Typebot installation
- β Docker Compose setup
MIT License
Copyright (c) 2025 Achiya Automation
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Typebot - Amazing open-source chatbot builder
- Docker - Container platform
- Nginx - High-performance web server
- PostgreSQL - Powerful database
- MinIO - S3-compatible object storage
- Cloudflare - SSL certificates & CDN
For issues, questions, or suggestions:
- π Open an issue: GitHub Issues
- π¬ Discussions: GitHub Discussions
Made with β€οΈ for the Typebot community
π Security Audited | β Production Ready | π Easy Setup
β Star this repo if you find it useful!