Typebot logo

Typebot

An open-source chatbot builder for creating, deploying, and managing conversational apps

Getting Started

  1. Create a folder and move to the folder
    mkdir typebot && cd typebot
    
  2. Create a .env file and add the following content:
    ENCRYPTION_SECRET=do+UspMmB/rewbX2K/rskFmtgGSSZ8Ta
    DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot
    
    NODE_OPTIONS=--no-node-snapshot
    
    NEXTAUTH_URL=http://localhost:9090
    NEXT_PUBLIC_VIEWER_URL=http://localhost:9091
    [email protected]
    
    SMTP_USERNAME=admin
    SMTP_PASSWORD=admin
    SMTP_HOST=mailhog
    SMTP_PORT=1025
    [email protected]
    
  3. Create a docker-compose.yml file and add the following content:
    services:
      typebot-db:
        image: postgres:16
        restart: always
        volumes:
          - db-data:/var/lib/postgresql/data
        environment:
          - POSTGRES_DB=typebot
          - POSTGRES_PASSWORD=typebot
        healthcheck:
            test: ["CMD-SHELL", "pg_isready -U postgres"]
            interval: 5s
            timeout: 5s
            retries: 5
      typebot-builder:
        image: baptistearno/typebot-builder:latest
        restart: always
        depends_on:
          typebot-db:
            condition: service_healthy
        ports:
          - '9090:3000'
        extra_hosts:
          - 'host.docker.internal:host-gateway'
        env_file: .env
    
      typebot-viewer:
        image: baptistearno/typebot-viewer:latest
        depends_on:
          typebot-db:
            condition: service_healthy
        restart: always
        ports:
          - '9091:3000'
        env_file: .env
    
      mailhog:
        image: mailhog/mailhog
        restart: always
        ports:
          - "8025:8025"
    
    volumes:
      db-data:
    
  4. Run the following command to start the container:
    docker compose up -d
    
  5. Open the browser and go to http://localhost:9090 to access the Typebot.

Note: For email confirmation during signup, check MailHog at http://localhost:8025.