---
title: Port Numbers List: Common Ports Cheat Sheet | Relic
description: A common ports cheat sheet grouped by use: web, mail, file and shell, databases and infrastructure. Every port number with its protocol and the service that runs there.
canonical: https://relic.space/blog/port-numbers-list
source: https://relic.space/llms.txt
---
[Developer cheat sheets](https://relic.space/blog/topics/dev-reference)

# Port numbers list

This is a common ports cheat sheet grouped the way you actually look them up: web, mail, file and shell, databases, infrastructure, and the local dev ports. Each row lists the number, the protocol that matters, and what runs there, so you can stop guessing whether Postgres is 5432 or 5433.

[JGJordan Gibbs](https://relic.space/authors/jordan-gibbs) July 10, 2026 5 min readUpdated September 12, 2026

## What are the most common port numbers?

The short list: 80 and 443 for web, 22 for SSH, 25, 587 and 465 for mail out, 993 for IMAP over TLS, 53 for DNS, 3306 for MySQL, 5432 for PostgreSQL, 6379 for Redis, 27017 for MongoDB, 3389 for Remote Desktop and 445 for SMB. Everything below groups them by job.

A port number is a 16-bit label that lets one machine run many network services at once. An IP address gets a packet to the right host; the port gets it to the right program on that host. There are 65,536 of them (0 through 65535), and the numbers below are the small handful that people memorize, mistype, or search for over and over.

## What are the three port ranges?

[RFC 6335](https://www.rfc-editor.org/rfc/rfc6335.html) splits the space into three bands, and knowing which band a number lives in tells you a lot about it.

* **Well-known ports, 0 to 1023.** Assigned to core services (HTTP, SSH, DNS). On Unix-like systems, binding one usually requires root or an explicit capability.
* **Registered ports, 1024 to 49151.** Assigned by IANA to specific applications on request (databases, app servers). No special privilege needed to bind them.
* **Dynamic or ephemeral ports, 49152 to 65535.** Never assigned permanently. The operating system hands these out as the source port for outbound connections.

Ports also come in two flavours: **TCP**, which is connection-oriented and ordered, and **UDP**, which is fire-and-forget. Most services pick one, a few use both, and the tables below note the protocol wherever it is not obvious.

## Web

|      | Port | Protocol  | Service                        |
| ---- | ---- | --------- | ------------------------------ |
| 80   | TCP  | HTTP      | Unencrypted web traffic        |
| 443  | TCP  | HTTPS     | TLS-encrypted web traffic      |
| 8080 | TCP  | HTTP alt  | Proxies, app servers, dev HTTP |
| 8443 | TCP  | HTTPS alt | Secondary or admin HTTPS       |

Only the first three are what they look like in the [IANA port registry](https://www.iana.org/assignments/service-names-port-numbers): 80 is http, 443 is https, and 8080 is registered as http-alt. 8443 is registered to something else entirely (pcsync-https), so its use as a second HTTPS port is convention rather than an assignment.

## Mail

Mail is the group people get wrong most, because sending and receiving each have an old plaintext port and a newer encrypted one.

|     | Port | Protocol        | Service                               |
| --- | ---- | --------------- | ------------------------------------- |
| 25  | TCP  | SMTP            | Server-to-server mail relay           |
| 587 | TCP  | SMTP submission | Sending mail from a client (STARTTLS) |
| 465 | TCP  | SMTPS           | Sending mail over implicit TLS        |
| 110 | TCP  | POP3            | Downloading mail, plaintext           |
| 995 | TCP  | POP3S           | Downloading mail over TLS             |
| 143 | TCP  | IMAP            | Reading mail on the server, plaintext |
| 993 | TCP  | IMAPS           | Reading mail on the server over TLS   |

For sending mail from an app or client, use 587 with STARTTLS as the default, or 465 for implicit TLS. Port 25 is for server-to-server relay and is blocked outbound by most consumer ISPs and cloud providers to cut down on spam, so it is rarely the right choice from an application.

## File transfer and remote shell

|         | Port | Protocol         | Service                             |
| ------- | ---- | ---------------- | ----------------------------------- |
| 20 / 21 | TCP  | FTP              | Data (20) and control (21) channels |
| 22      | TCP  | SSH / SFTP / SCP | Encrypted shell and file transfer   |
| 23      | TCP  | Telnet           | Legacy remote shell, unencrypted    |
| 69      | UDP  | TFTP             | Trivial FTP, PXE and network boot   |
| 445     | TCP  | SMB              | Windows file and printer sharing    |
| 3389    | TCP  | RDP              | Windows Remote Desktop              |

SSH on 22 is the workhorse here, and the same port carries SFTP and SCP. If you are generating the keys that log in over it, our comparison of [Ed25519 vs RSA](https://relic.space/blog/ed25519-vs-rsa)covers which key type to pick. For the two Windows rows, Microsoft’s own [network port requirements](https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/service-overview-and-network-port-requirements) list SMB on TCP 445 and Remote Desktop on 3389.

## Databases

|       | Port | Protocol             | Service                 |
| ----- | ---- | -------------------- | ----------------------- |
| 1433  | TCP  | Microsoft SQL Server | Default MSSQL instance  |
| 3306  | TCP  | MySQL / MariaDB      | Default MySQL server    |
| 5432  | TCP  | PostgreSQL           | Default Postgres server |
| 6379  | TCP  | Redis                | Key-value store         |
| 27017 | TCP  | MongoDB              | Default mongod instance |
| 1521  | TCP  | Oracle               | Default Oracle listener |

These are defaults, and every one of them is a setting you can change. PostgreSQL, for example, documents [5432 as the default for its port option](https://www.postgresql.org/docs/current/runtime-config-connection.html). Oracle is the odd one out in the IANA registry: 1521 is registered to an unrelated license manager, and Oracle simply adopted it as the listener default.

## Infrastructure and directory

|           | Port      | Protocol | Service                                                            |
| --------- | --------- | -------- | ------------------------------------------------------------------ |
| 53        | TCP + UDP | DNS      | Name resolution (UDP for queries, TCP for large or zone transfers) |
| 67 / 68   | UDP       | DHCP     | Server (67) and client (68)                                        |
| 123       | UDP       | NTP      | Network time synchronization                                       |
| 161 / 162 | UDP       | SNMP     | Polling (161) and traps (162)                                      |
| 389       | TCP       | LDAP     | Directory queries, plaintext or STARTTLS                           |
| 636       | TCP       | LDAPS    | Directory queries over TLS                                         |
| 5060      | TCP + UDP | SIP      | VoIP call signaling                                                |

DNS on 53 is the classic “uses both” case. Ordinary lookups go over UDP because they are small and a lost packet is cheap to retry, but responses larger than the UDP limit and full zone transfers fall back to TCP. NTP on 123 and SNMP on 161 stay on UDP, where the low overhead matters more than guaranteed delivery.

## Local development conventions

None of these belong to the tools that use them. IANA has 3000 and 8000 registered to unrelated services, and 5173 is not assigned at all. Frameworks just picked them, and they are the ports a developer types most in a day.

|      | Port | Protocol          | Convention                                               |
| ---- | ---- | ----------------- | -------------------------------------------------------- |
| 3000 | TCP  | Node dev server   | Next.js default, Create React App, most Express examples |
| 5173 | TCP  | Vite dev server   | Vite's default port                                      |
| 8000 | TCP  | Python dev server | Django runserver, http.server, Uvicorn                   |

Nothing enforces a dev port, so nothing stops two projects from both wanting 3000\. When a tool reports that a port is already in use, another process is simply holding that socket; the number itself carries no special status. Stop the other process or pass a different port.

## How do you find what is using a port?

When a service will not start because its port is taken, you need to find the process holding it. The command differs by operating system, but the idea is the same: list open sockets and match the port.

Check who holds a port

# macOS and Linux
lsof -i :3000

# Linux (modern)
ss -ltnp | grep :3000

# Windows
netstat -ano | findstr :3000

Each of these prints the process ID (PID) bound to the port. Once you have the PID you can stop that process, or start your own service on a different port. On Windows the PID from netstat maps to a process in Task Manager; on macOS and Linux you can pass it to kill. That is far quicker than restarting the whole machine to free the port.

## Where to go from here

Ports sit one layer above IP addressing, so this pairs naturally with the [subnet cheat sheet](https://relic.space/blog/subnet-cheat-sheet) when you are reasoning about what can reach what. For the encrypted services in these tables, the plain-English background on [what AES encryption is](https://relic.space/blog/what-is-aes-encryption) explains what the TLS ports are actually protecting. And when the thing you are looking up is a text pattern instead of a number, the [regex cheat sheet](https://relic.space/blog/regex-cheat-sheet) is the sibling reference in this [set of cheat sheets](https://relic.space/blog/topics/dev-reference).

## Sources

* [RFC 6335: IANA Procedures for the Management of the Service Name and Transport Protocol Port Number Registry](https://www.rfc-editor.org/rfc/rfc6335.html), RFC Editor (2011)
* [Service Name and Transport Protocol Port Number Registry](https://www.iana.org/assignments/service-names-port-numbers), IANA
* [Service overview and network port requirements for Windows](https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/service-overview-and-network-port-requirements), Microsoft Learn
* [Connections and Authentication: port](https://www.postgresql.org/docs/current/runtime-config-connection.html), PostgreSQL Documentation

JG

Written by

[Jordan Gibbs](https://relic.space/authors/jordan-gibbs)Founder, Relic

Jordan Gibbs is the founder of Relic, an end-to-end encrypted, permanent, searchable memory for everything you copy. He writes widely about AI, agents, and practical tooling on Medium, where he is read by tens of thousands, and builds privacy-first software. Here he covers how everyday tools like the clipboard actually work, and how to use them without handing your data to someone else.

[Medium](https://medium.com/@jordan%5Fgibbs)[GitHub](https://github.com/jordan-gibbs)[LinkedIn](https://www.linkedin.com/in/jordan--gibbs/)

Part of

[Developer cheat sheets](https://relic.space/blog/topics/dev-reference)
* [Regex cheat sheet· pillar](https://relic.space/blog/regex-cheat-sheet)
* [How to copy and paste in Vim](https://relic.space/blog/how-to-copy-and-paste-in-vim)
* [How to copy to the clipboard from the command line](https://relic.space/blog/copy-to-clipboard-from-the-command-line)
* [What AI crawlers fetch from a small open-source site: 31 days of logs](https://relic.space/blog/ai-crawlers-on-a-small-site)
* [JSONPath examples](https://relic.space/blog/jsonpath-examples)
* [jq cheat sheet](https://relic.space/blog/jq-cheat-sheet)
* [wget vs curl: what is the difference?](https://relic.space/blog/wget-vs-curl)
* [Subnet cheat sheet](https://relic.space/blog/subnet-cheat-sheet)
* [Ed25519 vs RSA](https://relic.space/blog/ed25519-vs-rsa)
* [TOML vs YAML](https://relic.space/blog/toml-vs-yaml)

Keep reading

[Pillar·10 minRegex cheat sheetThe regex pieces you actually reach for, character classes through lookarounds, with the flavor differences that bite you and a handful of patterns worth saving.Read ](https://relic.space/blog/regex-cheat-sheet)[9 minHow to copy and paste in Vimy copies and p pastes, but only inside Vim. How registers work, how to reach the system clipboard when your build says -clipboard, and how to copy out over SSH and in tmux.Read ](https://relic.space/blog/how-to-copy-and-paste-in-vim)[8 minHow to copy to the clipboard from the command linePipe any command into the clipboard on Mac, Linux, Windows and WSL. The commands for each, plus the newline and encoding problems that break pasted text.Read ](https://relic.space/blog/copy-to-clipboard-from-the-command-line)

developernetworkingreference
