Services not working until i manually save config through webui #108

Open
opened 2025-12-29 14:25:02 +01:00 by adam · 5 comments
Owner

Originally created by @version-au on GitHub (Sep 10, 2025).

Originally assigned to: @yusing on GitHub.

I've noticed that if containers are created they are not automatically detected by godoxy and i have to go into the webui and save the config. Once i do this i can then access these containers via their respective address.

I'm using the godoxy agent as the route provider.

Originally created by @version-au on GitHub (Sep 10, 2025). Originally assigned to: @yusing on GitHub. I've noticed that if containers are created they are not automatically detected by godoxy and i have to go into the webui and save the config. Once i do this i can then access these containers via their respective address. I'm using the godoxy agent as the route provider.
adam added the enhancement label 2025-12-29 14:25:02 +01:00
Author
Owner

@yusing commented on GitHub (Sep 10, 2025):

Please share your config, docker compose, .env and full steps to reproduce the issue.

@yusing commented on GitHub (Sep 10, 2025): Please share your config, docker compose, `.env` and full steps to reproduce the issue.
Author
Owner

@version-au commented on GitHub (Sep 10, 2025):

The godoxy compose file and .env or the other containers not getting detected ?

@version-au commented on GitHub (Sep 10, 2025): The godoxy compose file and .env or the other containers not getting detected ?
Author
Owner

@version-au commented on GitHub (Sep 10, 2025):

Godoxy config:

autocert:
  provider: porkbun
  email: user@gmail.com
  domains:
    - "*.domain.xyz"
  options:
    api_key: pk1_xxx
    secret_api_key: sk1_xxx
match_domains:
  - domain.xyz
entrypoint:
  middlewares:
    - use: CIDRWhitelist
      allow:
        - 127.0.0.1
        - 192.168.0.0/16
      status: 403
      message: Forbidden
  access_log:
    format: combined
    path: /app/logs/entrypoint.log
providers:
  docker:
    local: $DOCKER_HOST
  include:
    - pve.yml
    - nuc01.yml
    - other.yml
    - nuc02.yml
  notification:
    - name: gotify
      provider: gotify
      url: https://gotify.domain.com/
      token: xxx
  agents:
    - 192.168.2.63:8890
    - 192.168.2.56:8890
    - 192.168.2.38:8890
homepage:
  use_default_categories: false
timeout_shutdown: 5

Godoxy compose:

services:
  socket-proxy:
    container_name: socket-proxy
    image: ghcr.io/yusing/socket-proxy:latest
    environment:
      - ALLOW_START=1
      - ALLOW_STOP=1
      - ALLOW_RESTARTS=1
      - CONTAINERS=1
      - EVENTS=1
      - INFO=1
      - PING=1
      - POST=1
      - VERSION=1
    volumes:
      - ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock
    restart: unless-stopped
    tmpfs:
      - /run
    ports:
      - ${SOCKET_PROXY_LISTEN_ADDR:-127.0.0.1:2375}:2375
  frontend:
    image: ghcr.io/yusing/godoxy-frontend:${TAG:-latest}
    container_name: godoxy-frontend
    restart: unless-stopped
    network_mode: host # do not change this
    env_file: .env
    user: ${GODOXY_UID:-1000}:${GODOXY_GID:-1000}
    read_only: true
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - all
    depends_on:
      - app
    environment:
      HOSTNAME: 127.0.0.1
      PORT: ${GODOXY_FRONTEND_PORT:-3000}
    labels:
      proxy.aliases: ${GODOXY_FRONTEND_ALIASES:-godoxy}
      proxy.#1.port: ${GODOXY_FRONTEND_PORT:-3000}
      # proxy.#1.middlewares.cidr_whitelist: |
      #   status: 403
      #   message: IP not allowed
      #   allow:
      #     - 127.0.0.1
      #     - 10.0.0.0/8
      #     - 192.168.0.0/16
      #     - 172.16.0.0/12
  app:
    image: ghcr.io/yusing/godoxy:${TAG:-latest}
    container_name: godoxy-proxy    restart: always
    network_mode: host # do not change this
    env_file: .env
    user: ${GODOXY_UID:-1000}:${GODOXY_GID:-1000}
    depends_on:
      socket-proxy:
        condition: service_started
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - all
    cap_add:
      - NET_BIND_SERVICE
    environment:
      - DOCKER_HOST=tcp://${SOCKET_PROXY_LISTEN_ADDR:-127.0.0.1:2375}
    volumes:
      - ./config:/app/config
      - ./logs:/app/logs
      - ./error_pages:/app/error_pages:ro
      - ./data:/app/data

      # To use autocert, certs will be stored in "./certs".
      # You can also use a docker volume to store it
      - ./certs:/app/certs

      # remove "./certs:/app/certs" and uncomment below to use existing certificate
      # - /path/to/certs/cert.crt:/app/certs/cert.crt
      # - /path/to/certs/priv.key:/app/certs/priv.key`

