Prepare the workload host
Use a dedicated Linux server with a stable public IPv4 address. Create a dedicated SSH account for Nearzero, restrict inbound SSH, and treat Docker access as root-equivalent.
Managed A records target the server selected for each service. Avoid an address that changes without coordinated DNS updates.
Use Nearzero’s generated public key and protect or rotate the corresponding private key.
Host rules cannot override a cloud security group, router, or NAT. Configure both layers deliberately.
Traefik needs TCP 80 and 443. Remove conflicting listeners before setup.
Connect it in Nearzero
- 01Create or select an SSH key
Open Settings → Servers → SSH keys and place the displayed public key in the remote account’s
authorized_keys. - 02Add the server
Provide its stable public IP or hostname, SSH port, dedicated user, and the correct key.
- 03Verify the first host key
Compare the recorded OpenSSH SHA-256 fingerprint with a trusted provider console or another independent channel.
- 04Run setup intentionally
Nearzero installs and validates Docker, Swarm, Traefik, build tools, paths, and monitoring only after you request setup.
- 05Deploy a non-production service first
Confirm logs, routing, certificate issuance, and the effective firewall before assigning production.
Open only what Traefik needs
| Traffic | Scope | Why |
|---|---|---|
| 80/TCP | Public | Traefik redirects and Let’s Encrypt HTTP-01 validation. |
| 443/TCP | Public | HTTPS application traffic. |
| 443/UDP | Optional public | HTTP/3 only; not required for certificate validation. |
| 22/TCP or custom SSH | Control plane and admin ranges | Setup and maintenance. |
| 2375–2376/TCP | Never public | Docker API/proxy access is host-privileged. |
| 8080/TCP | Never public | Traefik dashboard must remain private. |
| 4500/TCP | Never public | Monitoring is an internal service. |
| 2377/TCP, 7946/TCP+UDP, 4789/UDP | Trusted Swarm peers only | Cluster control, gossip, and overlay networking. |
Single-node servers do not need public Swarm ports. Never expose the peer network at the public perimeter.
Traefik and Docker stay private
- Never publish the socket proxy, its network, or the Traefik dashboard.
- Do not attach application workloads to
nearzero-traefik-control. - Put only mutually trusted deployers on one Docker host.
- Treat arbitrary privileged Compose deployments as full host-administrator access.
- Rotate the SSH key and investigate the host after any unexplained fingerprint change.
Check from outside the server
Use the same public path your users will take. Re-run after setup, firewall changes, and every reboot.
# Run from a trusted network after server setup
curl --fail --show-error --head https://app.example.com
# Confirm that management-only ports are not public
nc -vz <server-ip> 8080
nc -vz <server-ip> 2375
nc -vz <server-ip> 2376 Questions this page answers
Can Nearzero deploy to another VPS?
Yes. Keep the control plane on one host, add other Linux servers over SSH, and choose where each app or database runs. Public traffic can go straight to that server.
Which ports should be public on a remote Nearzero server?
Usually 80 and 443 for Traefik. Keep SSH, Docker, Swarm, and Nearzero management ports off the public internet.