I am trying to setup browser based SSH for my home network raspberry pi. I am using the cloudflared docker image and followed the steps to create a tunnel and also create a application. When i hit my URL created by the tunnel i am able to authenticate but after authentication I encounter http page that states, “Unable to connect to origin. Please confirm that the tunnel is set up correctly and the origin is healthy.”. In the logs i see two errors.
What is your config for the SSH tunnel? If you are using localhost
then it means it is attempting to connect to the docker container. You probably want to use host.docker.internal
(docs).
I ran the docker command as is within Cloudflare zero trust when setting up the tunnel. I did not see any instructions on having to modify the docker container after it is running. Here are screenshots of my setup.
(post deleted by author)
Change URL from localhost:22
to host.docker.internal:22
Ah, from an old post about this you need to recreate the container and append --add-host=host.docker.internal:host-gateway
to the run command.
That worked. I was able to access my PI cluster. Thank you!
Who can i send this thread to so they update the documentation?
The documentation is valid for the standard use case. The use case here is for connecting from a docker container to the host system.
This should also be documented.
The docs repo is open source here. Feel free to make an issue there.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.