Dockge Port Guide: Default Port 5001 and How to Change It

Graphic highlighting the default Dockge port 5001

Out of the box, the Dockge port is 5001. Right after installation you reach the interface at http://your-server-ip:5001. This guide explains how that mapping works, how to change it cleanly and how to resolve the classic port conflict error.

How the Dockge port mapping works

Dockge's own compose.yaml contains a standard Docker port mapping:

ports:
  - 5001:5001

The left number is the host port (what you type in the browser); the right number is the container port (where Dockge listens internally). Only the left side should normally be changed.

How to change the Dockge port

  1. Edit Dockge's compose file: nano /opt/dockge/compose.yaml
  2. Change the mapping, for example to expose the interface on 7001:
    ports:
      - 7001:5001
  3. Apply the change: docker compose up -d
  4. Open http://your-server-ip:7001

Fixing "port is already allocated"

If startup fails with Bind for 0.0.0.0:5001 failed: port is already allocated, another service is using 5001. You have two options:

Option 1 — find and stop the other service

sudo ss -tulpn | grep 5001

Option 2 — move Dockge to a free port

Change the host side of the mapping as shown above (e.g. 5002:5001) and re-run docker compose up -d. More startup fixes live in the common errors guide.

Port tips for remote access

  • Do not forward the Dockge port directly to the internet — the interface controls your Docker daemon.
  • Prefer a VPN (WireGuard/Tailscale) or a reverse proxy with authentication and WebSocket support.
  • If you use a firewall like UFW, allow the port only from your LAN: ufw allow from 192.168.1.0/24 to any port 5001.

New to Dockge? Start with the installation guide, then set up your admin login.

Understand HOST:CONTAINER port mapping

In 5001:5001, the value on the left is the host port and the value on the right is the port used inside the Dockge container. To browse to Dockge on port 7001 without changing the application itself, use 7001:5001. The browser then connects to http://server-ip:7001.

Diagnose a port conflict before changing anything

docker ps --format "table {{.Names}}	{{.Ports}}"
ss -ltnp | grep ':5001'

The first command shows Docker-published ports; the second shows listeners on the host. Stop the conflicting service only if you know what it is. Otherwise, choosing another unused host port is usually safer.

Firewall and reverse-proxy note

Changing Docker's host port does not automatically make the service safe for public access. If Dockge is only used on a private network, restrict the firewall accordingly. For remote use, terminate HTTPS at a trusted reverse proxy or reach the host through a VPN, and preserve WebSocket forwarding.

Official references

Technical details in this guide are checked against upstream sources. Verify release-sensitive commands before changing a production host.