Docker and websocket "cable" #7492
-
I have successfully set up chatwoot on a self-hosted device using docker with an Apache reverse proxy. Https also seems to work, but I cannot get the websocket interface to work! Is it hosted on the same port as the web interface? I don't see anywhere in the guide (https://www.chatwoot.com/docs/self-hosted/deployment/docker) how the websocket is set up with nginx, so I assume it "just works" there. The apache config is setup like this:
Here is the docker log, sadly not so much information here:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Don't know what solved it, but I put
Anyways, works now! |
Beta Was this translation helpful? Give feedback.
-
I found your post really helpful setting up my configuration, but the configuration here didn't quite work for me for a few reasons. I'm trying to setup a production instance of Chatwoot using apache as the reverse proxy. But I'm using HTTPS and certbot for the front end in addition to the standard docker setup. Here's the configuration that worked for me, I deployed as a config file in <VirtualHost *:80>
ServerName domain.tld
ProxyPass /cable ws://127.0.0.1:3000/cable upgrade=websocket
ProxyPassReverse /cable ws://127.0.0.1:3000/cable upgrade=websocket
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
RewriteEngine on
RewriteCond %{SERVER_NAME} =domain.tld
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName domain.tld
SSLEngine On
SSLProxyEngine On
ProxyRequests Off
ProxyPass /cable ws://127.0.0.1:3000/cable upgrade=websocket
ProxyPassReverse /cable ws://127.0.0.1:3000/cable upgrade=websocket
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
SSLCertificateFile /etc/letsencrypt/live/domain.tld/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.tld/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/domain.tld/chain.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
<Location /cable>
ProxyPass ws://127.0.0.1:3000/cable upgrade=websocket
</Location>
There are a bunch of differences that I'll elaborate on:
So the basic sequence I followed is:
I hope this helps you as much as the above post helped me get on track. |
Beta Was this translation helpful? Give feedback.
I found your post really helpful setting up my configuration, but the configuration here didn't quite work for me for a few reasons. I'm trying to setup a production instance of Chatwoot using apache as the reverse proxy. But I'm using HTTPS and certbot for the front end in addition to the standard docker setup.
Here's the configuration that worked for me, I deployed as a config file in
/etc/apache2/conf-available/chatwoot-proxy.conf
and then useda2enconf chatwoot-proxy.conf
to enable.