Webpage not reachable via port 8080 when using docker #382

Closed
opened 2025-12-29 01:28:00 +01:00 by adam · 4 comments
Owner

Originally created by @frakman1 on GitHub (Nov 30, 2022).

Bug description

I tried following the documentation here:
https://github.com/juanfont/headscale/blob/main/docs/running-headscale-container.md

I got the template config file as described (no changes) and created the db.sqlite file then executed the docker run command. The container ran without errors but attempting to access the page via port 8080 failed.
I tried 127.0.01:8080 and local-ip:8080 with no luck.

I originally tried the syntax publishing 127.0.0.1:8080 before trying 0.0.0.0:8080 as per the documentation.

I also tried this on a Mac, Ubuntu and finally on Kali before giving up.

To Reproduce

Context info

  • Version of headscale used: 0.17.0
  • Version of tailscale client: Not Used
  • OS (e.g. Linux, Mac, Cygwin, WSL, etc.) Kali 2021.3
  • Kernel version: Linux kali 5.10.0-kali9-amd64 #1 SMP Debian 5.10.46-4kali1 (2021-08-09) x86_64 GNU/Linux
  • The relevant config parameters you used. See output below:
  • Log output:

└─$ docker run   --name headscale   --detach   --volume $(pwd)/config:/etc/headscale/   --publish 0.0.0.0:8080:8080   --publish 127.0.0.1:9090:9090   headscale/headscale:latest   headscale serve
b550a1b4e30208e5b4424d5ed9146c9d9f65b72cf40db9af4aa9fbbafb2baa7e

└─$ docker logs headscale                                                                                                                                                                                                   125 ⨯
2022-11-30T14:38:54Z INF Setting up a DERPMap update worker frequency=86400000
2022-11-30T14:38:54Z INF listening and serving HTTP on: 127.0.0.1:8080
2022-11-30T14:38:54Z INF listening and serving metrics on: 127.0.0.1:9090

└─$ telnet 127.0.0.1 8080
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Connection closed by foreign host.

└─$ curl http://127.0.0.1:9090/metrics                                                                                                                                                                                        1 ⨯

curl: (56) Recv failure: Connection reset by peer

└─$ curl http://127.0.0.1:8080                                                                                                                                                                                               56 ⨯

curl: (56) Recv failure: Connection reset by peer


└── config
    ├── config.yaml
    ├── db.sqlite
    ├── noise_private.key
    └── private.key
Originally created by @frakman1 on GitHub (Nov 30, 2022). **Bug description** I tried following the documentation here: https://github.com/juanfont/headscale/blob/main/docs/running-headscale-container.md I got the template config file as described (no changes) and created the `db.sqlite` file then executed the `docker run` command. The container ran without errors but attempting to access the page via port 8080 failed. I tried `127.0.01:8080` and `local-ip:8080` with no luck. I originally tried the syntax publishing `127.0.0.1:8080` before trying `0.0.0.0:8080` as per the documentation. I also tried this on a Mac, Ubuntu and finally on Kali before giving up. **To Reproduce** <!-- Steps to reproduce the behavior. --> **Context info** - Version of headscale used: `0.17.0` - Version of tailscale client: `Not Used` - OS (e.g. Linux, Mac, Cygwin, WSL, etc.) `Kali 2021.3` - Kernel version: `Linux kali 5.10.0-kali9-amd64 #1 SMP Debian 5.10.46-4kali1 (2021-08-09) x86_64 GNU/Linux` - The relevant config parameters you used. `See output below:` - Log output: ``` └─$ docker run --name headscale --detach --volume $(pwd)/config:/etc/headscale/ --publish 0.0.0.0:8080:8080 --publish 127.0.0.1:9090:9090 headscale/headscale:latest headscale serve b550a1b4e30208e5b4424d5ed9146c9d9f65b72cf40db9af4aa9fbbafb2baa7e └─$ docker logs headscale 125 ⨯ 2022-11-30T14:38:54Z INF Setting up a DERPMap update worker frequency=86400000 2022-11-30T14:38:54Z INF listening and serving HTTP on: 127.0.0.1:8080 2022-11-30T14:38:54Z INF listening and serving metrics on: 127.0.0.1:9090 └─$ telnet 127.0.0.1 8080 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. └─$ curl http://127.0.0.1:9090/metrics 1 ⨯ curl: (56) Recv failure: Connection reset by peer └─$ curl http://127.0.0.1:8080 56 ⨯ curl: (56) Recv failure: Connection reset by peer └── config ├── config.yaml ├── db.sqlite ├── noise_private.key └── private.key ```
adam added the bug label 2025-12-29 01:28:00 +01:00
adam closed this issue 2025-12-29 01:28:00 +01:00
Author
Owner

@kradalby commented on GitHub (Dec 15, 2022):

We do not really support docker, please ask the community in Discord.

@kradalby commented on GitHub (Dec 15, 2022): We do not really support docker, please ask the community in Discord.
Author
Owner

@frakman1 commented on GitHub (Dec 15, 2022):

I did, twice and got no response but thanks.

@frakman1 commented on GitHub (Dec 15, 2022): I did, twice and got no response but thanks.
Author
Owner

@theblop commented on GitHub (Jul 20, 2023):

I did, twice and got no response but thanks.

in case you're still stuck with this (I was for a while, following the tutorial blindly...) you need to change the listen address in the default config.yaml (this avoids only binding to localhost inside the container):

listen_addr: 0.0.0.0:8080
@theblop commented on GitHub (Jul 20, 2023): > I did, twice and got no response but thanks. in case you're still stuck with this (I was for a while, following the tutorial blindly...) you need to change the listen address in the default config.yaml (this avoids only binding to localhost inside the container): ``` listen_addr: 0.0.0.0:8080 ```
Author
Owner

@frakman1 commented on GitHub (Jul 21, 2023):

Thank you @theblop
I got further but ran into another error. Opened a new issue for that:
https://github.com/juanfont/headscale/issues/1511

@frakman1 commented on GitHub (Jul 21, 2023): Thank you @theblop I got further but ran into another error. Opened a new issue for that: https://github.com/juanfont/headscale/issues/1511
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#382