# Ports CrushMFT uses

Which ports the server listens on, and which connections it makes to other machines. For the firewall, in both directions.

Every listening port is your choice: none is fixed. The numbers here are what a new server starts with, and what is usual.

## Ports the server listens on

### On a new server

| Port | Protocol | For |
|---|---|---|
| 21 | FTP | FTP, and FTP with explicit encryption |
| 443 | HTTPS | the web interface, the admin pages, WebDAV, the API |
| 8080 | HTTP | the same, without encryption |
| 9090 | HTTP | the same, a second port |
| 2222 | SFTP | SFTP and SCP |

Change them, remove them and add others in [the ports of the server](Ports.md). On a real server, remove the plain HTTP ports or leave them for redirecting to HTTPS, and move SFTP to 22 if you want the usual port.

On Linux, a server that does not run as root cannot open ports below 1024: run on high ports and redirect to them.

### Others you may add

| Usual port | Protocol | For | See |
|---|---|---|---|
| 22 | SFTP | SFTP on its standard port | [SFTP](Ports-SFTP.md) |
| 990 | FTPS | FTP with implicit encryption | [FTP](Ports-FTP.md) |
| a range you choose, such as 2000-2100 | FTP data | passive FTP: listings and files. Open the whole range. | [FTP](Ports-FTP.md) |
| 20 | FTP data | active FTP: the server connects **out** from here | [FTP](Ports-FTP.md) |
| 80 | HTTP | redirecting to HTTPS; Let's Encrypt's proof by http-01 | [HTTP](Ports-HTTP.md) |
| 443, UDP | HTTP/3 | the web interface over QUIC | [HTTP/3](Ports-HTTP3.md) |
| 445 | SMB | the server as a Windows file share | [SMB server](Ports-SMB-Server.md) |
| 2049 | NFS | the server as an NFS export | [NFS server](Ports-NFS-Server.md) |
| 69, UDP | TFTP | TFTP | [TFTP](Ports-TFTP.md) |
| 1080 | SOCKS5 | a SOCKS proxy | [SOCKS5](Ports-SOCKS5.md) |
| any | port forward | passing a port on to another machine | [Port forward](Ports-Port-Forward.md) |
| any | S3 | the server as S3 storage, on a web port | [S3 server](Ports-S3-Server.md) |

### Between the server's own parts

| Port | Between | For | See |
|---|---|---|---|
| 9000, by custom | the internal server → a DMZ server | the internal server connects **out** to the DMZ server, and everything travels over that. Nothing has to be opened inward. | [DMZ](DMZ.md) |
| the engine port, if you set one | a job engine on another machine → the server | job engines. Without it they use the web port. | [Engines on other machines](Jobs-Engines-Other-Machines.md) |
| the web port | servers of a cluster ↔ each other | replication, session replication, and the cluster's own talk | [Replication](Replication.md), [Session replication](Session-Replication.md) |
| a port you choose, the same on all | servers that share an address ↔ each other | ServerBeat | [ServerBeat](ServerBeat.md) |
| a port the system picks, on 127.0.0.1 only | the control panel ↔ the server on the same machine | the control panel. Not reachable from the network. | |

### Addresses on the web ports worth knowing

| Path | Is | See |
|---|---|---|
| `/WebInterface/` | the web interface and the admin pages | [The WebInterface](Web.md), [The admin pages](Admin.md) |
| `/WebInterface/api/v1/` | the API | [The API](API-Getting-Started.md) |
| `/metrics` | numbers for monitoring, when turned on | [Metrics](Monitoring-Metrics.md) |
| the health addresses | whether the server is up, for a load balancer | [Health checks](Monitoring-Health.md) |
| `/.well-known/acme-challenge/` | Let's Encrypt's proof | [LetsEncrypt](Plugin-LetsEncrypt.md) |
| `/SSO_OIDC/`, `/?u=SSO_SAML…` | the way back from an identity provider | [CrushOIDC](Plugin-CrushOIDC.md), [SAMLSSO](Plugin-SAMLSSO.md) |
| `/JOBLINK/` | job engines that connect through the web port | [Engines on other machines](Jobs-Engines-Other-Machines.md) |
| `/as2v2/` | AS2 version 2, when turned on | [Receiving](AS2-Receiving.md) |

## Connections the server makes

Only what you set up. A server with local users, local files and no mail makes no outgoing connection but its check for updates.

| To | Usual port | When |
|---|---|---|
| the update service | 443 | checking for and fetching updates |
| a mail server | 25, 465, 587 | sending mail: [SMTP](Prefs-General-SMTP.md) |
| a directory | 389, or 636 with TLS | logins through [CrushLDAPGroup](Plugin-CrushLDAPGroup.md) |
| a Kerberos server | 88 | [Kerberos](Security-Kerberos.md) |
| a RADIUS server | 1812, UDP | [Radius](Plugin-Radius.md) |
| an identity provider | 443 | [CrushOIDC](Plugin-CrushOIDC.md), [SAMLSSO](Plugin-SAMLSSO.md) when signing requests |
| Duo | 443 | [CrushDuo](Plugin-CrushDuo.md) |
| Let's Encrypt, or another certificate authority | 443 | [LetsEncrypt](Plugin-LetsEncrypt.md) |
| an SMS or code service | 443 | one-time codes: [One-time codes](Security-OTP.md) |
| a log server | 514, 1514 or 6514, UDP or TCP | [Syslog](Logging-Syslog.md) |
| a network management system | 162, UDP | [SNMP traps](Monitoring-SNMP.md) |
| a database of yours | its own port | [Databases CrushMFT can use](Ops-Databases.md) |
| storage: S3, Azure, Google, Dropbox, SharePoint and the like | 443 | folders of users that are kept there: [the kinds of storage](VFS.md) |
| other servers: FTP, SFTP, SMB, WebDAV | their ports | folders of users on other servers, and jobs that copy to and from them |
| partners' AS2 addresses | usually 443 | [Sending](AS2-Sending.md) |
| an AI service, if set up | 443 | [The AI assistant](Prefs-AI-Assistant.md) |
| a DMZ server | 9000 by custom | see above |

FTP in active mode is the one case where a server connects out because a client asked: the data connection goes from the server to the client.

## A small firewall plan

For a server with a DMZ server in front:

| From | To | Open |
|---|---|---|
| the internet | the DMZ server | 443, 22 or 2222, and for FTP 21 with the passive range |
| the internal server | the DMZ server | the DMZ port, 9000 by custom |
| the DMZ server | the internal server | **nothing** |
| the internal server | mail, directory, storage | what you use from the table above |
| administrators | the internal server | 443, from the inside only |

That the DMZ server needs no way inward is the point of it.

## Things to know

- **Listening ports are per address.** A port can be bound to one address of the machine or to all of them.
- **One port, one protocol**, except that an HTTPS port also takes WebDAV, the API and S3, and an FTP port takes FTP with explicit encryption.
- **Behind a load balancer or proxy**, the ports users see are the balancer's: [Behind a proxy](Ports-Behind-a-Proxy.md).
- **Count the ports that are open** now and then. A listener added for a test and forgotten is how servers become reachable in ways nobody intended: [Hardening](Security-Hardening.md).

## Where this comes from

The ports of a new server are read from the server's code. The others are the standard ports of their protocols and what the pages of this wiki say for each part.
