Score:0

Access a Docker container remotely using my domain

ms flag

I have a computer running Debian 11 and I’m trying to set up Supabase self-hosting. The Supabase official documentation only goes as far as starting the Docker containers and accessing them from http://localhost:8000. I can also visit http://{docker_container_IP}:8000 on the host machine to access what I want. All of the other information online goes further but doesn’t show how to use the database externally. I tried using a Cloudflare tunnel to access that Docker container IP address and port through my domain, using [this tutorial][2], but it didn’t work, loading that domain just gave 502 bad gateway. I’ve reached out to Supabase developers to ask for better documentation and they said they will add that to their to-do list but that could take a long time. Any ideas on how I could do this?

in flag
PostgreSQL is not accessed via HTTP. You can't use a HTTP reverse proxy/tunnel in front of it.
jabbson avatar
sb flag
You generally have two options - publish the service yourself or use 3rd party like cloudflare (and their awesome tunnels). For self publishing you will need to be able to configure the router with public IP to forward the traffic to that public IP (and some port) to your your internal server. If you haven't done this before or want an easier way cloudflare sounds like a good choice. If you are getting the 502, that means something is likely misconfigured, and you need to look into what that could be. Check the tunnel, check the DNS entry, check the cloudflared logs on the server.
Globe avatar
ms flag
I couldn’t get cloudflare tunnels to work, unfortunately, but I did find a solution. I used a service called Dynamic DNS and opened the port I needed on my router. Then all I needed to do was add a DNS A record in ionos that made my subdomain point to the public IP. The only thing that I couldn’t do was add a port to the IP in that A record but if I use the subdomain and add the port at the end it works.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.