Issues running official Nextcloud image using bind-mounts

  • Hi OMV forum, still working on getting my new NAS with OMV 7 going to replace my old hardware running OMV 5. I am trying to get nextcloud up and running but having some issues, I believe all of them stem from using bind-mounts and permission issues around this.


    Has anyone gotten the official nextcloud image working (not linuxserver.io) using bind-mounts per the OMV-extras guide?


    Setup Notes:

    - OMV 7

    - using compose plugin from omv-extras

    - drives for docker mapped via omv-extras guide section 2.2 (https://wiki.omv-extras.org/doku.php?id=omv7:docker_in_omv)

    - my setup is pretty much the exact same, with a HDD being used for docker containers data and an SSD being used for the containers & configs

    - created a separate user in OMV to run the docker containers and has permissions per OMV for these Shared Folders set in web gui (per the previous guide)

    - Directories created for nextcloud appdata and data prior to spinning up the compose file


    Issue: cannot get the official nextcloud image running, believe it is due to permissions issues when using bind mounts as opposed to letting the container create the volumes. I am trying to use the "user: uid:gid" flag in the nextcloud .yaml with it set to my OMV user created to run the docker containers.


    Nextcloud .yaml file:


    Dockerfile:


    php.ini: (note I created this file prior to spinning up the container in the appropriate location on ${PATH_TO_APPDATA} per the compose file above. This file is used to change nextclouds php config to allow for larger files to be uploaded.

    Code
    upload_max_filesize = 10G
    post_max_size = 10G
    max_input_time = 7200
    max_execution_time = 7200
    memory_limit = 1024M
    upload_tmp_dir = /var/big_temp_file/
    output_buffering = 0

    supervisord.conf: same as php.ini file above pretty much

    redis-session.ini: blank file created that the container should write to on entrypoint


    I am using the compose plugin as mentioned and have the Dockerfile in the "Dockerfiles" section of the plugin and the compose file in the "Files" section. I first pull and build the dockerfile, then pull up the compose file, all via the plugin.


    On my old NAS running OMV5 this pretty much worked out of the box as I did not use bind-mounts and instead let docker create the volumes for everything, which I believe does not create any permissions issues. On my new NAS running OMV7 using bind-mounts, I believe permissions issues are whats causing the container to fail. All that said - I have tried chown -ing the ${PATH_TO_APPDATA}/nextcloud and ${PATH_TO_DATA}/nextcloud directories to match my OMV host user:group and also have changed the directories permissions to 755, with it still throwing permissions errors.


    Anyone else get this running (or something similar) using the official nextcloud image that can share some advice?


    Thank you.

  • You might want to look into the nextcloud AIO (all in one) image/setup as I think it brings together quite a bit of what you are trying to do


    There are a few guides on the forum plus a recent guide in the OMV discord channel.


    Discord - Group Chat That’s All Fun & Games
    Discord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.
    discord.com

  • jata1 appreciate the help again! Ok will check out the AIO container more and look for forum guides.


    I kind of liked building my own image as I could include/not-include what I wanted and change some settings in the build. That dockerfile was pretty much what I used from my previous OMV5 NAS and served me well for several years. I was hoping to reuse it but the bind-mount volumes & permissions are definitely a set-back.


    Will take a look at AIO and maybe keep trying.

  • OK I get it.


    I see you are using the user: directive in the compose for nextcloud and that might be a place to look at if you are getting permissions issues on the file system/container. It could be that the user does not have permissions needed for the container/image.


    Happy to try to help if I can but as you know I don't use nextcloud.

    • Official Post

    Ok will check out the AIO container more and look for forum guides.

    If you've followed the omv-extras documentation as you say it should be pretty easy. https://wiki.omv-extras.org/do…#nextcloud_aio_all_in_one

    I have been using that container for a long time without any problems.

  • jata1 I definitely think it has something to do with the “user: “ line. I am getting an error for permissions on it trying to write to logs per supervisord and my guess is it wants to do it as root. I’m going to check my old install and see how it’s doing it.


    chente yeah the AIO wasn’t around back when I made this container from the image originally, it is looking pretty promising at a cursory glance to me. One thing I haven’t figured out looking at it yet is - I don’t run any of my services externally facing, I do use Caddy as a reverse proxy but only to give me nice simple urls internal to my network and handle ports, with Pi-hole doing the DNS handouts. I VPN into my network to access my services. Frankly I only have taken a brief glance and will check out the link you sent in further depth and try it out.

    • Official Post

    Nextcloud AIO will require a domain for its initial configuration. Nextcloud assumes that the service will always be accessed externally. I use Nginx Proxy Manager as a proxy for these types of services. You can easily deny outside access at any time and use the service only locally, or through a VPN from outside but with local access to Nextcloud which still gives you more additional security.

  • I took a look at the AIO and found this link to setup locally -> https://github.com/nextcloud/a…ob/main/local-instance.md


    Although I kind of feel like that is a little ridiculous? With the AIO image you pretty much need to have it reach out externally to set it up and then you can close it off...hmm. I see the last option in the link above uses tailscale, which is kind of similar to my use case of wireguard, but jeez, seems like a strange way to set it up. I realize that this is not an openmediavault problem, and is a nextcloud problem (due to it being pretty much an enterprise level software wanting to be used by a hobbyist like myself).

    I will keep this post standing for now - if anyone has been able to get a non-AIO nextcloud instance setup using bind-mounts, please post here! I will keep trying and see if I can get it straightened out and if I do I will make a guide.

  • Just use the linuxserver version and you will have all that you want to accomplish.

Participate now!

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