Godoxy .env:

# docker image tag (latest, nightly)
TAG=latest

# set timezone to get correct log timestamp
TZ=Melbourne/Australia

# container uid and gid (must match the owner of mounted directories)
GODOXY_UID=1000
GODOXY_GID=1000

# Set GODOXY_API_JWT_SECURE=false to allow http
GODOXY_API_JWT_SECURE=true
# API JWT Configuration (common)
# generate secret with openssl rand -base64 32
GODOXY_API_JWT_SECRET=
# the JWT token time-to-live
# leave empty to use default (24 hours)
# format: https://pkg.go.dev/time#Duration
GODOXY_API_JWT_TOKEN_TTL=

# API/WebUI user password login credentials (optional)
# These fields are not required for OIDC authentication
GODOXY_API_USER=admin
GODOXY_API_PASSWORD=password

# OIDC Configuration (optional)
# Uncomment and configure these values to enable OIDC authentication.
#
# GODOXY_OIDC_ISSUER_URL=https://accounts.google.com
# GODOXY_OIDC_CLIENT_ID=your-client-id
# GODOXY_OIDC_CLIENT_SECRET=your-client-secret
# GODOXY_OIDC_SCOPES=openid, profile, email, groups # you may also include offline_access if your Idp supports it (e.g. Authentik, Pocket ID)
#
# User definitions: Uncomment and configure these values to restrict access to specific users or groups.
# These two fields act as a logical AND operator. For example, given the following membership:
#   user1, group1
#   user2, group1
#   user3, group2
#   user1, group2
# You can allow access to user3 AND all users of group1 by providing:
#   # GODOXY_OIDC_ALLOWED_USERS=user3
#   # GODOXY_OIDC_ALLOWED_GROUPS=group1
#
# Comma-separated list of allowed users.
# GODOXY_OIDC_ALLOWED_USERS=user1,user2
# Optional: Comma-separated list of allowed groups.
# GODOXY_OIDC_ALLOWED_GROUPS=group1,group2

# Proxy listening address
GODOXY_HTTP_ADDR=:80
GODOXY_HTTPS_ADDR=:443

# Enable HTTP3
GODOXY_HTTP3_ENABLED=true

# API listening address
GODOXY_API_ADDR=127.0.0.1:8888

# Metrics
GODOXY_METRICS_DISABLE_CPU=false
GODOXY_METRICS_DISABLE_MEMORY=false
GODOXY_METRICS_DISABLE_DISK=false
GODOXY_METRICS_DISABLE_NETWORK=false
GODOXY_METRICS_DISABLE_SENSORS=false

# Frontend listening port
GODOXY_FRONTEND_PORT=3000

# Frontend aliases (subdomains / FQDNs, e.g. godoxy, godoxy.domain.com)
GODOXY_FRONTEND_ALIASES=godoxy.domain.xyz

