Web UI is not accessible with Docker installation

Hello, how do I open web access to coder running in a docker? I try to run it according to the manual:
docker run --rm -it -e CODER_ACCESS_URL="https://..." -e CODER_PG_CONNECTION_URL="postgresql://..." -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/coder/coder:latest
docker run --rm -it -e CODER_ACCESS_URL="https://..." -e CODER_PG_CONNECTION_URL="postgresql://..." -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/coder/coder:latest
Seems like it's running correctly:
Started HTTP listener at http://127.0.0.1:3000
View the Web UI: https://...
Started HTTP listener at http://127.0.0.1:3000
View the Web UI: https://...
The Web UI is not accessible.
Connecting to ...:443... failed: Connection refused.
Connecting to ...:443... failed: Connection refused.
I try to open ports for the docker container:
ufw-docker allow 64a809c45e28 443
"romantic_taussig" doesn't have any published ports.
ufw-docker allow 64a809c45e28 443
"romantic_taussig" doesn't have any published ports.
Stopping ufw didn't help. Adding -p 443:443 also didn't help. How to finalize the Docker installation correctly so that the Web UI is accessible?
7 Replies
Codercord
Codercord2y ago
<#1117438811450908760>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Atif
Atif2y ago
Try 3000:80 As the coder is running in http mode
kernel
kernelOP2y ago
In this case it should be -p 80:3000 Have it running with:
docker container port 59a6141c3164
3000/tcp -> 0.0.0.0:80
3000/tcp -> :::80
docker container port 59a6141c3164
3000/tcp -> 0.0.0.0:80
3000/tcp -> :::80
Now trying to do http request:
curl http://127.0.0.1
curl: (56) Recv failure: Connection reset by peer
curl http://127.0.0.1
curl: (56) Recv failure: Connection reset by peer
Is it possible to enable verbose debug mode somehow?
Atif
Atif2y ago
Set CODER_VERBOSE=true
moltra
moltra2y ago
I am trying to troubleshoot why I cannot login from the command line. I added this but the logs still only say where to login and no other information. How can I see more. I found this, but do not know how to enable it in my docker container using docker compose.
Phorcys
Phorcys5mo ago
hey, your coder server is not listening on port :443 since you have not configured HTTP/s try setting the CODER_ADDRESS environment variable to 0.0.0.0:3000, it is denying the request because Docker is requesting to 0.0.0.0:3000, but the Coder server is listening on 127.0.0.1:3000 User left the server
Codercord
Codercord5mo ago
@Phorcys closed the thread.

Did you find this page helpful?