Home

What Actually Happens When You Migrate a PeerTube Instance (And Why It Takes Minutes, Not Days)

The server changes. Your videos don't. Here's the process, step by step—without the jargon.

Most creators never think about server migration. Why would they? On YouTube, you upload a video and it appears. You don't know which datacenter it lives in, which server rack it occupies, or which engineer is responsible for keeping it online. That's the platform's job. You're a guest.

But when you run your own PeerTube instance, you're not a guest anymore. You're the owner. And owners need to know one thing above all else: can I move this thing if I have to?

The answer is yes. Not in theory. In practice, with a documented process that the PeerTube team maintains and that we execute regularly for our clients. It's not magic. It's engineering. And it's the difference between owning your infrastructure and renting it.

Why migration matters (even if you never need it)

The point of migration isn't that you will move. The point is that you can.

If your VPS provider raises prices, you move. If their Acceptable Use Policy changes in a way that conflicts with your content, you move. If their datacenter has a prolonged outage, you move. If you simply find a better deal somewhere else, you move.

Without migration capability, you're stuck. You're a tenant who can't leave, even if the landlord changes the terms. With migration capability, you have leverage. You have options. You have the thing that platforms never give you: an exit.

The three things that actually need to move

A PeerTube instance looks complex from the outside. From the inside, it's three things :

The database. This is the brain. It holds your users, your videos metadata, your comments, your federation state—everything that makes your instance yours and not just a folder of video files. It's dumped with a single command (pg_dump) and restored with another (pg_restore).

The storage directory. This is the body. It contains the actual video files, thumbnails, previews, and everything else your viewers see. It's transferred with rsync, a tool that only copies what's changed—so a 100 GB library doesn't need to be re-uploaded every time.

The configuration. This is the memory. Your domain, your SSL certificates, your Nginx settings, your systemd service files. These are small text files, copied in seconds .

That's it. Three things. Not a mystery. Not a black box. Three things, moved with tools that have existed for decades.

The process, step by step

Here's what actually happens when we migrate a PeerTube instance from one provider to another. The order matters. The patience matters more.

Step 1: Lower the DNS TTL. About a day before the migration, we reduce the Time-To-Live on your domain's DNS records to a few minutes . This means that when we point your domain to the new server, the change propagates almost immediately. No waiting 24 hours. No "it should work by tomorrow."

Step 2: Provision the new server. We set up a fresh PeerTube installation on the new VPS, following the same production guide we used for the original . Same operating system. Same dependencies. Same configuration. The new server is a mirror of the old one, ready to receive data.

Step 3: Do a first rsync pass while the old server is still running. This is the trick that keeps downtime short. We copy the storage/ directory while the old server is live, so the bulk of the data—potentially hundreds of gigabytes of video—transfers without anyone noticing . The old server keeps serving viewers. Nothing is interrupted yet.

Step 4: Stop PeerTube on the old server. This is the beginning of the actual downtime window. It's short. We stop the service to freeze the database state and ensure no new files are written to storage/ during the final sync.

Step 5: Dump and restore the database. We run pg_dump on the old server, transfer the dump file, and restore it on the new server with pg_restore . The database is typically measured in megabytes, not gigabytes. This takes seconds to minutes, depending on size.

Step 6: Final rsync pass. Now we run rsync again on the storage/ directory. This time, it only copies the files that changed since the first pass—usually a handful of thumbnails, a new upload, maybe some cache files . The bulk of the data is already on the new server. This final pass takes seconds.

Step 7: Copy configuration and certificates. We transfer the Nginx configuration, the systemd service files, and the Let's Encrypt SSL certificates . These are small files. Copy, paste, done.

Step 8: Start PeerTube on the new server. The instance comes online. We verify that videos play, federation works, and uploads are accepted.

Step 9: Update DNS. We point your domain to the new server's IP. Because we lowered the TTL in Step 1, the change propagates in minutes . Your viewers type the same address. They see the same instance. They don't know anything changed.

Step 10: Shut down the old server. Once the new server is confirmed working and DNS has propagated, the old server is decommissioned. The migration is complete.

How long does this actually take?

The honest answer: it depends on the size of your storage/ directory.

For a creator instance with 10–50 GB of video, the first rsync pass takes minutes. The entire migration—from Step 3 to Step 9—can be completed in under an hour, with actual downtime measured in minutes, not hours.

For a larger instance with hundreds of gigabytes, the first rsync pass takes longer, but it happens while the old server is still live. The downtime window—Steps 4 through 9—remains short, because the bulk of the data is already transferred .

This is why we do the first rsync pass before stopping the old server. It's the difference between "hours of downtime" and "minutes of downtime." It's also why we recommend rsync over any other copy method: it only transfers what's changed, and it can be run multiple times safely .

What can go wrong (and how we prevent it)

A migration is a technical process. Technical processes have failure modes. Here are the ones we've seen, and how we handle them:

File permissions. If the storage/ directory is copied with the wrong ownership or permissions, PeerTube can't read the video files. The instance loads, but videos don't play . We verify permissions before starting the new server.

Database restore errors. If the database dump is incomplete or the restore fails silently, the instance may start with missing users or videos . We verify the restore by counting users and videos before declaring the migration complete.

DNS propagation delays. If the TTL wasn't lowered in advance, viewers may see the old server (now offline) for hours after the migration . We lower the TTL a day before, and we check propagation with tools like whatsmydns.net.

Version mismatches. If the new server runs a different PeerTube version than the old one, unexpected behavior can occur. We match versions exactly, then upgrade if needed after the migration is confirmed stable.

None of these are reasons to avoid migration. They're reasons to do it carefully. And they're reasons why having someone who has done it before—someone who knows the failure modes and how to avoid them—matters.

The point of all this

You don't need to memorize the steps. You don't need to run the commands yourself. You need to know one thing: your instance is movable.

That's the promise. Not "we'll never have to migrate." Not "migration is always painless." But "if you need to move, you can, and we'll handle the technical part."

The server changes. Your videos don't. Your domain stays the same. Your viewers don't notice. And you have the one thing that no proprietary platform will ever give you: the freedom to leave.


Want to see what a migration looks like for your instance? Contact us. We'll walk you through the process, estimate the downtime for your specific setup, and show you exactly what moves and what stays the same.