Change main i-mspcp IP address.

  • Hello,

    i guess this kind of a short howto is missing for i-mscp. So I decided to write a short howto on the forum.
    Mostly for people who don't know what ispcp was and are looking for a solution in i-mscp ;)

    First change IP address in /etc/imscp/imscp.conf


    and replace the old IP address with a new one:

    1. BASE_SERVER_IP = [new_IP]

    then, stop the i-mspcp daemon:

    1. /etc/init.d/imscp_daemon stop

    Now we need to change the IP address in database.
    Also we need to change the domain status from 'ok' to 'changed' so that the IP address will be replaced by a new one for all
    domains, subdomains and aliases.

    Login to mysql and switch to i-mpscp database(you can also do it via phpMyAdmin):

    1. mysql -u root -pUSE imspcp;

    now change the IP addres and the domain status:

    1. UPDATE server_ips SET ip_number = "new_ip" WHERE ip_id = 1;UPDATE `domain` SET `domain_status` = 'change' WHERE `domain_status` = 'ok';UPDATE `subdomain` SET `subdomain_status` = 'change' WHERE `subdomain_status` = 'ok';UPDATE `domain_aliasses` SET `alias_status` = 'change' WHERE `alias_status` = 'ok';UPDATE mail_users SET status="toadd" where status="ok";

    Now we need to update the domains config and status, run:

    1. /var/www/imscp/engine/imscp-rqst-mngr

    We can start i-mspcp daemon:

    1. /etc/init.d/imscp_daemon start

    Last thing we need to do is to modify the IP address in Apache and Bind configuration files, basically we need to replace the old IP address with a new one.
    This can be done with the simple sed onliner bellow (just replace the word oldIP with old IP address and newIP with the new IP address):

    1. sed -i "s/oldIP/newIP/g" /etc/apache2/sites-available/* /etc/bind/* /var/cache/bind/* /etc/imscp/*/working/*

    Restart apache and bind:

    1. /etc/init.d/apache2 restart
    2. /etc/init.d/bind9 restart

    And that's it.

    Edited once, last by aseques ().

  • Hello;

    With the last RC (1.1.0-rc1.4), you only have to do:

    1. # cd /var/www/imscp/engine/setup# perl imscp-setup --reconfigure

    With the next release, you will only have to do

    1. # cd /var/www/imscp/engine/setup
    2. # perl imscp-setup --reconfigure ips


    Edited once, last by Nuxwin ().

  • I think, the first topic is reasonable for life as an "expert mode", please post it to our wiki, using your forum account.

  • thanks, good guide. this and the changing of IP for NAT setups is very helpful for some people.


    With the next release, you will only have to do

    # cd /var/www/imscp/engine/setup
    # perl imscp-setup --reconfigure ips

    that's awesome, nux :)

  • I just updated the post to reflect the proper names for current versions of imscp.

  • I created a new page in the wiki to have these instructions documented, can be found at


    The 1.1.0-rc3 is already release.