[GH-ISSUE #2854] Docker Network with Nginx Proxy Manager #1957

Closed
opened 2026-02-26 07:33:26 +03:00 by kerem · 2 comments
Owner

Originally created by @EyyupA on GitHub (Apr 24, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2854

Discussed in https://github.com/NginxProxyManager/nginx-proxy-manager/discussions/2852

Originally posted by EyyupA April 23, 2023
I used this docker compose file:

version: '3.8'
services:
  app:
    image: 'jc21/nginx-proxy-manager:2.9.18'
    restart: unless-stopped
    ports:
      # These ports are in format <host-port>:<container-port>
      - '80:80' # Public HTTP Port
      - '443:443' # Public HTTPS Port
      #- '81:81' # Admin Web Port
      # Add any other Stream port you want to expose
      # - '21:21' # FTP
    environment:
      # Mysql/Maria connection parameters:
      DB_MARIADB_HOST: "db"
      DB_MARIADB_PORT: 3306
      DB_MARIADB_USER: "npm"
      DB_MARIADB_PASSWORD: "npm"
      DB_MARIADB_NAME: "npm"
      # Uncomment this if IPv6 is not enabled on your host
      # DISABLE_IPV6: 'true'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    networks:
      default:
    depends_on:
      - db

  db:
    image: 'webhippie/mariadb:latest'
    restart: unless-stopped
    environment:
      MARIADB_ROOT_PASSWORD: 'npm'
      MARIADB_DATABASE: 'npm'
      MARIADB_USER: 'npm'
      MARIADB_PASSWORD: 'npm'
    volumes:
      - ./mysql:/var/lib/mysql
    networks:
      default:

networks:
  default:
    attachable: true
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 10.51.0.0/16
          gateway: 10.51.0.1

If I add a container to this network (for example checkmk) i got a bad gateway.
For checkmk port 5000 is used.
But if i use a service which run on port 80 is works fine.

And i recognized also if i use the portainer network it work also with checkmk.

Screenshot from the nginx network which will be created with the compose file
image

Screenshort from the portainer network (with this is works but why?)
image

Originally created by @EyyupA on GitHub (Apr 24, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2854 ### Discussed in https://github.com/NginxProxyManager/nginx-proxy-manager/discussions/2852 <div type='discussions-op-text'> <sup>Originally posted by **EyyupA** April 23, 2023</sup> I used this docker compose file: ``` version: '3.8' services: app: image: 'jc21/nginx-proxy-manager:2.9.18' restart: unless-stopped ports: # These ports are in format <host-port>:<container-port> - '80:80' # Public HTTP Port - '443:443' # Public HTTPS Port #- '81:81' # Admin Web Port # Add any other Stream port you want to expose # - '21:21' # FTP environment: # Mysql/Maria connection parameters: DB_MARIADB_HOST: "db" DB_MARIADB_PORT: 3306 DB_MARIADB_USER: "npm" DB_MARIADB_PASSWORD: "npm" DB_MARIADB_NAME: "npm" # Uncomment this if IPv6 is not enabled on your host # DISABLE_IPV6: 'true' volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt networks: default: depends_on: - db db: image: 'webhippie/mariadb:latest' restart: unless-stopped environment: MARIADB_ROOT_PASSWORD: 'npm' MARIADB_DATABASE: 'npm' MARIADB_USER: 'npm' MARIADB_PASSWORD: 'npm' volumes: - ./mysql:/var/lib/mysql networks: default: networks: default: attachable: true driver: bridge ipam: driver: default config: - subnet: 10.51.0.0/16 gateway: 10.51.0.1 ``` If I add a container to this network (for example checkmk) i got a bad gateway. For checkmk port 5000 is used. But if i use a service which run on port 80 is works fine. And i recognized also if i use the portainer network it work also with checkmk. Screenshot from the nginx network which will be created with the compose file <img width="1247" alt="image" src="https://user-images.githubusercontent.com/65238400/233843919-c4aa00cc-dadc-4652-abad-0741234b489f.png"> Screenshort from the portainer network (with this is works but why?) <img width="1150" alt="image" src="https://user-images.githubusercontent.com/65238400/233843966-63c6a679-dff3-4e1c-976a-040f6f5d326e.png"> </div>
kerem 2026-02-26 07:33:26 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@github-actions[bot] commented on GitHub (Jan 21, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:1902476106 --> @github-actions[bot] commented on GitHub (Jan 21, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Mar 7, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2705352773 --> @github-actions[bot] commented on GitHub (Mar 7, 2025): Issue was closed due to inactivity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#1957
No description provided.