Changing the IP Address of a Proxmox Server
proxmox, networkingChanging the IP address of a Proxmox server seems like it should be straightforward, but there are a few gotchas that might trip you up. The process involves updating a couple of configuration files and restarting the networking service. Let's walk through it step by step.
The thing that might have brought you here is realizing that just changing the IP in the network interfaces file isn't enough - you'll also need to update the hostname configuration to maintain access to the web interface.
Here's what we need to do:
First, let's update the network interface configuration. This file tells Proxmox how to configure your network card:
nano /etc/network/interfaces
You'll see something like this:
auto lo
iface lo inet loopback
auto vmbr0
iface vmbr0 inet static
address 192.168.1.100/24
gateway 192.168.1.1
bridge-ports eno1
bridge-stp off
bridge-fd 0
Update the address
line with your new IP address. Make sure to keep the CIDR notation (the /24
at the end). If you're moving to a different subnet, you'll need to update the gateway as well.
Next, we need to update the hosts file. This is crucial because Proxmox uses this for internal routing:
nano /etc/hosts
You'll find a line that looks something like:
192.168.1.100 proxmox.local proxmox
Replace the old IP with your new one. The hostname parts (after the IP) should stay the same unless you're also changing the hostname.
Now comes the moment of truth - restarting the networking service. You have two options:
# Option 1: Restart just the networking service
systemctl restart networking
# Option 2: Restart the entire server
reboot
I tend to prefer the full reboot approach. Why? Well, while restarting just the networking service usually works, a full reboot ensures all services pick up the new IP address correctly. It's a bit like the old IT adage - when in doubt, turn it off and on again.
A word of caution: if you're doing this remotely, you'll lose your SSH connection when the networking service restarts. Make sure you have a backup way to access the server if something goes wrong. The web interface will also be available at the new IP address after the restart.
To verify everything worked:
# Check the interface configuration
ip addr show vmbr0
# Verify the web interface is accessible
curl -k https://new.ip.address:8006
That's it! Your Proxmox server should now be accessible at the new IP address. The web interface, SSH access, and all your VMs should continue working as before.
Note: This guide was written for Proxmox VE 8.3.0. The configuration files and their locations might change in future versions, but the general process should remain the same.