Generally, binding to ports under 1024 requires root permissions, so you can either run dxflow as the root user or configure port permissions using the operating system-specific methods described below.
dxflow uses these default ports based on boot flags:
| Flag | Port | Protocol | Description |
|---|---|---|---|
--http | 80 | HTTP | Default web interface |
--https | 443 | HTTPS | Secure web interface |
--no-http | None | Unix Socket | Local-only access |
You can configure custom ports in your configuration profile if the defaults conflict with existing services.
On Linux, you can use sudo or setcap:
sudo /path/to/dxflow
sudo setcap 'cap_net_bind_service=+ep' /path/to/dxflow
This command adds the network bind service capability to the dxflow executable, allowing it to bind to privileged ports while running as a non-root user. After running this command, dxflow will be able to listen on ports like 80 or 443 without requiring root privileges.
On macOS, you can use sudo or port forwarding:
sudo /path/to/dxflow
# Forward port 80 to 8080
echo "rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080" | sudo pfctl -ef -
This command redirects traffic from privileged ports to unprivileged ones, allowing dxflow to run on a higher port number while still accepting traffic on standard ports. After running this command, dxflow will be able to receive traffic on ports like 80 or 443 without requiring root privileges.
On Windows, you can run as administrator or use netsh:
# Run Command Prompt as Administrator, then:
/path/to/dxflow.exe
netsh http add urlacl url=http://+:80/ user=Everyone
netsh http add urlacl url=https://+:443/ user=Everyone
These commands add URL ACLs that allow any user to bind to the specified ports. After running these commands, dxflow will be able to listen on ports like 80 or 443 without requiring administrator privileges.