Ports and Network

Which ports your deployment gets, what can reach it, and what it can reach.

Updated Dec 1, 2026

Every deployment gets at least one port on the node it runs on. Web traffic arrives on that port through the edge. Other protocols can reach it directly at the node's address. Your app can also open connections to the internet, with a few exceptions listed below.

The primary port

When a deployment is created, it receives a primary port on its node. You do not pick the number, the platform assigns a free one.

  • Your code reads it from the SERVER_PORT environment variable. It is a system variable, kept in sync by the platform.
  • The edge forwards all HTTPS traffic of your domains to this port.
  • It cannot be removed, and it is the port shown as Primary in the Network page of the deployment (in Settings).
  • If the deployment moves to another node, it gets new port numbers there (the same number of ports), and SERVER_PORT is updated. That is why you should never hard-code the number.
// Node.js
const port = Number(process.env.SERVER_PORT);
# Python
import os
port = int(os.environ["SERVER_PORT"])

Always listen on 0.0.0.0, not 127.0.0.1, or nothing outside the container can connect.

Additional ports

Some apps need more than one port, for example a game server with a query port, a separate WebSocket server, a debugger or a metrics endpoint. Paid plans can add ports from the Network page with Add port.

Plan Ports per deployment (primary included)
Free 1
Starter 3
Starter+ 3
Advanced 3
Pro 5
Pro+ 5
Enterprise 5

Compare plans on the pricing page.

Good to know about additional ports.

  • Adding or removing a port restarts the deployment. The panel shows "Port allocated. Server is restarting to apply the change..." or "Port removed. Server is restarting to apply the change...".
  • One change every 30 seconds. A second click too soon shows "Slow down - wait Xs before adding another port. The previous change is still being applied."
  • At your plan's limit, the panel answers "Your plan allows N ports per deployment. Upgrade to add more."
  • The edge never sends traffic to them. An additional port is only reachable at the node's address, for example node-host:27015. Your custom domain and canonical URL always go to the primary port.
  • Only the primary port has an environment variable. Copy the numbers of additional ports from the Network page into your own variables in the Environment tab.

TCP and UDP

Each allocated port accepts both TCP and UDP at the node's address. You can run a game server, a voice server or any custom protocol on it.

Connections made directly to the node's address do not go through the edge. That means no HTTPS certificate from us, no per-site protection and no forwarded headers. Your app handles its own security on these ports. For anything HTTP, prefer your domain through the edge.

The Network page lists each port with its full Address (host and port, with a copy button), and shows the node's Name, Host and IP. These change when the deployment moves to another node, while your domains keep working. The IP of every node is on Nodes IP and information.

Outbound connections

Your app can connect to the internet freely. It can call HTTPS APIs, connect to Discord, Telegram or WhatsApp, download packages, or reach a database hosted elsewhere.

  • Outbound traffic leaves from the node's public IP. All deployments on the same node share it. If an API limits requests per IP, other deployments on that node count too. See Server Rate Limits.
  • IP allowlists. If a remote database or API only accepts registered addresses, add your node's IP, shown in the Network page. Update it if the deployment moves to another node.

What is blocked

A few kinds of outbound traffic are blocked on every node, to keep the platform's addresses clean and to stop abuse.

Blocked Why What to do instead
Sending email over SMTP (ports 25, 465 and 587) Spam sent from shared addresses gets whole nodes blacklisted Use the HTTP API of your email provider. Most transactional email services offer one.
Outbound SSH (port 22) Commonly abused from shared addresses Clone Git repositories over HTTPS with an access token. See Clone a GitHub repository.
Private and internal address ranges Keeps containers from reaching each other or internal services Connect to other deployments at their public host and port.
Peer-to-peer file sharing (BitTorrent) Copyright complaints can get a node's address blocked Download files over HTTPS.
Tunnel services that publish your container through a third party Public web addresses go through the edge Use the Domains tab for a public HTTPS address.

Discord voice works normally. The full list of forbidden uses, such as scanners, attack tools or mining, is in the acceptable use policy.

Connecting your deployments to each other

Deployments do not share a private network. To let a bot talk to a database or an API you host on Bot-Hosting, use the address shown on that deployment, either its HTTPS URL or its node host and port. This works the same whether the two deployments are on the same node or not.

IPv4 and IPv6

  • Inbound, the address shown in the Network page is the node's IPv4 address. Use it for game servers and direct connections.
  • Through the edge, visitors reach your domains whatever their own connection, and your app always receives plain HTTP on its port.
  • Outbound, connections work over IPv4. Nodes that also have IPv6 can use it too. If a library tries IPv6 first and fails, ask it to prefer IPv4.
// Node.js, prefer IPv4 when a name has both kinds of addresses
import dns from "node:dns";
dns.setDefaultResultOrder("ipv4first");

DNS inside your container

Name resolution works out of the box. You do not need to configure resolvers. Connect to services by name rather than by IP, since providers change their addresses.

If every connection of your app fails with errors such as getaddrinfo or ENOTFOUND, check the name first, then see Connection timed out.