-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Terminal won't connect for server behind cloudflare tunnel - v4.0.0-beta.360 #4096
Comments
This is related to #3656 |
i actually stumbled upon the same issue but when i switched to safari instead of chrome - the terminal worked for me |
@SerjoA that does not work for me |
I encountered the same issue. I tried with different browsers and got this error in the console:
I've mitigated it temporarily by switching to Tailscale, but I had to recompile the default Caddy proxy to work with Cloudflare DNS, differently I couldn't get an HTTPS on my domains with Tailscale. By default, the proxy used by Coolify requires an A record to issue a certificate. With Tailscale, I needed to use a CNAME record instead. Unfortunately, Coolify doesn't issue a certificate when using a CNAME record. To resolve this, I've compiled a custom Caddy image with Cloudflare DNS support and changed the default proxy to work with Cloudflare DNS. This allows me to use Tailscale, and now the terminal works fine. Here's the Dockerfile I used to build the custom Caddy proxy:
After creating the custom Caddy image, I made the following additional changes to fully implement the solution: Changed the default proxy image: Created a new dynamic Caddy configuration file:
Then, for each application or deployment that needs to use this setup, I added the following label to the Docker Compose file:
This label tells Caddy to import and use the 'cloudflare' snippet we defined earlier. With these changes in place, everything works automatically. Caddy now uses Cloudflare DNS for SSL certificate issuance, which is compatible with the CNAME records required by Tailscale. This setup resolves the initial WebSocket connection issues and allows for seamless integration of Tailscale with Coolify. By using this Cloudflare DNS-based solution for certificate validation, you can close all incoming ports in your firewall, including 80 and 443, eliminating the need for direct server access for the Caddy challenge and significantly enhancing your server's security while still obtaining valid SSL certificates. Lastly, it's crucial to remember that you will need to enable the Caddy labels feature in Coolify's proxy settings. In the Coolify dashboard, navigate to the proxy settings and make sure to tick the box that allows Caddy to use labels. |
Error Message and Logs
I have running two servers, one behind a cloudflare tunnel. The latter won't connect via the in-browser terminal.
Terminal window pops up for <1 second and shows error message: "command line line 0: invalid quotes" and then disappears. Here is a screenshot of the error message:
Steps to Reproduce
Example Repository URL
No response
Coolify Version
v4.0.0-beta.360
Are you using Coolify Cloud?
Yes (Coolify Cloud)
Operating System and Version (self-hosted)
Ubuntu 24.04.1 LTS
Additional Information
I can only access the 'coolify-proxy' container within that server via the in-browser terminal, nothing else.
The text was updated successfully, but these errors were encountered: