What's a port? Common ports at a glance
If the server IP is the "building address", a port is the "unit number". Even on the same server, each program accepts connections on its own port — for example, 443 for a website and 25565 for Minecraft. When you can't connect from outside, it's usually because the port is blocked or the program isn't listening on that port.
If your server shows a service port
If the connection information on your server's detail page in My Page shows a service port, the server uses a private IP and is reached through a port on a public address. On these servers you can't use the numbers in the table below as they are.
- The port that accepts connections from outside is the service port (e.g.
123.45.67.89:20067). Give this address to players and visitors. - Inside the server, run your game or web server on the same number as the service port. If it listens on Minecraft's default 25565, connections from outside won't reach it.
- Connect over SSH or Remote Desktop with the remote access address (the port after the IP) in the connection information. Don't use that port for games or websites.
- If you need more ports, you can pay for extra ports on the server detail page. The price and period are shown there.
For Minecraft, change the port in server.properties to the service port number and restart the server.
server-port=20067
If the firewall (ufw) is on, open that number: sudo ufw allow 20067
Common ports
| Port | Used for | Open to the outside? |
|---|---|---|
| 22 (TCP) | SSH access to Linux servers | Open (default) |
| 3389 (TCP) | Windows Remote Desktop | Open (default) |
| 80 (TCP) | Website (HTTP) | When you run a website |
| 443 (TCP) | Website (HTTPS) | When you run a website |
| 25565 (TCP) | Minecraft Java Edition | When you open a Minecraft server |
| 19132 (UDP) | Minecraft Bedrock Edition | When you open a Bedrock server |
| 3306 (TCP) | MySQL / MariaDB | Don't open it |
| 5432 (TCP) | PostgreSQL | Don't open it |
| 6379 (TCP) | Redis | Don't open it |
| 3000, 8000, etc. | Apps you've built | Usually not opened; put them behind Nginx |
A Discord bot isn't a program that accepts connections from outside, so you don't need to open any ports for it.
For why you shouldn't open DB ports, see Installing a database; for how to put an app behind Nginx, see Deploying your own web app to a server.
TCP and UDP
Even with the same port number, TCP and UDP have to be opened separately. Open whichever the program's documentation says. For example, a Bedrock server uses UDP, so opening 19132/tcp won't let anyone connect.
How to open a port
See Opening firewall ports. Here's an example for Ubuntu (ufw):
sudo ufw allow 25565/tcp
sudo ufw allow 19132/udp
Check that the program has opened the port and is listening
If you still can't connect after opening the firewall, check from inside the server whether the program is really listening on that port.
sudo ss -tulpn
Find the port number in the Local Address column.
0.0.0.0:25565or*:25565— It can accept connections from outside.127.0.0.1:25565— It only accepts connections from inside the server. You need to change the listening address in the program's settings before anyone can connect from outside.- Not in the list — The program is off or using a different port.
Check from your PC whether a port is open (Windows)
Run this in PowerShell on your PC. (It can only check TCP ports.)
Test-NetConnection server-ip -Port 25565
If you see TcpTestSucceeded : True, the port can be reached from outside.