glitchbox
glitchbox

Reputation: 133

Can't access Netbox after deploying with Portainer on Proxmox

I've deployed netbox via portainer on a VM running Ubuntu 24.04 LTS server on Proxmox. The containers are up and running with no errors, ports open, but I'm not able to connect to the web interface. What am I missing here? Appreciate any help :)

Portainer Stack:

services:
  netbox:
    image: linuxserver/netbox:latest
    restart: always
    ports:
      - "${HOST_PORT}:${DOCKER_PORT}"
    volumes:
      - netbox_media:/opt/netbox/netbox/media
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - DB_HOST=netbox-db
      - DB_NAME=${DB_NAME}
      - DB_USER=${DB_USER}
      - DB_PASSWORD=${DB_PASS}
      - SUPERUSER_EMAIL=${SUPER_USER_EMAIL}
      - SUPERUSER_PASSWORD=${SUPER_USER_PASS}
      - ALLOWED_HOSTS=*
      - REDIS_HOST=redis
      - REDIS_PORT=6379
    depends_on:
      - netbox-db
      - redis
    networks:
      - netbox-net

  netbox-db:
    image: postgres:13-alpine
    restart: always
    volumes:
      - netbox_db:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=${DB_USER}
      - POSTGRES_PASSWORD=${DB_PASS}
      - POSTGRES_DB=${DB_NAME}
    networks:
      - netbox-net

  redis:
    image: redis:6-alpine
    restart: always
    networks:
      - netbox-net

volumes:
  netbox_media:
  netbox_db:

networks:
  netbox-net:

The ports I set as environment variables are:

HOST_PORT=8010
DOCKER_PORT=8080

The Proxmox firewall rule for the VM:

proxmox firewall vm rule

All is running with no errors in the logs, and this is the docker ps output:

CONTAINER ID   IMAGE                                 COMMAND                  CREATED          STATUS                 PORTS                                                                                            NAMES
31e6f8cb2357   linuxserver/netbox:latest             "/init"                  28 minutes ago   Up 28 minutes          8000/tcp, 0.0.0.0:8010->8080/tcp, :::8010->8080/tcp                                              netbox-netbox-1
3e9c412f3d5b   postgres:13-alpine                    "docker-entrypoint.s…"   38 minutes ago   Up 38 minutes          5432/tcp                                                                                         netbox-netbox-db-1
940640d561c2   redis:6-alpine                        "docker-entrypoint.s…"   38 minutes ago   Up 38 minutes          6379/tcp                                                                                         netbox-redis-1
f86a17d94feb   ghcr.io/gethomepage/homepage:latest   "docker-entrypoint.s…"   4 hours ago      Up 4 hours (healthy)   0.0.0.0:9444->3000/tcp, :::9444->3000/tcp                                                        homepage
e314d9df5aa8   portainer/portainer-ce:latest         "/portainer"             26 hours ago     Up 7 hours             0.0.0.0:8000->8000/tcp, :::8000->8000/tcp, 0.0.0.0:9443->9443/tcp, :::9443->9443/tcp, 9000/tcp   portainer

Upvotes: 0

Views: 164

Answers (1)

infinityzxx
infinityzxx

Reputation: 319

Sorry for the late answer...

The netbox container by linuxserver is not meant to have its internal port changed from the default 8000. Change $DOCKER_PORT back to 8000 and things should work.

See https://github.com/linuxserver/docker-netbox/blob/master/Dockerfile#L67 and https://github.com/linuxserver/docker-netbox/blob/master/root/defaults/uwsgi.ini#L2 for more details...

Upvotes: 0

Related Questions