Ports
| Service | Port | Notes |
|---|---|---|
| Edge proxy (HTTP) | 80 |
Caddy. Redirects to HTTPS |
| Edge proxy (HTTPS) | 443 |
Caddy. TLS terminates here |
| Edge admin | unix socket | 0600 in rexenv’s config dir — never a TCP port |
| Embedded DNS | 15353 (UDP) |
macOS, Linux. On Windows it is 53 — see below |
| Shared nginx | 18088 |
One server block per site, behind the edge |
| php-fpm pools | 9774, 9780–9785 |
One pool per installed PHP minor. php-cgi on Windows |
| php-fpm debug pools | 9981–9985 |
Started on demand for Xdebug-toggled sites (8.1–8.5) |
| Xdebug DBGp | 9003 |
Your IDE listens. rexenv binds nothing here |
| FrankenPHP overrides | 8200–8299 |
Per site, loopback only |
| Apache overrides | 8300–8399 |
Per site, loopback only |
| OpenLiteSpeed | 8400–8499 |
Per site, loopback only. macOS and Linux |
| MySQL | 13306 |
|
| MariaDB | 13307 |
|
| PostgreSQL | 15432 |
|
| Redis | 16379 |
|
| Mailpit SMTP | 11025 |
|
| Mailpit web UI | 18025 |
|
| Adminer | no port | Served as an internal vhost through the shared nginx |
| cloudflared | no port | Outbound-only; nothing listens |
Windows differs in two rows, and only two
Section titled “Windows differs in two rows, and only two”The DNS answerer binds 53 on 127.0.0.1, not 15353. Windows’ NRPT rule has no port
field — it can name a namespace and a name server, and nothing else — so the answerer has to
be on the port the resolver will ask. It is loopback-only, which is also why there is no
Windows Defender Firewall alert on first run.
The PHP pools are php-cgi, not php-fpm, because php-fpm is not part of the official
PHP Windows builds. The port numbers and the formula are unchanged.
Everything else in the table above is the same on Windows as on macOS — except the rows for components the Windows build does not have at all: MariaDB, Redis, Apache, FrankenPHP and OpenLiteSpeed never bind anything there, because they are refused rather than installed.
Linux uses the macOS numbers
Section titled “Linux uses the macOS numbers”Every row above holds on Linux as written — the resolver on 15353, php-fpm pools, FrankenPHP’s
and OpenLiteSpeed’s ranges — except the components the Linux build does not have: MariaDB, Redis and Apache never
bind anything there, and the debug pools never start, because there is no Xdebug to load. The
resolver is a systemd user unit, and a network link, rexenv0, is what sends .rex to it.
Why the odd numbers
Section titled “Why the odd numbers”They are offset from the usual defaults on purpose. Mailpit’s stock ports are 1025 and 8025, MySQL’s is 3306 — using them would mean rexenv collides with a standalone Mailpit, a MailHog, another local environment, or a database you installed yourself.
The offsets are the difference between rexenv coexisting with your current setup and demanding you dismantle it first.
The php-fpm pool numbering is not a range
Section titled “The php-fpm pool numbering is not a range”Pool ports are computed as 9700 + major×10 + minor. That puts PHP 7.4 at 9774, below
the 8.x block at 9780–9785, rather than at the start of a tidy contiguous range.
It is the formula being honest rather than the numbers being pretty: the port tells you which version is on the other end of it, and that stays true when a version is added or removed.
Xdebug listens on your side
Section titled “Xdebug listens on your side”9003 is the standard DBGp port and it is the only port in this table rexenv does not
bind. PHP connects outward to your IDE, so your editor is the listener. That is why the
Xdebug toggle needs no port configuration in rexenv — only in your IDE.
Every start is port-gated
Section titled “Every start is port-gated”Nothing starts without checking its port first. When one is taken, the message names the process holding it and gives a copy-pasteable way to deal with it, rather than reporting a generic failure to start.