Private networks
A private network connects your servers over private IP addresses, isolated from the internet and from other customers. Use it for traffic between your own servers, like an app talking to its database. Private networks are included at no charge, and traffic on them isn't billed.
Create a network
- Go to Networks → Create network
- Enter a Name, for example
production-vpc. - Select the Data center. A network can't span data centers, so pick the one your servers run in.
- Enter the IP range in CIDR notation, for example
10.0.0.0/16. Use a private range. You can't change it later. - Click Create network.
Connect servers
When you create a server, select the network under Network → Private networks. A server can join several networks.
Each server gets one private IP from the network's range, the next free one. Better Stack configures it inside the server for you, as an extra network interface. The address is usually up within a minute after the server starts.
Load balancers, Kubernetes clusters and object caches join private networks too, so your servers reach them without going over the internet.
How private networks behave
- No internet access. A private network has no router, no NAT and no DHCP. Servers reach the internet over their public addresses.
- Isolated, not encrypted. Treat the network like any shared LAN: authenticate and encrypt sensitive traffic, for example with WireGuard.
- Not filtered by firewalls. Firewalls filter public traffic only. Every server on the network reaches every port your server listens on, so attach only the servers that should talk to each other.
- One data center. A network and all its servers live in the same data center.
- Standard 1500 MTU and up to 10 Gbps on each private interface, like the public ones. If you set the MTU yourself inside the server, use 1500.
- Keep the assigned MAC address. Each server's private interface only sends from the MAC address Better Stack assigned to it. A bridge, a bond or a container that puts another MAC address on the private interface sends nothing.
Service fails to bind the private IP after a restart?
A restart doesn't wait for the private interface, so a service that binds the private IP can start a moment before the address exists. Give the service a restart policy, for example Restart=on-failure with RestartSec=2 in its systemd unit, or let it bind all addresses.
Need help?
Please let us know at hello@betterstack.com.
We're happy to help! 🙏