# Docker socket
# /var/run/podman/podman.sock for podman
DOCKER_SOCKET=/var/run/docker.sock
SOCKET_PROXY_LISTEN_ADDR=127.0.0.1:2375

# Debug mode
GODOXY_DEBUG=false

To reproduce I shutdown the LXC which is running some docker containers. I then restart godoxy. After this i start the LXC back up but nothing shows being proxied in the webui. If i click save config in the webui it then shows up under proxies and i can access the containers as per usual.

@version-au commented on GitHub (Sep 10, 2025): Godoxy config: ```yaml autocert: provider: porkbun email: user@gmail.com domains: - "*.domain.xyz" options: api_key: pk1_xxx secret_api_key: sk1_xxx match_domains: - domain.xyz entrypoint: middlewares: - use: CIDRWhitelist allow: - 127.0.0.1 - 192.168.0.0/16 status: 403 message: Forbidden access_log: format: combined path: /app/logs/entrypoint.log providers: docker: local: $DOCKER_HOST include: - pve.yml - nuc01.yml - other.yml - nuc02.yml notification: - name: gotify provider: gotify url: https://gotify.domain.com/ token: xxx agents: - 192.168.2.63:8890 - 192.168.2.56:8890 - 192.168.2.38:8890 homepage: use_default_categories: false timeout_shutdown: 5 ``` Godoxy compose: ```yaml services: socket-proxy: container_name: socket-proxy image: ghcr.io/yusing/socket-proxy:latest environment: - ALLOW_START=1 - ALLOW_STOP=1 - ALLOW_RESTARTS=1 - CONTAINERS=1 - EVENTS=1 - INFO=1 - PING=1 - POST=1 - VERSION=1 volumes: - ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock restart: unless-stopped tmpfs: - /run ports: - ${SOCKET_PROXY_LISTEN_ADDR:-127.0.0.1:2375}:2375 frontend: image: ghcr.io/yusing/godoxy-frontend:${TAG:-latest} container_name: godoxy-frontend restart: unless-stopped network_mode: host # do not change this env_file: .env user: ${GODOXY_UID:-1000}:${GODOXY_GID:-1000} read_only: true security_opt: - no-new-privileges:true cap_drop: - all depends_on: - app environment: HOSTNAME: 127.0.0.1 PORT: ${GODOXY_FRONTEND_PORT:-3000} labels: proxy.aliases: ${GODOXY_FRONTEND_ALIASES:-godoxy} proxy.#1.port: ${GODOXY_FRONTEND_PORT:-3000} # proxy.#1.middlewares.cidr_whitelist: | # status: 403 # message: IP not allowed # allow: # - 127.0.0.1 # - 10.0.0.0/8 # - 192.168.0.0/16 # - 172.16.0.0/12 app: image: ghcr.io/yusing/godoxy:${TAG:-latest} container_name: godoxy-proxy restart: always network_mode: host # do not change this env_file: .env user: ${GODOXY_UID:-1000}:${GODOXY_GID:-1000} depends_on: socket-proxy: condition: service_started security_opt: - no-new-privileges:true cap_drop: - all cap_add: - NET_BIND_SERVICE environment: - DOCKER_HOST=tcp://${SOCKET_PROXY_LISTEN_ADDR:-127.0.0.1:2375} volumes: - ./config:/app/config - ./logs:/app/logs - ./error_pages:/app/error_pages:ro - ./data:/app/data # To use autocert, certs will be stored in "./certs". # You can also use a docker volume to store it - ./certs:/app/certs # remove "./certs:/app/certs" and uncomment below to use existing certificate # - /path/to/certs/cert.crt:/app/certs/cert.crt # - /path/to/certs/priv.key:/app/certs/priv.key` ``` Godoxy .env: ```env # docker image tag (latest, nightly) TAG=latest # set timezone to get correct log timestamp TZ=Melbourne/Australia # container uid and gid (must match the owner of mounted directories) GODOXY_UID=1000 GODOXY_GID=1000 # Set GODOXY_API_JWT_SECURE=false to allow http GODOXY_API_JWT_SECURE=true # API JWT Configuration (common) # generate secret with openssl rand -base64 32 GODOXY_API_JWT_SECRET= # the JWT token time-to-live # leave empty to use default (24 hours) # format: https://pkg.go.dev/time#Duration GODOXY_API_JWT_TOKEN_TTL= # API/WebUI user password login credentials (optional) # These fields are not required for OIDC authentication GODOXY_API_USER=admin GODOXY_API_PASSWORD=password # OIDC Configuration (optional) # Uncomment and configure these values to enable OIDC authentication. # # GODOXY_OIDC_ISSUER_URL=https://accounts.google.com # GODOXY_OIDC_CLIENT_ID=your-client-id # GODOXY_OIDC_CLIENT_SECRET=your-client-secret # GODOXY_OIDC_SCOPES=openid, profile, email, groups # you may also include offline_access if your Idp supports it (e.g. Authentik, Pocket ID) # # User definitions: Uncomment and configure these values to restrict access to specific users or groups. # These two fields act as a logical AND operator. For example, given the following membership: # user1, group1 # user2, group1 # user3, group2 # user1, group2 # You can allow access to user3 AND all users of group1 by providing: # # GODOXY_OIDC_ALLOWED_USERS=user3 # # GODOXY_OIDC_ALLOWED_GROUPS=group1 # # Comma-separated list of allowed users. # GODOXY_OIDC_ALLOWED_USERS=user1,user2 # Optional: Comma-separated list of allowed groups. # GODOXY_OIDC_ALLOWED_GROUPS=group1,group2 # Proxy listening address GODOXY_HTTP_ADDR=:80 GODOXY_HTTPS_ADDR=:443 # Enable HTTP3 GODOXY_HTTP3_ENABLED=true # API listening address GODOXY_API_ADDR=127.0.0.1:8888 # Metrics GODOXY_METRICS_DISABLE_CPU=false GODOXY_METRICS_DISABLE_MEMORY=false GODOXY_METRICS_DISABLE_DISK=false GODOXY_METRICS_DISABLE_NETWORK=false GODOXY_METRICS_DISABLE_SENSORS=false # Frontend listening port GODOXY_FRONTEND_PORT=3000 # Frontend aliases (subdomains / FQDNs, e.g. godoxy, godoxy.domain.com) GODOXY_FRONTEND_ALIASES=godoxy.domain.xyz # Docker socket # /var/run/podman/podman.sock for podman DOCKER_SOCKET=/var/run/docker.sock SOCKET_PROXY_LISTEN_ADDR=127.0.0.1:2375 # Debug mode GODOXY_DEBUG=false ``` To reproduce I shutdown the LXC which is running some docker containers. I then restart godoxy. After this i start the LXC back up but nothing shows being proxied in the webui. If i click save config in the webui it then shows up under proxies and i can access the containers as per usual.
Author
Owner

@version-au commented on GitHub (Sep 10, 2025):

The formatting is all over the shop. Any better way to post this?

@version-au commented on GitHub (Sep 10, 2025): The formatting is all over the shop. Any better way to post this?
Author
Owner

@yusing commented on GitHub (Sep 10, 2025):

The formatting is all over the shop. Any better way to post this?

Fixed it for you.

I shutdown the LXC which is running some docker containers. I then restart godoxy.

The current state is: it won't reinitialize providers that failed to initialize, only those disconnections after that will be handled.

@yusing commented on GitHub (Sep 10, 2025): > The formatting is all over the shop. Any better way to post this? Fixed it for you. > I shutdown the LXC which is running some docker containers. I then restart godoxy. The current state is: it won't reinitialize providers that failed to initialize, only those disconnections after that will be handled.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/godoxy-yusing#108