IPv4 and IPv6 addresses on your server

Each server comes with one public IPv4 address and a full IPv6 /64 network, both assigned at creation and both listed on the server page. They stay attached through reboots and rebuilds and are released only when you delete the server. This guide explains what you get, how to see it from inside Linux and how to serve visitors over both protocols.

Networking and security guide, updated 2026-12-03

Which addresses does a new server receive?

Two things are attached to every server the moment it is created. The first is a single public IPv4 address, such as 203.0.113.10, which is configured on the main network interface at first boot. The second is an IPv6 network with a /64 prefix, for example 2001:db8:1234:5678::/64. The image configures one address from that network, normally the one ending in ::1, and the remaining space is yours to use as you see fit.

Both values appear on the server page in the console, so you can copy them into DNS records or firewall rules before you even log in. Nothing has to be requested or activated: the addresses route to your server from the first second it runs.

The IPv4 address is included in the plan price on every family, from the Shared plans to the Dedicated CPU line. There is no separate address fee and no surcharge for IPv6.

How long does an address stay with your server?

An address belongs to the server, not to the account. It survives everything that keeps the server itself alive:

  • Reboot, shut down, power on: same IPv4, same /64.
  • Rebuild with another image: the disk is wiped, but the addresses stay. Only the SSH host keys change, so your client will warn about a new fingerprint.
  • Root password reset and rename: no effect on networking.
  • Pause for an unpaid renewal: the server is kept for 14 days and its addresses are kept with it.

Deleting the server releases both the IPv4 address and the IPv6 network back to the pool, and a later server will receive different ones. If an address matters to you, for example because it is listed in a partner allowlist or has a reverse DNS entry you asked for, rebuild instead of deleting and re-ordering.

Can you buy additional IPv4 addresses?

Each server has exactly one IPv4 address and that is the whole offer: there are no extra or floating IPv4 addresses for sale. The practical answer to needing more is usually IPv6, where your /64 holds more addresses than you will ever use, or a reverse proxy that serves many sites from one IPv4 address.

Common patterns that work with one IPv4 address:

  • Many HTTPS sites on one address through name-based virtual hosts and SNI in nginx, Caddy or HAProxy, covered in the nginx HTTPS guide.
  • Several services on different ports, each opened in the firewall.
  • Separate addresses per service over IPv6, as shown in adding IPv6 addresses.
  • A second server when you truly need a second public IPv4 endpoint, which also gives you a second failure domain.

What is an IPv6 /64 and how big is it?

An IPv6 address is 128 bits long. The /64 means the first 64 bits are fixed by the network (the prefix) and the last 64 bits are free for hosts. That leaves 2 to the power of 64 host addresses, about 18 quintillion, inside the single network routed to your server.

Addresses are written in eight groups of four hexadecimal digits. Leading zeros may be dropped and one run of zero groups may be replaced by ::. So 2001:0db8:1234:5678:0000:0000:0000:0001 is the same as 2001:db8:1234:5678::1. When you add an address in a config file you always write it with its prefix length, as 2001:db8:1234:5678::1/64.

The /64 boundary is not arbitrary. Automatic address configuration (SLAAC) and many tools assume the host part is exactly 64 bits, which is why a /64 is the normal size for a single network segment.

SLAAC or static: how does the server get its IPv6 address?

There are two ways a Linux machine can learn an IPv6 address. With SLAAC (stateless address autoconfiguration) the router announces the prefix and the host builds its own address from it. With static configuration the address is written into a config file and never changes.

On a server, static is the right choice for the address you publish in DNS. An address that is derived from a MAC address or a random value can change after a rebuild, and a DNS record pointing to it would then break. Cloud images set up the main address through cloud-init, which writes it into the network config for you. You can see what was chosen with:

ip -6 addr show scope global

Lines marked dynamic came from router announcements; lines without it were configured statically. Extra addresses that you add yourself should always be static.

What about IPv6 privacy addresses?

Desktops often use privacy extensions (RFC 8981, formerly RFC 4941), which create short-lived random addresses for outgoing connections so websites cannot follow a laptop by its address. On a server that is usually unwanted: outgoing mail, API allowlists and log analysis all prefer one predictable source address.

Check the setting with:

sysctl net.ipv6.conf.all.use_tempaddr

A value of 0 means privacy addresses are off, which is the normal state on server images. If you see 2, set it back to 0 in a file such as /etc/sysctl.d/60-ipv6.conf and apply it with sysctl --system. On netplan systems you can also add ipv6-privacy: false to the interface.

How do you check your addresses from inside Linux?

The brief form of the ip command shows everything on one line per interface:

$ ip -br a
lo      UNKNOWN  127.0.0.1/8 ::1/128
eth0    UP       203.0.113.10/32 2001:db8:1234:5678::1/64 fe80::9400:ff:fe12:3456/64

Your interface may be called eth0, ens3 or enp1s0; the name depends on the image. The fe80:: address is a link-local address that every IPv6 interface has; it is used to talk to the gateway and is never reachable from the internet. The IPv4 prefix length depends on how the network is delivered and can be /32 or a wider value; both are normal.

To see how traffic leaves the server, list the routes:

ip route
ip -6 route

Then confirm reachability from the outside with curl -4 https://example.com and curl -6 https://example.com, or with ping -6 to a known IPv6 host.

How do you run services on both IPv4 and IPv6?

A dual-stack service listens on both protocols. Most daemons do that by default when told to listen on all addresses. In nginx you need two lines:

listen 80;
listen [::]:80;

Check what is actually bound with ss -tlnp. A line with 0.0.0.0:80 serves IPv4 and one with [::]:80 serves IPv6. If only the IPv4 line shows up, visitors with IPv6 will fall back to IPv4 when the AAAA record exists but nothing answers, which costs them a timeout of several seconds in some clients.

Remember the firewall too: ufw handles both protocols when IPV6=yes is set in /etc/default/ufw, which is the default. With nftables, use the inet family so one rule set covers both. The firewall guide walks through both tools.

How do AAAA records fit in?

Visitors find your IPv4 address through an A record and your IPv6 address through an AAAA record. A dual-stack site publishes both for the same name:

example.com.   3600  IN  A     203.0.113.10
example.com.   3600  IN  AAAA  2001:db8:1234:5678::1

Add the AAAA record only after the service really answers on IPv6. Test with curl -6 -I https://example.com from another machine with IPv6, or check the listening socket and firewall first. Modern clients try both protocols and use whichever connects first, so a working AAAA record makes no difference to IPv4-only visitors.

Setting up the records at your DNS provider is covered step by step in pointing a domain to your server, and the record types themselves in how DNS works.

Questions about this guide

Does a rebuild change my IP address?

No. A rebuild wipes the disk and installs the new image, but the IPv4 address and the IPv6 /64 stay the same. Clear the old host key with ssh-keygen -R 203.0.113.10 before reconnecting.

Can I keep my IP address after deleting a server?

No. Deleting releases both addresses to the pool. If you need the same address on a fresh system, use rebuild instead of delete.

Is IPv6 enabled by default?

Yes. The image configures one address from your /64 at first boot, so the server answers on IPv6 right away. Check with ip -6 addr show scope global.

Can I disable IPv6?

You can, with net.ipv6.conf.all.disable_ipv6 = 1 in a sysctl file, but it is rarely a good idea: many updates and package mirrors are reachable over IPv6 and an AAAA record pointing at a disabled stack breaks visitors. Firewall it instead if needed.

Why does my server show a /32 on IPv4?

Some networks deliver the IPv4 address as a single host with a separate on-link gateway route. It works exactly like a wider prefix for everything you do on the server.

How many IPv6 addresses can I use?

As many as you need from your /64. See adding IPv6 addresses for persistent configuration on each distribution.