Can I run Typebot locally and connect it with Chatwoot+Evolution?

(Sorry if my question is flawed or makes no sense somehow; I'm quite new to all of this.) Hello everyone, my name is Lucas and I'm in a project which requires Typebot to be used with Chatwoot and Evolution. My first role in this project was actually installing n8n, which was a real pain for me because I thought it required setting up a domain and subdomain and doing things like reverse proxy and authentication. Yet to my surprise, n8n actually worked just fine locally, including webhooks. Is it possible to do the same with Typebot? All services are running in the same VPS. From what I've seen, Typebot is more difficult to install than any other platform, requiring 2 subdomains and setting up stuff with email, Google, Github, Nginx and other things which are probably beyond my skill. Thanks in advance.
21 Replies
imoclub
imoclub10mo ago
Yes you can and will be easier if you install it with docker
Lucas Nóbrega
Lucas NóbregaOP10mo ago
That's great! But... I think I already tried to do that and failed. I tried using this guide: https://docs.typebot.io/self-hosting/deploy/docker But it didn't work. On the compose file I only changed the ports because my 8080 and 8081 were already in use. In the .env I put in a new key and email, but left the NEXTAUTH_URL and NEXT_PUBLIC_VIEWER blank. They don't even appear in the compose file. I started the compose and it worked, but I couldn't access it on my browser, and not even with ngrok (I got a black screen with Error 500 in the middle). I tried putting my main domain in the NEXT variables, but it also didn't work. Could you please help me? I'm sorry if it's bothersome, but you'd help me SO much if possible.
imoclub
imoclub10mo ago
What web server are you using? Nginx, apache or openlitespeed?
Lucas Nóbrega
Lucas NóbregaOP10mo ago
Nginx At least that's what my group members told me. Idk how to check
imoclub
imoclub10mo ago
try this NEXTAUTH_URL: http://YOURIPADRESS:yourport (port you define on docker-compose.yml) and do the same on NEXT_PUBLIC_VIEWER_URL
Lucas Nóbrega
Lucas NóbregaOP10mo ago
Ok I'll try that It didn't work. I got nothing from the ip:9091, and got the same Error 500 screen from 0.0.0.0:9091 And from ngrok too
imoclub
imoclub10mo ago
Oh you deploy on your local computer? I thought its on VPS, its better you install from local docs
Lucas Nóbrega
Lucas NóbregaOP10mo ago
It is a vps
imoclub
imoclub10mo ago
I guess you need create own config on nginx cd /etc/nginx/sites-available I dont know why are you using ngrok, on nginx you already can use reverse proxy
Lucas Nóbrega
Lucas NóbregaOP10mo ago
I used ngrok to check if it was working Also, I didn't need to to that when installing n8n I got it working with just the compose and .env files
imoclub
imoclub10mo ago
Yeah idk why n8n its easy to install, ived struggle too when install typebot for the first time but the most successful method is i must use https domain and the second method is deploy locally with pm2 on VPS
Lucas Nóbrega
Lucas NóbregaOP10mo ago
pm2? I could try that
Lucas Nóbrega
Lucas NóbregaOP10mo ago
Like this?
imoclub
imoclub10mo ago
yeah ived deploy with that too to learn make custom block on typebot with forge modules version: '3.3' volumes: db-data: s3-data: services: typebot-db: image: postgres:14-alpine restart: always volumes: - db-data:/var/lib/postgresql/data environment: - POSTGRES_DB=typebot - POSTGRES_PASSWORD=typebot ports: - '5432' typebot-builder: image: baptistearno/typebot-builder:next restart: always depends_on: - typebot-db ports: - '4300:3000' extra_hosts: - 'YOURDOMAIN:YOURIPADDRESS' env_file: .env typebot-viewer: image: baptistearno/typebot-viewer:next restart: always ports: - '4301:3000' env_file: .env minio: image: minio/minio:RELEASE.2023-11-01T18-37-25Z-cpuv1 command: server /data ports: - '9000:9000' - '9001:9001' environment: MINIO_ROOT_USER: minio MINIO_ROOT_PASSWORD: YOURPASSWORD MINIO_ADDRESS: ':9000' MINIO_CONSOLE_ADDRESS: ':9001' MINIO_BROWSER_REDIRECT_URL: https://YOURDOMAIN volumes: - s3-data:/data # This service just makes sure a bucket with the right policies is created createbuckets: image: minio/mc:RELEASE.2023-12-20T07-14-22Z-cpuv1 depends_on: - minio entrypoint: > /bin/sh -c " until (/usr/bin/mc config host add minio http://minio:9000 minio YOURPASSWORD) do echo '...waiting...' && sleep 1; done; /usr/bin/mc mb minio/typebot; /usr/bin/mc anonymous set public minio/typebot/public; exit 0; "
Lucas Nóbrega
Lucas NóbregaOP10mo ago
So pm2 is different? And this is?
imoclub
imoclub10mo ago
Make sure to change this to your own random string of 32 characters (https://> ENCRYPTION_SECRET=GENERATEYOURSECRET DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot NEXTAUTH_URL=https://YOURDOMAIN NEXT_PUBLIC_VIEWER_URL=https://YOURANOTHERDOMAIN NEXTAUTH_URL_INTERNAL=http://localhost:3000 ADMIN_EMAIL=YOUREMAIL SMTP_USERNAME=YOURUSEREMAIL SMTP_PASSWORD=YOURPASSWORDEMAIL SMTP_HOST=YOURSMTPSERVER SMTP_PORT=25 SMTP_SECURE=true NEXT_PUBLIC_SMTP_FROM=YOUREMAIL GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= NEXT_PUBLIC_GOOGLE_API_KEY= DEBUG=true DISABLE_SIGNUP=false DEFAULT_WORKSPACE_PLAN=UNLIMITED S3_ACCESS_KEY=minio S3_SECRET_KEY=YOURPASSWORD S3_BUCKET=typebot S3_ENDPOINT=YOURDOMAIN this is my default docker-compose.yml typebot, for advance you can use network etc and this is my env, if you already config like that so the problem is on reverse proxy method because i have nginx and openlitespeed server and both success with that config
Lucas Nóbrega
Lucas NóbregaOP10mo ago
Ok, guess I'll just have to try Thank you a lot, for now But wait Is this for the pm2 you mentioned? Or normal docker compose?
imoclub
imoclub10mo ago
its for docker bro, with PM2 you need git clone all source and deploy manually..
Lucas Nóbrega
Lucas NóbregaOP10mo ago
Oh right Thanks again
imoclub
imoclub10mo ago
and dont forget to check with command "docker compose logs" to see the error log if you still fail deploy it

Did you find this page helpful?