Repository navigation
Network Management
Guide to creating, configuring, and managing Hetzner Cloud private networks.
Private networks allow your servers to communicate securely without exposing traffic to the public internet.
Benefits:
- 🔒 Security — Internal traffic encrypted and isolated
- 💰 Cost — Reduce public IP usage
- 🚀 Performance — No internet latency for inter-server traffic
- 🏗️ Architecture — Organize multi-tier applications (web, app, database)
- 🔄 Scalability — Add servers without new public IPs
Common Use Cases:
- Database servers in private network, accessed by app servers
- Load balancer in public, backend servers in private
- Microservices cluster all on private network
- CI/CD infrastructure isolated for security
- Open the NETWORKS panel in the sidebar
- Click the + button
- Enter Network Name (e.g.,
production-internal) - Confirm IP Range (defaults to
10.0.0.0/8) - Network created within seconds
- During Step 5 of server wizard
- Choose Create New Network
- Enter network name and confirm CIDR
- Server automatically joins on creation
IP Range (CIDR):
- Standard private ranges:
-
10.0.0.0/8(10.0.0.0 – 10.255.255.255) — Largest, most common -
172.16.0.0/12(172.16.0.0 – 172.31.255.255) — Medium -
192.168.0.0/16(192.168.0.0 – 192.168.255.255) — Smallest
-
Default: 10.0.0.0/8 (sufficient for most deployments)
Important:
- Don't overlap ranges across projects
- Ensure ranges don't conflict with your office/home network
- Hetzner assigns IPs within your range to servers
The NETWORKS panel shows:
- Network Name — Friendly identifier
-
IP Range — CIDR notation (e.g.,
10.0.0.0/8) - Subnets — Child nodes showing zones and specific subnets
- Servers — Child nodes showing servers in this network
Example:
NETWORKS
├── production-internal (10.0.0.0/8)
│ ├── Zone 1 (10.0.0.0/24)
│ │ ├── web-server-01 (10.0.0.2)
│ │ └── db-01 (10.0.0.3)
│ ├── Zone 2 (10.0.1.0/24)
│ │ └── web-server-02 (10.0.1.2)
│ └── Zone 3 (10.0.2.0/24)
└── staging-network (172.16.0.0/12)
├── Zone 1 (172.16.0.0/24)
└── staging-app-01 (172.16.0.2)
Hetzner automatically creates subnets within your network, organized by zone.
What are Zones?
- Hetzner datacenters in different locations have multiple zones
- Each zone represents physically separate infrastructure
- Distributing across zones improves redundancy and fault tolerance
- Examples:
us-west-1,eu-central-1a,eu-central-1b, etc.
Subnet Allocation:
-
10.0.0.0/24→ Zone 1 (256 IPs) -
10.0.1.0/24→ Zone 2 (256 IPs) -
10.0.2.0/24→ Zone 3 (256 IPs) - etc.
Server IP Assignment:
- When a server joins a network, Hetzner assigns an IP from the appropriate zone subnet
- Location chosen during server creation determines zone
- Private IP remains static for the server's lifetime
During Step 5 of server creation wizard:
- Choose Select Existing Network or Create New Network
- Server joins selected network
- Server gets both public and private IP
- Private IP is accessible to other network members
Hetzner Cloud doesn't support adding/removing networks post-creation. To move a server:
- Create snapshot of current server
- Create new server from snapshot
- Add it to desired network
- Delete old server
┌─────────────────────────────────────────────────────┐
│ PUBLIC NETWORK (Default) │
│ ┌──────────────────────────────────────────────┐ │
│ │ Load Balancer (Public IP) │ │
│ │ ↓ ↓ │ │
└──────────────────────────────────────────────────────┘
│ │
↓ ↓
┌─────────────────────────────────────────────────────┐
│ PRIVATE NETWORK (10.0.0.0/8) │
│ ┌──────────────────────────────────────────────┐ │
│ │ Web Server #1 (10.0.0.2) Web Server #2 │ │
│ │ Web Server #3 (10.0.0.4) (10.0.0.3) │ │
│ │ │ │
│ │ All ↓ communicate privately │ │
│ │ │ │
│ │ ┌──────────────────────────────────────┐ │ │
│ │ │ Database Server (10.0.0.5) │ │ │
│ │ │ (No public IP) │ │ │
│ │ └──────────────────────────────────────┘ │ │
│ └──────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────┘
Benefits:
- Database not exposed to internet
- Web servers communicate privately
- Load balancer distributes traffic
- Single point of entry
EUROPE (us-east-1)
├── Network: eu-prod (10.0.0.0/8)
│ ├── web-01 (10.0.0.2)
│ ├── app-01 (10.0.0.3)
│ └── db-01 (10.0.0.4)
ASIA (ap-south-1)
├── Network: ap-prod (10.1.0.0/8)
│ ├── web-02 (10.1.0.2)
│ ├── app-02 (10.1.0.3)
│ └── db-02 (10.1.0.4)
Note: Different networks cannot directly communicate. Use Tailscale or VPN to link them.
- Traffic within a network is encrypted
- Private IPs are not routable on the public internet
- Built-in firewall rules can be applied
- Use security groups/firewalls to restrict port access
- No public IPs on databases — Keep them in private networks
- Principle of least privilege — Each server only exposes needed ports
- VPN for multi-region — Use Tailscale for cross-network communication
- Separate staging/prod networks — Never mix environments
Network: production-internal (10.0.0.0/8)
Load Balancer (10.0.0.2):
- Accepts port 80 (HTTP) from internet
- Forwards to port 8080 on app servers privately
App Servers (10.0.0.3, 10.0.0.4):
- Accept port 8080 from 10.0.0.2 (load balancer only)
- Accept port 5432 from database only
- All other ports DENYed
Database (10.0.0.5):
- Accept port 5432 from 10.0.0.3, 10.0.0.4 only
- No public IP
- No internet access
- Right-click network in NETWORKS panel
- Choose Delete Network
- Confirm (warning shown if servers attached)
- Network deleted immediately
Before Deleting:
- Remove all servers from network
- Verify no dependencies
- No data recovery possible
Symptoms: Ping fails between servers in same network
Solutions:
- Check firewall rules (Hetzner Cloud Console)
- Ensure both servers use same network
- Verify no OS-level firewall is blocking (e.g., ufw)
- Try from another server to isolate issue
Possible Causes:
- Network saturation (rare)
- OS-level TCP window issues
- Packet loss on public internet
- Wrong MTU settings
Solutions:
- Check cloud-init logs on servers:
/var/log/cloud-init.log - Use
iperfto meter throughput - Verify no burst/rate limiting on storage
Symptoms: Server shows public IP but no private IP
Cause: Server created before network, or not added during creation
Solution: Create new server in next 30 days (old servers can't be added post-creation in current Hetzner API)
Configure networking on boot via cloud-init:
#cloud-config
packages:
- net-tools
- curl
runcmd:
- ip route show # Verify routing
- hostname -I # Show all IPs
- ping 10.0.0.3 # Test connectivityNext: Set up SSH Keys & Authentication 👉