Question
- How to change the main (primary) IP address of a Plesk for Linux server?
- Can I change the IP address that is displayed in the System Overview section in Plesk for Linux?
- Is it possible to adjust the IP address that is displayed in the System Overview section of the Plesk dashboard?
Answer
The IP address displayed in the System Overview section of the Plesk GUI is marked as the primary IP address in the Plesk database (psa).
To change it, you need to update the corresponding database entries by following these steps:
- Log into your server via SSH
-
Access the Plesk database (psa):
# plesk db
-
Get a list of Plesk server IP addresses and their IDs:
# MariaDB [psa]> SELECT id, ip_address, main FROM IP_Addresses;
+----+-----------------------+-------+
| id | ip_address | main |
+----+-----------------------+-------+
| 1 | 203.0.113.2 | true |
| 2 | 2001:db8:f61:a1ff:0:0:0:80 | false |
+----+-----------------------+-------+ -
Change the
main
value of the current main IP address tofalse
:# MariaDB [psa]> UPDATE IP_Addresses SET main = 'false' WHERE id = '1';
Query OK, 1 row affected (0.002 sec)
Rows matched: 1 Changed: 1 Warnings: 0 -
Set the
main
value of the new IP address that you wish to display in its place totrue
:# MariaDB [psa]> UPDATE IP_Addresses SET main = 'true' WHERE id = '2';
Query OK, 1 row affected (0.002 sec)
Rows matched: 1 Changed: 1 Warnings: 0 -
Check the IP addresses were updated correctly:
# MariaDB [psa]> SELECT id, ip_address, main FROM IP_Addresses;
+----+-----------------------+-------+
| id | ip_address | main |
+----+-----------------------+-------+
| 1 | 203.0.113.2 | false |
| 2 | 2001:db8:f61:a1ff:0:0:0:80 | true |
+----+-----------------------+-------+
2 rows in set (0.000 sec) - Exit the Plesk database editing screen:
# MariaDB [psa]> exit