How to change UniFi controller IP

Published onby Iron

Changing the IP address of your UniFi Controller might sound intimidating, but it's quite manageable with the right steps.

Whether you’ve moved your controller to a different subnet or you’re just setting up a new network configuration, this guide will walk you through the process to make the change smoothly.

Let’s dive in!

Table of Contents

Why Change the IP Address?

There are several reasons you might need to change the IP address of your UniFi Controller:

  • Network Reconfiguration: You might be reorganising your network and need to place the controller in a different subnet.

  • IP Conflict: Another device on the network might have the same IP address, causing conflicts.

  • Static IP Setup: Switching from a dynamic to a static IP setup can improve stability and management.

Prerequisites

Before starting, ensure you have the following:

  • Administrative access to your UniFi Controller.
  • SSH access to the UniFi device if you’re using the command line method.
  • The new IP address you plan to assign.

Method 1: Changing IP Address via UniFi Controller GUI

This method uses the graphical interface of the UniFi Controller. It's user-friendly and suitable for those who prefer a visual approach.

Step 1: Access the UniFi Network Controller

  1. Open your web browser and navigate to your UniFi Controller’s IP address. Log in with your admin credentials.
  2. Once logged in, go to the Settings section. This is usually represented by a gear icon on the left sidebar.

Step 2: Modify Network Settings

  1. In the Settings menu, select Networks.

  2. Locate the network configuration you want to change. Click on it to edit.
  3. In the network settings, update the Gateway/Subnet section with the new IP address.

  4. Save the changes by clicking the appropriate button, usually labeled as "Save" or "Apply".

Step 3: Update DHCP Reservations

If your network uses DHCP reservations, you need to update your DHCP server settings to reflect the new IP address of the UniFi Controller.

  1. Access your router’s web interface and navigate to the DHCP settings.
  2. Find the DHCP reservation entry for your UniFi Controller.
  3. Update the reservation with the new IP address.
  4. Save the changes.

Method 2: Changing IP Address via SSH

This method is for those who prefer using command line tools or cannot access the UniFi Controller GUI. It involves connecting to the UniFi device via SSH and updating the IP address directly.

Step 1: Access the Device via SSH

  1. Open your terminal or SSH client.
  2. Connect to your UniFi device using its current IP address. Use the following command:
ssh ubnt@<current_ip_address>

The default username is "ubnt", and the default password is also "ubnt". If you’ve changed these credentials, use your custom username and password.

Step 2: Set the Inform URL

The inform URL is critical for the devices to communicate with the UniFi Controller. You need to update this URL to the new IP address.

  1. After logging in, run the following command to set the new inform URL:
set-inform http://<new_ip_address>:8080/inform

Replace "<new_ip_address>" with the new IP address of your UniFi Controller.

Step 3: Verify the Change

  1. To verify that the device has adopted the new inform URL, run the following command:
info

This command will display the device’s current status, including the inform URL.

Troubleshooting Tips

  1. IP Conflict: If the new IP address causes an IP conflict, choose a different address or resolve the conflict by changing the IP of the other device.

  2. Connection Issues: If devices can't connect to the controller after the change, verify that the new IP address is within the correct subnet and there are no firewall rules blocking communication.

  3. Reboot Devices: Sometimes, simply rebooting the UniFi devices and the controller can resolve lingering connectivity issues.

Advanced Configuration: Using Static IP

Setting a static IP can improve network stability. Here’s how you can configure a static IP address on your UniFi Controller.

Step 1: Access the Controller via SSH

  1. Open your terminal and SSH into the UniFi Controller as described earlier.

Step 2: Edit Network Configuration

  1. Once logged in, edit the network configuration file. You can use "nano" or any text editor available on your device:
sudo nano /etc/network/interfaces
  1. Update the file with your new static IP configuration. It should look something like this:
iface eth0 inet static
  address <new_ip_address>
  netmask 255.255.255.0
  gateway <gateway_ip>
  dns-nameservers 8.8.8.8 8.8.4.4

Replace "<new_ip_address>" with your desired IP, and "<gateway_ip>" with your network gateway.

Step 3: Restart Network Services

  1. Save the changes and restart the network services to apply the new configuration:
sudo /etc/init.d/networking restart

Step 4: Verify the New IP

  1. To verify the new IP address, use the "ifconfig" command:
ifconfig

Look for the "eth0" interface and check that it reflects the new static IP address.

Benefits of Using a Static IP

  • Stability: A static IP ensures that the controller’s address doesn’t change, making it easier to manage devices on the network.

  • Simplified Management: With a static IP, you can consistently reach the controller at the same address, which simplifies network management tasks.

  • Improved Security: Static IPs can be easier to secure, as you know exactly what IPs should be accessing your network.

Final Thoughts

Changing the IP address of your UniFi Controller, whether through the GUI or SSH, is straightforward if you follow the right steps.

Whether you’re dealing with a new network setup or resolving IP conflicts, having the ability to change your controller’s IP address is a vital skill for any network administrator.

If you encounter any issues or need additional support, feel free to contact us at UniHosted. We specialise in hosting and managing UniFi Controllers in the cloud, offering seamless network management and expert support.

We host UniFi Controllers in the Cloud

Are you ready to take your UniFi Network to the next level? Deploy a UniFi Cloud Controller in minutes and manage your network from anywhere.

Deploy Now

Free tier available

Get the best support

Join 1660+ customers

No credit card required