VPS · Question & answer

Should my VPS use DHCP or a static IP configuration?

Use the addressing method documented for the selected VPS platform and image. A stable service IP can still be delivered through DHCP or metadata. Manually converting a working guest to static addressing can break routing or conflict with provisioning tools.

IntermediateVPS services; platform features and management permissions depend on the selected serviceLinux commands apply only inside a compatible Linux guest
Go to the answer

Instructions

1. Check the authoritative network assignment

Confirm the interface, address or prefix, gateway, DNS and whether DHCP, router advertisements or static configuration are expected. Use only the allocation returned for this service.

2. Inspect the existing guest manager

On a Netplan-based Linux image, read the effective configuration privately and compare it with current addresses.

Remote Linux shell
sudo netplan get
ip -brief address
ip route

netplan get is specific to Netplan images and may expose network details. Other distributions may use NetworkManager or another manager instead.

3. Plan a scoped change with console access

Identify whether cloud-init generates the network files and whether an edit would persist. If a change is required, use the supported manager and exact assigned values. Do not disable DHCP or overwrite all network configuration merely because the public IP is expected to remain stable.

Check the result

  • The guest configuration matches the provider’s assigned addressing method.
  • The intended management and application paths remain reachable after any approved change and subsequent reboot.

Troubleshooting

A manual edit disappears on reboot
A provisioning tool may regenerate the configuration; change the supported source of truth.
The static route differs from a home-network example
Cloud platforms can use routed or on-link designs that require their specific documented gateway settings.

Official references

Use the documentation for your installed version when a flag, service name or platform feature differs.