Knowledge Base · Networking
Configure IPv6 on a Cloud VM (Netplan)
Manually assign a static IPv6 address via Netplan on Ubuntu and prevent cloud-init from overwriting it on every reboot.
⏱ 5–10 minutes👤 All Users🌐 Ubuntu 24.04 · Netplan📍 IN-WEST3 Region
🌐
What You’ll Accomplish
This guide walks you through getting your IPv6 address from the CloudPe dashboard, disabling cloud-init network regeneration, editing your Netplan YAML config to add the static IPv6 address and route, applying the changes live, and verifying connectivity — all without rebooting or losing access to your VM.
✓
Prerequisites
Ensure these are in place before you begin
💻
Running Cloud VM
Ubuntu 24.04 VM already deployed on CloudPe
🔐
Root / sudo Access
SSH into the VM as root or a sudo-capable user
🌐
IPv6 Enabled Region
VM is in a region that provides IPv6 (e.g. IN-WEST3)
1
Get Your IPv6 Address from the Dashboard
CloudPe Console → Virtual Machines → VM Overview → Network
1
Open the VM Overview page
Log in to cmp.dashboard.controlcloud.app. From the left sidebar navigate to Compute → Virtual Machines and click on your VM name to open its overview.
2
Note down both IP addresses from the Network card
In the Overview tab, locate the Network card (highlighted in green). Write down both your IPv4 address and your IPv6 address — you will need them in Step 3.
ℹ Note your addressesYou need both: the IPv4 address (e.g.
188.241.61.13) and the IPv6 address (e.g. 2405:7140:4::1eb). Both go into the Netplan config in Step 3.2
Disable Cloud-Init Network Management
Prevents Netplan from being overwritten on every reboot
By default, cloud-init regenerates
/etc/netplan/50-cloud-init.yaml on every reboot, wiping any manual changes. Disable this before editing Netplan.⚠ Do this firstComplete this step before editing the Netplan file — otherwise your changes will be lost after the next reboot.
1
SSH into your VM and run the following commands
Navigate to the cloud-init config directory and rename the auto-netplan file to disable it:
✓ Reboot-safeYour manual Netplan config will now survive reboots. To re-enable cloud-init later, rename the file back by removing the
.disabled suffix.3
Edit the Netplan Configuration File
/etc/netplan/50-cloud-init.yaml
1
Open the file in a text editor
The file already contains your IPv4 settings. You will add the IPv6 address and route to it.
2
Replace the file contents with the following YAML
Keep your actual IPv4 address in the
addresses list and substitute your IPv6 address if it differs.⚠ YAML Indentation WarningYAML is whitespace-sensitive. Use 2-space indentation throughout — tabs will cause a parse error. The
addresses and routes blocks must be indented under enp1s0.4
Apply the Netplan Configuration
Makes changes live without rebooting
Apply your changes immediately using
netplan apply. This reconfigures the network interface without requiring a reboot — your SSH session stays alive.ℹ Syntax error recoveryIf Netplan reports a YAML syntax error, run
netplan try instead — it applies changes with a 120-second auto-revert timer if something goes wrong.5
Verify the IPv6 Address is Assigned
Confirm everything is working correctly
Run the following commands to confirm the IPv6 address has been assigned and is reachable.
A successful setup shows your
2405:7140:4::1eb address listed as scope global (not link-local) in the ip addr output.Expected IPv6 address
2405:7140:4::1eb/64Expected scope
scope globalDefault IPv6 route
::/0 via 2405:7140:4::1Cloud-init disabled
99-run-auto-netplan.cfg.disabled✓ Setup completeIf
ping6 returns responses, your IPv6 is fully configured and will persist across reboots.?
Frequently Asked Questions
Common issues and answers
Why must I disable cloud-init before editing Netplan?
Cloud-init writes a fresh
50-cloud-init.yaml on every boot using metadata from the cloud provider. If you edit the file first without disabling cloud-init, your changes will be overwritten on the next reboot.My SSH connection dropped after running netplan apply — what happened?
This usually means the IPv4 configuration changed unexpectedly. Use
netplan try instead of netplan apply — it auto-reverts after 120 seconds if connectivity is lost.I see the IPv6 address but ping6 fails — why?
Check that your Security Group allows ICMPv6 traffic. In the CloudPe dashboard go to Networking → Security Groups, edit the group attached to your VM, and add an inbound rule for IPv6 ICMP (protocol 58).
Will this config survive a reboot?
Yes — provided you completed Step 2 (disabling cloud-init) before editing the file. The renamed
99-run-auto-netplan.cfg.disabled file prevents cloud-init from regenerating the Netplan config on subsequent boots.What does dhcp6: false do?
Setting
dhcp6: false prevents the system from trying to auto-assign an IPv6 address via DHCPv6, which would conflict with our static assignment. The IPv6 address is assigned manually via the addresses list.CloudPe Knowledge Base · Networking · April 2026
Ubuntu 24.04NetplanIPv6