Setting up nextcloud in docker

  • I ask this again.

    Sorry for the slow replies, I'm using docker with KM0201s guide posted earlier in the thread.

    Hmm, weird. Sorry I didn't think having an additional file there (with a different name) would be an issue.

    My main issue now is how I can transfer my install and data to a new HDD? I just bought a big one for all my content.


    My guess would be to copy all the folders to the new drive and then update the stack with the correct paths>?


    Thanks for your time,


    Rowan

    • Official Post

    That *should* work. I would probably do this procedure in two parts. I assume you're also moving all of your other container data as well, and you're moving more than just nextcloud.


    1. Stop the docker service in the OMV webUI or at the command line (systemctl stop docker)

    2. Once docker is stopped, check the OMV webUI under the docker plugin and verify the path where you have your containers installed. If you do not intend to change this path, you can skip to step this part, click the Restart button, and skip to step 6.

    3. Probably easiest to do this part at command line (you will need to be root):

    Code
    cp -R /path/to/old-containers /path/to/new-containers

    4. In the docker plugin, change the path to the new path, and click Save. Then click Install docker.

    5. Verify that docker is checking the new path


    Code
    docker info | grep Root

    Assuming all is well and it's showing the new path, you should be able to log in to all your containers like nothing happened, all data will still be there, etc. Now we move our actual container data to the new drive.


    6. Verify docker is back up and showing "active" and "running" (near the top)

    Code
    systemctl status docker

    7. Cntrl C to exit that and drop back to a prompt.

    8. Log in to Portainer.

    9. Stop all of your containers.

    10. Move any data your containers access (music, movies, pics, /configs, whatever) to the new drive.

    11. One by one, adjust your stacks with the new data paths and redeploy them.

    12. As you start each container, you should be able to check them and make sure everything is working as it should (at this point you should notice no change).

    13. Continue on until all your containers are updated with the new paths.

    14. Once everything is done, and you've verified everything is working properly, you can delete any old folders on the old drive if you desire.


    That should work for every container I've ever tried. Finally more specifically to nextcloud.


    15. Log in to Nextcloud as your admin user.

    16. Go to Settings/Overview.

    17. Look and see if it is showing any "issues" (I assume before you had "All Checks Passed" here as noted in that walkthrough I did).

    18. If an issue is something about needing to do a files scan (I dont remember the exact error).. This is easy to resolve.

    19. At the command line level, run the following command (below I assume your nextcloud container is named nextcloud)


    Code
    docker exec nextcloud occ files:scan --all

    20. That will rescan your nextcloud database and should bring all your files, folders, etc. that are in your data folders, back into your database.

    21. Once your done, refresh the settings page and that error should be gone.


    Sounds long, but honestly, it's pretty easy.

  • Thanks so much for this, seems long but would have taken longer without the help haha!


    Thanks for all the help!

    • Official Post

    I don't use plex so I'm honestly not sure.


    I would think just pointing it somewhere in the /data folder would be suffice?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!