SectionMoving in

Moving in

An account moves as a whole: the unix user with its password, the sites, the databases with their passwords, cron, certificates — and between two MonoPanel servers also mail, app services (switched off) and the settings of its Valkey instances. The move runs on the new server and only ever reads the source — not one file changes there, so the old server stays a fallback until DNS is switched. plan creates nothing and says what would arrive and what stands in the way: a login already taken (--as <login>), a domain or database that already exists here, a missing PHP branch (mp php install 8.2), too little disk.

From another MonoPanel server. The old server issues a token — for one account, read-only, with a lifetime:

mp migrate grant user:alex                                             # on the old server
mp migrate plan --source https://old:8443 --token … --scope user:alex   # on the new one: dry run
mp migrate run  --source https://old:8443 --token … --scope user:alex   # on the new one: move

From BitrixVM / bitrix-env 7–9. Needs root ssh to the old server: a key (--key, default ~/.ssh/id_ed25519 of whoever runs mp) or a password (--password-stdin). The main BitrixVM site answers to server_name _, so --domain names it; the extra sites in /home/bitrix/ext_www come under their own names. There is one account, bitrix; take it under another login with --as.

mp migrate plan --from bitrixvm --source root@old.example.com --domain shop.example.com
mp migrate run  --from bitrixvm --source root@old.example.com --domain shop.example.com

Database credentials come from bitrix/.settings.php (or dbconn.php) and the MySQL account is recreated with the same password; /home/bitrix paths are rewritten in dbconn.php, .settings*.php, cron commands and the symlinks of link sites. The Bitrix cache, the push server, memcached and msmtp of the environment do not travel (mp stack install memcached if needed). Works from bitrix-env 7 on CentOS 7 too: the MySQL 5.7 dump is adjusted for MySQL 8 on the way.

From FASTPANEL 2. The same root ssh. Without --scope the dry run lists the panel's accounts:

mp migrate plan --from fastpanel --source root@old.example.com                 # who is on the source
mp migrate run  --from fastpanel --source root@old.example.com --scope user:shop [--as shop2]

Sites arrive with their PHP version and mode (php-fpm or Apache), docroot, aliases and allow-lists, databases with their password hashes, certificates (uploaded and Let's Encrypt), cron. FASTPANEL mail does not move — the dry run says how many mailboxes to recreate.

After the move (any source):

  1. Check the site on the new server without touching DNS: curl --resolve shop.example.com:80:<new IP> http://shop.example.com/.
  2. Give an account from a foreign panel a web-panel password: mp user set <login> --generate (the unix password for SFTP is already the old one).
  3. Switch DNS. The certificates that came along work at once and the panel renews them; a site without one gets mp ssl issue <domain>.

If DNS is broken on the old server (a dead nameserver in resolv.conf), every ssh command of the dry run takes seconds — fix resolv.conf there. What moves and what does not, in detail: docs/en/07-migration.md.

Page source on GitHub