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?

  • oleorun@real.lemmy.fan
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year 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.