Think of a server as an apartment building: the IP address is the street address and the port is the flat number. One server can run a website, email and a database at once because each service “listens” on its own port. A port is written after the address with a colon, as in 203.0.113.10:443 or localhost:3000.
Common ports
| Port | Service |
|---|---|
| 80 | HTTP |
| 443 | HTTPS, plus HTTP/3 over UDP |
| 22 | SSH and SFTP |
| 21 | FTP |
| 25 | SMTP between mail servers |
| 465 and 587 | Sending mail from apps, encrypted |
| 993 and 995 | IMAP and POP3, encrypted |
| 3306 | MySQL and MariaDB |
| 2083 and 2096 | cPanel and Webmail over HTTPS |
Ports 0-1023 are the well-known ports; on Linux only root can listen on them.
Each port number exists in two flavours: TCP, for connections that need every byte delivered in order, such as websites, email and SSH; and UDP, for fast traffic that can tolerate a lost packet, such as DNS queries, live streaming and HTTP/3.
A practical example
When you develop a Node.js app locally, it usually listens on a port like 3000 and you open it at http://localhost:3000 (see localhost):
const port = process.env.PORT || 3000;
app.listen(port);
Reading the port from the PORT environment variable instead of hard-coding it lets the same app run on any host or platform without code changes.
Common errors
EADDRINUSE: another process already holds the port, often an old copy of your app still running. See the error explained.- Connection refused: nothing is listening on that port, or the service listens only on
127.0.0.1and won’t accept outside connections. - Timeout: usually a firewall blocks the port on the server or on your network.
On ArabyHost
On the Developer and AI plans, Node.js and Python apps run through the CloudLinux selectors (Phusion Passenger). Passenger hands visitors’ requests to your app, so they reach it over ports 80 and 443 with the free SSL certificate, without you opening a public port. To set up email in Outlook or on your phone, use the encrypted IMAP and SMTP ports shown in cPanel’s email settings.
FAQ
What's the difference between ports 465 and 587 for email?
Both are for sending mail from apps. Port 465 starts encrypted straight away (SSL/TLS); 587 starts in plain text and upgrades with STARTTLS. Use whichever your mail provider lists.
How do I check whether a port is open?
Run `nc -zv example.com 443` from your computer. If you see succeeded or open, the port accepts connections; a timeout usually means a firewall is blocking it.
Why can't I send mail through port 25?
Many ISPs and cloud providers block outgoing port 25 to fight spam. Use 587 or 465 with a username and password instead.