Skip to content

Ports and addresses

Every pod has a main address, https://<pod>.dockhive.sh, which serves port 80 inside the pod. When you run more than one app in a pod, you can give each of the other ports its own HTTPS address too.

For example, a pod called shop running an API on port 5100 and a web front end on port 3000:

Address Serves
https://shop.dockhive.sh port 80 (main address)
https://shop-5100.dockhive.sh the API on port 5100
https://shop-3000.dockhive.sh the web app on port 3000

Each address carries HTTP, HTTPS and WebSocket traffic, with the certificate handled for you.

Console: open the pod, find Ports & addresses and click Expose a port. Enter the port, and optionally the address you want (my-api gives my-api.dockhive.sh).

CLI:

Terminal window
hivepod expose shop 5100 # https://shop-5100.dockhive.sh
hivepod expose shop 3000 --subdomain store # https://store.dockhive.sh
hivepod ports shop # list every address

If you leave out the address, it is <pod>-<port>. If that name is taken, a short random suffix is added, such as shop-3000-7f3a.

Your app must listen on 0.0.0.0:<port>, not only on 127.0.0.1:

Terminal window
# Node / Vite
npm run dev -- --host 0.0.0.0 --port 3000
# Python
uvicorn app:app --host 0.0.0.0 --port 5100

If nothing is listening on the port yet, the address shows a DockHive “not reachable” page until your app starts.

Console: click the remove icon next to the address. CLI:

Terminal window
hivepod unexpose shop 3000 # or the address: hivepod unexpose shop store

Removing a port also removes the custom domains attached to it. The app inside the pod keeps running. The main address can’t be removed.

The hivepod mcp server has list_ports, expose_port and unexpose_port tools, so an AI coding agent can publish the app it just started and tell you the URL.

  • Up to 5 extra ports per pod, besides the main address.
  • Up to 20 extra ports across all your pods in one region.
  • Ports 1 to 65535, except 22 (SSH), which DockHive reserves.
  • HTTP, HTTPS and WebSocket only. Raw TCP ports, such as a database port, can’t be exposed. To share a database, use a managed database.
  • Linux pods only. Full-machine pods (Windows, FreeBSD) have only their main address.
  • An address name follows the same rules as a pod name: lowercase letters, numbers and hyphens, and it must not be taken by another pod or address.
  • A pod’s addresses are removed when you delete the pod.