How to assign static IP address on TrueNAS

These are the two ways you can assign a static IP address to your TrueNAS server.

TrueNAS set static IP address

On TrueNAS, you can assign a static IP address configuration through the web and console interface, and in this guide, you will learn how.

After the installation, TrueNAS assigns a dynamic network configuration using the Dynamic Host Configuration Protocol (DHCP) server available in the local network. However, since you will be using the server to share files and other services, it’s a good idea to set a static configuration. 

The reason to switch from a dynamic to a static IP is that a dynamic configuration can change at any time, and this can result in disruption in accessing the services. On the other hand, a static configuration doesn’t change, which means that the server will always be reachable from the address.

This guide will teach you the different ways to configure a static network configuration for a TrueNAS server whether you use the command console or web interface.

Set static IP address on TrueNAS from web interface

To assign a static IP address on TrueNAS from the web interface, use these steps:

  1. Open TrueNAS web console.

  2. Sign into your root TrueNAS account.

  3. Click on Network from the left pane and select the “Interfaces” option.

  4. Click the drop-down Settings menu in the top-right corner next to the “IP Addresses” column and click the Edit option.

    TrueNAS edit network interface

  5. Clear the DHCP option.

  6. In the “IP Address” setting, assign a static IP address. For example, 10.1.4.193. Quick note: This address should be in the local network range, but outside the DHCP scope to prevent problems.

    TrueNAS assign static IP address

  7. Select the subnet mask bit number on the right side. For example, “24” if the network is “255.255.255.0.”

  8. Click the Apply button.

Once you complete the steps, open a new tab in the browser and try to connect with the new static network configuration. If it works, click the “Save” button quickly. Otherwise, the system will revert to the previous configuration.

Set static IP address on TrueNAS from command console

To set a static IP address on TrueNAS from the command console, use these steps:

  1. Open TrueNAS command console.

  2. Enter option 1 and press Enter.

  3. Enter option 1 to select the network adapter and press Enter.

  4. Enter n to skip removing current settings and press Enter.

  5. Enter n to skip the dynamic network configuration and press Enter.

  6. Enter y to set a new static “IPv4” configuration and press Enter.

  7. Enter an interface name (for example, em0) and press Enter.

  8. Enter the new static IP address (for example, 10.1.4.193) for the TrueNAS server and press Enter.

    TrueNAS console set static IP address

  9. Enter the subnet mask address of the network (for example, 255.255.255.0) and press Enter.

  10. Enter n to skip the static “IPv6” configuration and press Enter.

After you complete the steps, the static IP will apply and you can now connect to the TrueNAS server using the new network configuration.