Restoring a TrueNAS Scale Configuration To A New System - Error: The web interface could not be accessed

After restoring your TrueNAS Scale configuration to a new system you may encounter the following error on the console:

1The web interface could not be accessed.
2Please check network configuration.

This is due to the new system not having the same NIC/MAC address so TrueNAS doesn't know how to map it's existing IP configuration to your new NIC.

To fix this you must log in to the CLI using the system console and run the "/usr/bin/cli --menu" command.

 1The web interface could not be accessed.
 2Please check network configuration.
 3
 4Debian GNU/Linux 12 TrueNAS tty1
 5
 6TrueNAS login: root
 7Password:
 8
 9...
10
11root@TrueNAS[~]# /usr/bin/cli --menu
121) Configure network interfaces
132) Configure network settings
143) Configure static routes
154) Change local administrator password
165) Reset configuration to defaults
176) Open TrueNAS CLI Shell
187) Open Linux Shell
198) Reboot
209) Shutdown
21
22Enter an option from 1-9: 1

Select option 1 to configure network interfaces.

 1   ┌─────────────────────────| Network Interfaces |─────────────────────────┐
 2   │                                                                        │
 3   │ +--------+-----------------+----------------------------------------+  │
 4   │ |   name |         aliases |                          state.aliases |  │
 5   │ +--------+-----------------+----------------------------------------+  │
 6   │ |   eth0 | 192.168.1.10/24 |                        192.168.1.10/24 |  │
 7   │ | enp1s0 |                 |                                        |  │
 8   │ +--------+-----------------+----------------------------------------+  │
 9   │                                                                        │
10   │ Press <Enter> to edit a network interface, <Delete> to                 │
11   │ delete a network interface, <n> to create a new network                │
12   │ interface, <r> to refresh, <q> to quit.                                │
13   │                                                                        │
14   │                                                                        │
15   └────────────────────────────────────────────────────────────────────────┘

In this example, the old NIC is eth0 and the new one is enp1s0. Use the arrow keys to highlight the old NIC and press the delete key to delete.

1       ┌──────────────────| Delete network interface |──────────────────┐
2       │                                                                │
3       │ Are you sure want to delete network interface 'eth0'?          │
4       │                                                                │
5       │                    <   Yes    > <    No    >                   │
6       │                                                                │
7       └────────────────────────────────────────────────────────────────┘

Select Yes to continue.

Now from the Network Interfaces menu, highlight enp1s0 and press enter to update the network interface. To set a static IP make sure the "dhcp" options are set to No and put the CIDR notation of IP address into the aliases section. In this example: 192.168.1.10/24

 1             ┌────────────| Update Network Interface |────────────┐
 2             │                                                    │
 3             │    Interface Settings                              │
 4             │                      name: enp1s0                  │
 5             │               description: <empty string>          │
 6             │                 ipv4_dhcp: No                      │
 7             │                 ipv6_auto: No                      │
 8             │                   aliases: 192.168.1.10/24         │
 9             │    Other Settings                                  │
10             │                       mtu: <not set>               │
11             │                                                    │
12             │                                                    │
13             │                    <Save> <Back>                   │
14             │                                                    │
15             └────────────────────────────────────────────────────┘

Select Save.

 1┌─────────────────────────| Network Interfaces |──────────────────────────┐
 2│ +--------+-----------------+------------------------------------------+ │
 3│ |   name |         aliases |                            state.aliases | │
 4│ +--------+-----------------+------------------------------------------+ │
 5│ | enp1s0 | 192.168.1.10/24 |                                          | │
 6│ +--------+-----------------+------------------------------------------+ │
 7│                                                                         │
 8│ Press <Enter> to edit a network interface, <Delete> to                  │
 9│ delete a network interface, <n> to create a new network                 │
10│ interface, <r> to refresh, <q> to quit.                                 │
11│                                                                         │
12│ You have pending network interface changes.                             │
13│ Press <a> to apply them.                                                │
14│                                                                         │
15└─────────────────────────────────────────────────────────────────────────┘

Press the 'a' key to apply.

 1┌─────────────────────────| Network Interfaces |──────────────────────────┐
 2│                                                                         │
 3│ +--------+-----------------+------------------------------------------+ │
 4│ |   name |         aliases |                            state.aliases | │
 5│ +--------+-----------------+------------------------------------------+ │
 6│ | enp1s0 | 192.168.1.10/24 |                          192.168.1.10/24 | │
 7│ +--------+-----------------+------------------------------------------+ │
 8│                                                                         │
 9│ Press <Enter> to edit a network interface, <Delete> to                  │
10│ delete a network interface, <n> to create a new network                 │
11│ interface, <r> to refresh, <q> to quit.                                 │
12│                                                                         │
13| Network interface changes have been applied.                            |
14| Press <p> to persist them if the network is still operational or they   |
15| will be rolled back in 50 seconds.                                      |
16└─────────────────────────────────────────────────────────────────────────┘

If the settings are working as expected, press the 'p' key to persist the settings. Otherwise if you don't confirm within 60 seconds the changes will revert.

 1┌─────────────────────────| Network Interfaces |──────────────────────────┐
 2│                                                                         │
 3│ +--------+-----------------+------------------------------------------+ │
 4│ |   name |         aliases |                            state.aliases | │
 5│ +--------+-----------------+------------------------------------------+ │
 6│ | enp1s0 | 192.168.1.10/24 |                          192.168.1.10/24 | │
 7│ +--------+-----------------+------------------------------------------+ │
 8│                                                                         │
 9│ Press <Enter> to edit a network interface, <Delete> to                  │
10│ delete a network interface, <n> to create a new network                 │
11│ interface, <r> to refresh, <q> to quit.                                 │
12│                                                                         │
13└─────────────────────────────────────────────────────────────────────────┘

Press 'q' to quit back to the main menu.

You may also need to reconfigure your default route. You can check by entering the static route menu by selecting option 3.

 11) Configure network interfaces
 22) Configure network settings
 33) Configure static routes
 44) Change local administrator password
 55) Reset configuration to defaults
 66) Open TrueNAS CLI Shell
 77) Open Linux Shell
 88) Reboot
 99) Shutdown
10
11Enter an option from 1-9: 3
 1┌───────────────────────| Static Routes |────────────────────────┐
 2│                                                                │
 3│  +-------------+-------------+---------------+                 │
 4│  | destination |     gateway |   description |                 │
 5│  +-------------+-------------+---------------+                 │
 6│  |   0.0.0.0/0 | 192.168.1.1 | DEFAULT ROUTE |                 │
 7│  +-------------+-------------+---------------+                 │
 8│                                                                │
 9│  Press <Enter> to edit a static route, <Delete> to delete a    │
10│  static route, <n> to create a new static route, <r> to        │
11│  refresh, <q> to quit.                                         │
12│                                                                │
13└────────────────────────────────────────────────────────────────┘

If your static route is not listed, you can press 'n' to create a new route.

 1┌──────────| Create Static Route |───────────┐
 2│                                            │
 3│      Static Route                          │
 4│       destination: 0.0.0.0/0               │
 5│           gateway: 192.168.1.1             │
 6│       description: DEFAULT ROUTE           │
 7│                                            │
 8│                <Save> <Back>               │
 9│                                            │
10└────────────────────────────────────────────┘

Once your IP and gateway is set, you should be able to access the Web UI using a web browser now.