Page 1 of 1

Change of Keyhelp IP in database ?

Posted: Sun 14. Jan 2024, 22:12
by amarc
Hello,

well I have specific scenario where Keyhelp is in VM with some IP. I need to move that VM to different host/location and that IP will change.

Is there a way to do:

- stop current Keyhelp VM
- move VM to another host
- give VM new IP and start it
- go to Keyhelp's DB and change it's IP within DB to new IP


Why I need to do this ? Simply because, as I see it, I can't do it otherwise. I can't change it while running on current host as new IP is not available to that host and I can not start it on new host with old VM/Keyhelp IP for same reason.


ty.

Re: Change of Keyhelp IP in database ?  [SOLVED]

Posted: Mon 15. Jan 2024, 10:05
by Alexander
Hello,
go to Keyhelp's DB and change it's IP within DB to new IP
Currently you can go into the database and update the values there. There will be an option in the 'keyhelp-toolbox' in the future, to update IPs there.

You can use this command:

Code: Select all

mysql -D 'keyhelp' -e "UPDATE settings SET value = '111.111.111.111,222.222.222.222' WHERE category = 'dns' and name = 'ips'";
And replace 111.111.111.111 and 222.222.222.222 with your IPs. Do not use more than 2 IPv4 and/or 2 IPv6.
Than go to keyhelp-toolbox and let it rewrite all the config files.


Be advised, that you have to setup your IPs in network configuration of your system. KeyHelps IPs in the database are "only" for writing Apache and Bind configuration files.

Re: Change of Keyhelp IP in database ?

Posted: Mon 15. Jan 2024, 13:15
by amarc
Thanks. Yes, VM will have new IP as that is managed "externally" by DHCP there is no static configs regarding network anywhere.