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).
- Set DNS TTLs to 5 minutes for all Matrix-related DNS records.
- Copy etke.cc’s SSH key from the old server to the new server.
- Share the SSH login information with us, along with the sudo password (if set) and the new server’s IP address.
- 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_keysfile (preferably asroot). - 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 withsystemctl | grep matrix-(a failed state is acceptable). - Update all Matrix-related DNS records to point to the new server.
- Start a new screen session on the new server by running
screen -R. - Migrate the data to the new server by running
rsync -arP OLD_SERVER_USER@OLD_SERVER_IP:/matrix/ /matrix(replaceOLD_SERVER_USERandOLD_SERVER_IPwith the appropriate values). - Create the
matrixgroup and user on the new server by runninggroupadd --system matrix && useradd --system --gid=matrix --no-create-home --home-dir=/matrix --shell=/sbin/nologin matrix. - Fix ownership of the
/matrixfiles on the new server by runningchown -hR matrix:matrix /matrix. - 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!