19

Hello, how can I migrate Lemmy from one host to another?

It is deployed via the ubergeek77 method with Docker images.

Do I need to transfer them to a new host and change the DNS settings? Do you know how the transfer should be done?

all 3 comments
sorted by: hot top controversial new old
[-] oleorun@real.lemmy.fan 7 points 10 months ago

Here's a quick method:

Get the IP and set up the dns for the new server. Get a cert via Let's Encrypt or self sign to get ssl working, and then start your prep.

On the new host create the new directory structure. Note your folders, paths, and permissions. Set the permissions on the pictrs folder as 991 (sudo chown 991:991 /path/to/pictrs/folder even if that user doesn't exist on your system. It's for the container.

You'll need to edit your yml files, docker compose file, and make sure that the paths are updated, the instance name is correct, and federation is disabled (until testing is done).

Copy pictrs and db folders from old host to new. You can skip pictrs if space is a concern, but you'll lose your instance pics.

Once done, copy over the containers and bring them up.

Check for errors and diagnose as necessary.

Once set, change the federation to on, switch your dns from old server to new, and then perform another sanity test.

[-] BlackEco@lemmy.blackeco.com 6 points 10 months ago

Just to clarify: will you use the same domain? If yes, oleorun's answer is good enough. If not, it would be much more harder (you would also have to update your instance's URL and users' inboxes URLs in the database for federation to work, probably have to unsubscribe aand resubscribe to every community on your instance and even then I'm not sure that would not lead to federation issues)

this post was submitted on 09 Dec 2023
19 points (95.2% liked)

Selfhosted

39677 readers
445 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS