Skip to content

Bug: HTTP server uses port 8000, even if the HTTP_CONTROL_SERVER_PORT configuration is different. #2783

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

Closed
asolux opened this issue Apr 20, 2025 · 5 comments

Comments

@asolux
Copy link

asolux commented Apr 20, 2025

Is this urgent?

None

Host OS

Proxmox, Debian 12, LXC Container with Ubuntu 24.04, Docker version 28.1.0, Docker Compose version v2.35.0

CPU arch

x86_64

VPN service provider

Mullvad

What are you using to run the container

docker-compose

What is the version of Gluetun

3.40.0

What's the problem 🤔

Although the port is set to 8002 with the HTTP_CONTROL_SERVER_PORT option, the HTTP server listens on port 8000.

environment:
  - HTTP_CONTROL_SERVER_PORT=:8002

Log:

INFO [http server] http server listening on [::]:8000

I have tested both 8002 and :8002. Both with the same result.

Share your logs (at least 10 lines)

2025-04-20T09:03:02Z INFO [routing] default route found: interface eth0, gateway 172.18.0.1, assigned IP 172.18.0.2 and family v4
2025-04-20T09:03:02Z INFO [routing] adding route for 0.0.0.0/0
2025-04-20T09:03:02Z INFO [firewall] setting allowed subnets...
2025-04-20T09:03:02Z INFO [routing] default route found: interface eth0, gateway 172.18.0.1, assigned IP 172.18.0.2 and family v4
2025-04-20T09:03:02Z INFO [dns] using plaintext DNS at address 1.1.1.1
2025-04-20T09:03:02Z INFO [http server] http server listening on [::]:8000
2025-04-20T09:03:02Z INFO [healthcheck] listening on 127.0.0.1:9999
2025-04-20T09:03:02Z INFO [firewall] allowing VPN connection...
2025-04-20T09:03:02Z INFO [wireguard] Using available kernelspace implementation
2025-04-20T09:03:02Z INFO [wireguard] Connecting to xx.xx.xx.xx:51820
2025-04-20T09:03:02Z INFO [wireguard] Wireguard setup is complete. Note Wireguard is a silent protocol and it may or may not work, without giving any error message. Typically i/o timeout errors indicate the Wireguard connection is not working.
2025-04-20T09:03:02Z INFO [dns] downloading hostnames and IP block lists
2025-04-20T09:03:02Z INFO [healthcheck] healthy!
2025-04-20T09:03:04Z INFO [dns] DNS server listening on [::]:53
2025-04-20T09:03:04Z INFO [dns] ready
2025-04-20T09:03:05Z INFO [ip getter] Public IP address is xx.xx.xx.xx (Sweden, Skåne, Malmö - source: ipinfo)
2025-04-20T09:03:05Z INFO [vpn] You are running the latest release v3.40.0

Share your configuration

networks:
  test-network:
    name: test-network
    driver: bridge

services:
  gluetun:
    image: qmcgaw/gluetun:v3.40.0
    container_name: gluetun
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - 8888:8888/tcp # HTTP proxy
      - 8388:8388/tcp # Shadowsocks
      - 8388:8388/udp # Shadowsocks
    volumes:
      - ${PATH_TO_CONFIGS:?err}/gluetun:/gluetun
    environment:
      - VPN_SERVICE_PROVIDER=${VPN_PROVIDER:?err}
      - VPN_TYPE=${VPN_TYPE:?err}
      - HTTP_CONTROL_SERVER_PORT=:8002
      - WIREGUARD_PRIVATE_KEY=${WIREGUARD_PRIVATE_KEY:?err}
      - WIREGUARD_ADDRESSES=${WIREGUARD_ADDRESSES:?err}
      - SERVER_COUNTRIES=${SERVER_COUNTRIES:?err}
      - SERVER_CITIES=${SERVER_CITIES:?err}
  deunhealth:
    image: qmcgaw/deunhealth
    container_name: deunhealth
    network_mode: "none"
    environment:
      - LOG_LEVEL=info
      - HEALTH_SERVER_ADDRESS=127.0.0.1:9999
      - TZ=${TIMEZONE:?err}
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
Copy link
Contributor

@qdm12 is more or less the only maintainer of this project and works on it in his free time.
Please:

@fumantsu
Copy link

Actually the dockerfile exposes this 8000 regardless what port you have. I have change it as well and works (while still 8000 is exposed)

@CodeSmash44
Copy link

I believe the environment variable you should be updating is

  • HTTP_CONTROL_SERVER_ADDRESS

and not HTTP_CONTROL_SERVER_PORT. This works for me.

@asolux
Copy link
Author

asolux commented May 19, 2025

I believe the environment variable you should be updating is

* HTTP_CONTROL_SERVER_ADDRESS

and not HTTP_CONTROL_SERVER_PORT. This works for me.

Indeed, that's my mistake. Now works as expected. Can now be closed.

@asolux asolux closed this as completed May 19, 2025
Copy link
Contributor

Closed issues are NOT monitored, so commenting here is likely to be not seen.
If you think this is still unresolved and have more information to bring, please create another issue.

This is an automated comment setup because @qdm12 is the sole maintainer of this project
which became too popular to monitor issues closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants