VPS to VPS migration

If you ever need to migrate your Matrix server from one host/VPS/VM to another, you can contact us and we will handle the migration for you for a one-time fee. We will take care of the entire process, including setting up the new server, transferring the data, and making sure your server is fully operational.

However, if you prefer to do it yourself at no extra cost, we will guide you through the process.

Important: This applies only to Matrix servers with custom domains and migrations between cloud hosting and on-premises, between on-premises servers, or vice versa (not between cloud hosting hosts).

  1. Set DNS TTLs to 5 minutes for all Matrix-related DNS records.
  2. Copy etke.cc’s SSH key from the old server to the new server.
  3. Share the SSH login information with us, along with the sudo password (if set) and the new server’s IP address.
  4. Generate a new SSH key on the new server using ssh-keygen -t ed25519 -N '' -C migration. Add the public key to the old server’s .ssh/authorized_keys file (preferably as root).
  5. Stop and disable all Matrix services from auto-starting on the old server by running cd /etc/systemd/system/ && systemctl disable --now matrix-*. Verify they are stopped with systemctl | grep matrix- (a failed state is acceptable).
  6. Update all Matrix-related DNS records to point to the new server.
  7. Start a new screen session on the new server by running screen -R.
  8. Migrate the data to the new server by running rsync -arP OLD_SERVER_USER@OLD_SERVER_IP:/matrix/ /matrix (replace OLD_SERVER_USER and OLD_SERVER_IP with the appropriate values).
  9. Create the matrix group and user on the new server by running groupadd --system matrix && useradd --system --gid=matrix --no-create-home --home-dir=/matrix --shell=/sbin/nologin matrix.
  10. Fix ownership of the /matrix files on the new server by running chown -hR matrix:matrix /matrix.
  11. Inform us once the data migration is complete. We will then run a full setup process to properly configure the new server.

If you have a Matrix client with an active session, it will reconnect after the migration. Expect a few minutes of instability after the initial connection.

We recommend completing steps 1 and 2 first so we can confirm connectivity to your new server.

The subsequent steps require stopping services on the old server. Matrix services will be down until the data is copied to the new server, you contact us, and we complete the full setup process. This final coordination step may take some time, especially over weekends or at night (in Europe), which can lead to extended downtime.

It’s best to perform the last steps at a mutually agreed time with us to ensure a quick response. Also, be aware that your Matrix services will be down once you stop them, so you’ll need to contact us using one of the other methods listed on our contacts page.

Don't have a Matrix server yet?

We specialize in setup, hosting and maintenance of Matrix and various Matrix & non-Matrix add-ons.
Hosting is on affordable VPS servers provided by us (via Hetzner Cloud) in the EU, US and Asia, or on your own infrastructure anywhere in the world.

Let's build your Matrix haven together!

Order Now