Share feedback, ideas and get community help

Updated 2 weeks ago

chatBot Test/ Publish returns Error 404

At a glance

A community member self-hosted Typebot on their own server and encountered a 404 error when trying to test and publish a chatbot from the template. Other community members suggested providing the server logs to help diagnose the issue. The community member shared the server logs and mentioned deploying with Docker. The discussion then focused on the NEXT_PUBLIC_VIEWER_URL and NEXTAUTH_URL environment variables, with the recommendation to use different domains for these values and set up a reverse proxy to redirect to the correct service. The community member tried using two separate domains pointing to the same IP address, but encountered issues obtaining an SSL certificate for one of the domains, potentially due to the shared IP address.

Useful resources
I have self hosted the Typebot in my own server. Tried to test and publish a chatBot from the template but it returmns error 404.
H
B
f
16 comments
Attachment
image.png
Can you provide the server logs? There should be a clear error there.

If you are self-hosting it with docker. Type this command in your terminal:

Plain Text
docker-compose logs


Paste all the logs here so that we can help you properly!
yes, I've deployed it using docker. here is the server log
Attachment
image.png
Attachment
image.png
and huge thanks to you @Baptiste for looking into this and helping me out!
server logs
What's your NEXT_PUBLIC_VIEWER_URL env value?
both NEXTAUTH_URL and NEXT_PUBLIC_VIEWER_URL are the same.
Now planning to create a unique subdomain for NEXT_PUBLIC_VIEWER_URL.
But one doubt, can NEXTAUTH_URL and NEXT_PUBLIC_VIEWER_URL point to the same IP? Will that work?
These should be different yes.
You need a reverse proxy that redirects to the right service then!
cool, configured two separate domains https://domain.com and https://bot.domain.com
But both of these domains point to the same IP address.
Is that a problem?
Got SSL certificate to https://domain.com but couldn't get SSL for https://bot.domain.com
Is it because both domains carries the same IP?
I have used docker for deployment and nginx for reverse proxy certbot for obtaining SSL
Be sure to pass your request parameters in nginx config, if you use it as proxy:
Plain Text
    location / {
        proxy_pass  http://localhost:8081;
        proxy_set_header Host $host;
        proxy_redirect http:// https://;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
    }
Add a reply
Sign up and join the conversation on Discord