Gourav Goyat

How to migrate Umami analytics to new VPS

Published : 10 Jun 2025


I self-host Umami Analytics for my web apps. Recently I had to move it to a new VPS. This is how I did it:

  1. SSH into the old VPS where current instance of umami is running and then take a backup of postgres db.
docker exec -t umami_db_1 pg_dump -U umami -d umami > umami_backup.sql

Here umami_db_1 is the name of the db container. It will save the backup in your current directory.

  1. SSH into the new VPS.

  2. Clone the umami repo.

git clone https://github.com/umami-software/umami.git
  1. Move the db backup from old VPS to new VPS.

  2. cd into the umami directory on the new VPS.

  3. Start the db container.

docker-compose up -d db

Remember to only start the db container and not the app container because if you start both the containers, it will run the migrations on the db and later we will not be able to restore data from our backup because to restore the backup, we need a fresh db instance.

  1. Finally restore the db.
docker exec -i umami_db_1 psql -U umami -d umami < umami_backup.sql

The migration is complete, you should be able to access your umami app with all your data intact.