Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Nextcloud
  3. Has anyone set up Nextcloud with a Hetzner Storagebox cifs mount as primary storage?

Has anyone set up Nextcloud with a Hetzner Storagebox cifs mount as primary storage?

Scheduled Pinned Locked Moved Nextcloud
nextcloudcifsstorageboxhetzner
30 Posts 11 Posters 13.0k Views 13 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M msbt

    @msbt the Nextcloud package for Cloudron does not support changing the primary storage as such. You have to use the external storage plugin in Nextcloud. Maybe in the future we can integrate the volumes on Cloudron to be set as primary storage (ie /app/data) for apps, but we are not there yet.

    I just poked around a little and added a storage box as a cloudron-volume and mounted it into the Nextcloud app. After changing 'datadirectory' => '/app/data', to point to the mount and cp'ed over my files, it said

    Your data directory is invalid. Ensure there is a file called ".ocdata" in the root of the data directory.

    Obviously I also created/touched the file but the message wouldn't go away, is that because the mount is added as the "cloudron" user and www-data can't access/write into it or is there some tougher apache/htaccess stuff that I would need to adjust? If it was only the permissions, is there a way to mount the directory as someone else?

    girishG Offline
    girishG Offline
    girish
    Staff
    wrote on last edited by
    #15

    @msbt Does CIFS support filenames starting with "." ?

    robiR M 2 Replies Last reply
    0
    • girishG girish

      @msbt Does CIFS support filenames starting with "." ?

      robiR Offline
      robiR Offline
      robi
      wrote on last edited by
      #16

      @girish If CIFS is available in a POSIX ecosystem, it must, no?

      Conscious tech

      1 Reply Last reply
      0
      • girishG girish

        @msbt Does CIFS support filenames starting with "." ?

        M Offline
        M Offline
        msbt
        App Dev
        wrote on last edited by
        #17

        @girish good question, I'll try sshfs later, read a few tutorials of people that are using that (like https://juliane.alton.at/roland/rolog/mounting-storage-sshfs or https://www.d-photos.de/nextcloud-in-der-hetzner-cloud/), so I can rule out that part.

        M 1 Reply Last reply
        1
        • M msbt

          @girish good question, I'll try sshfs later, read a few tutorials of people that are using that (like https://juliane.alton.at/roland/rolog/mounting-storage-sshfs or https://www.d-photos.de/nextcloud-in-der-hetzner-cloud/), so I can rule out that part.

          M Offline
          M Offline
          msbt
          App Dev
          wrote on last edited by msbt
          #18

          Ok so quick update here: I was following the mount procedure from the first link and it's looking good! However, I started with a fresh installation instead of moving my files around, but seeing as it worked out, migrating an existing installation should be no problem either.

          So what I did:

          • deployed a new Cloudron with Nextcloud installed on a fresh CPX21 on Hetzner Cloud (kept it at 40GB though, might scale down if performance allows it)
          • mounted a 5TB Hetzner Storagebox via sshfs into /mnt/cloud and added it as Cloudron volume (/media/cloud)
          • mounted that volume into the Nextcloud app (uncheck read-only)
          • change the datadirectory in config/config.php from 'datadirectory' => '/app/data', to 'datadirectory' => '/media/cloud',
          • cp -r /app/data/admin to the mounted volume and touch .ocdata in /media/cloud

          That's pretty much it I reckon, if you log in now you have this extra storage available:
          13da2c2f-cb18-48c9-b90c-950c44bf2770-grafik.png

          I have both, uploaded a few GB manually and the rest via sync client, no errors so far. A restart won't change the datadirectory, so this should continue working after reboots. Encryption is also enabled and working as intended, still waiting for something that doesn't work properly.

          andreasduerenA jcgonnardJ 2 Replies Last reply
          7
          • M msbt

            Ok so quick update here: I was following the mount procedure from the first link and it's looking good! However, I started with a fresh installation instead of moving my files around, but seeing as it worked out, migrating an existing installation should be no problem either.

            So what I did:

            • deployed a new Cloudron with Nextcloud installed on a fresh CPX21 on Hetzner Cloud (kept it at 40GB though, might scale down if performance allows it)
            • mounted a 5TB Hetzner Storagebox via sshfs into /mnt/cloud and added it as Cloudron volume (/media/cloud)
            • mounted that volume into the Nextcloud app (uncheck read-only)
            • change the datadirectory in config/config.php from 'datadirectory' => '/app/data', to 'datadirectory' => '/media/cloud',
            • cp -r /app/data/admin to the mounted volume and touch .ocdata in /media/cloud

            That's pretty much it I reckon, if you log in now you have this extra storage available:
            13da2c2f-cb18-48c9-b90c-950c44bf2770-grafik.png

            I have both, uploaded a few GB manually and the rest via sync client, no errors so far. A restart won't change the datadirectory, so this should continue working after reboots. Encryption is also enabled and working as intended, still waiting for something that doesn't work properly.

            andreasduerenA Offline
            andreasduerenA Offline
            andreasdueren
            wrote on last edited by
            #19

            @msbt said in Has anyone set up Nextcloud with a Hetzner Storagebox cifs mount as primary storage?:

            Ok so quick update here: I was following the mount procedure from the first link and it's looking good! However, I started with a fresh installation instead of moving my files around, but seeing as it worked out, migrating an existing installation should be no problem either.

            So what I did:

            • deployed a new Cloudron with Nextcloud installed on a fresh CPX21 on Hetzner Cloud (kept it at 40GB though, might scale down if performance allows it)
            • mounted a 5TB Hetzner Storagebox via sshfs into /mnt/cloud and added it as Cloudron volume (/media/cloud)
            • mounted that volume into the Nextcloud app (uncheck read-only)
            • change the datadirectory in config/config.php from 'datadirectory' => '/app/data', to 'datadirectory' => '/media/cloud',
            • cp -r /app/data/admin to the mounted volume and touch .ocdata in /media/cloud

            That's pretty much it I reckon, if you log in now you have this extra storage available:
            13da2c2f-cb18-48c9-b90c-950c44bf2770-grafik.png

            I have both, uploaded a few GB manually and the rest via sync client, no errors so far. A restart won't change the datadirectory, so this should continue working after reboots. Encryption is also enabled and working as intended, still waiting for something that doesn't work properly.

            Thank you so much for the documentation! Could you maybe explain how you mounted the volume via ssh? I added it directly via cloudron and that doesn't seem to work. I can move files there and change the directory but nextcloud is not able to write on it.

            andreasduerenA 1 Reply Last reply
            0
            • andreasduerenA andreasdueren

              @msbt said in Has anyone set up Nextcloud with a Hetzner Storagebox cifs mount as primary storage?:

              Ok so quick update here: I was following the mount procedure from the first link and it's looking good! However, I started with a fresh installation instead of moving my files around, but seeing as it worked out, migrating an existing installation should be no problem either.

              So what I did:

              • deployed a new Cloudron with Nextcloud installed on a fresh CPX21 on Hetzner Cloud (kept it at 40GB though, might scale down if performance allows it)
              • mounted a 5TB Hetzner Storagebox via sshfs into /mnt/cloud and added it as Cloudron volume (/media/cloud)
              • mounted that volume into the Nextcloud app (uncheck read-only)
              • change the datadirectory in config/config.php from 'datadirectory' => '/app/data', to 'datadirectory' => '/media/cloud',
              • cp -r /app/data/admin to the mounted volume and touch .ocdata in /media/cloud

              That's pretty much it I reckon, if you log in now you have this extra storage available:
              13da2c2f-cb18-48c9-b90c-950c44bf2770-grafik.png

              I have both, uploaded a few GB manually and the rest via sync client, no errors so far. A restart won't change the datadirectory, so this should continue working after reboots. Encryption is also enabled and working as intended, still waiting for something that doesn't work properly.

              Thank you so much for the documentation! Could you maybe explain how you mounted the volume via ssh? I added it directly via cloudron and that doesn't seem to work. I can move files there and change the directory but nextcloud is not able to write on it.

              andreasduerenA Offline
              andreasduerenA Offline
              andreasdueren
              wrote on last edited by
              #20

              @andreasdueren Screenshot 2022-01-29 at 08.43.48.png It won't show it as a proper volume either.

              Plus for some reason my internal volume is now almost completely full with mystery data.

              Screenshot 2022-01-29 at 08.42.43.png

              M 1 Reply Last reply
              0
              • andreasduerenA andreasdueren

                @andreasdueren Screenshot 2022-01-29 at 08.43.48.png It won't show it as a proper volume either.

                Plus for some reason my internal volume is now almost completely full with mystery data.

                Screenshot 2022-01-29 at 08.42.43.png

                M Offline
                M Offline
                msbt
                App Dev
                wrote on last edited by
                #21

                @andreasdueren I've mounted it via volumes after getting rid of fstab

                1 Reply Last reply
                1
                • marcusquinnM Offline
                  marcusquinnM Offline
                  marcusquinn
                  wrote on last edited by
                  #22

                  It looks like Hetzner are now pretty-much doing this exact same thing for their "Storage Share" solution:

                  • https://www.hetzner.com/storage/storage-share

                  @girish I think this needs to be a core feature of Cloudron, given the cost-efficiency, scaleability, and additional backup snapshots this offers for very little €s compared to things like GDrive & Dropbox per-user pricing.

                  Web Design https://www.evergreen.je
                  Development https://brandlight.org
                  Life https://marcusquinn.com

                  MooCloud_MattM 1 Reply Last reply
                  3
                  • M msbt

                    Ok so quick update here: I was following the mount procedure from the first link and it's looking good! However, I started with a fresh installation instead of moving my files around, but seeing as it worked out, migrating an existing installation should be no problem either.

                    So what I did:

                    • deployed a new Cloudron with Nextcloud installed on a fresh CPX21 on Hetzner Cloud (kept it at 40GB though, might scale down if performance allows it)
                    • mounted a 5TB Hetzner Storagebox via sshfs into /mnt/cloud and added it as Cloudron volume (/media/cloud)
                    • mounted that volume into the Nextcloud app (uncheck read-only)
                    • change the datadirectory in config/config.php from 'datadirectory' => '/app/data', to 'datadirectory' => '/media/cloud',
                    • cp -r /app/data/admin to the mounted volume and touch .ocdata in /media/cloud

                    That's pretty much it I reckon, if you log in now you have this extra storage available:
                    13da2c2f-cb18-48c9-b90c-950c44bf2770-grafik.png

                    I have both, uploaded a few GB manually and the rest via sync client, no errors so far. A restart won't change the datadirectory, so this should continue working after reboots. Encryption is also enabled and working as intended, still waiting for something that doesn't work properly.

                    jcgonnardJ Offline
                    jcgonnardJ Offline
                    jcgonnard
                    wrote on last edited by jcgonnard
                    #23

                    @msbt
                    Hi

                    I got a similar configuration with a CPX21 instance connected to a BX21 Storagebox.
                    While transfer speed for large files is fine, transfer speed for large amount of small files is horrible:

                    root@nextcloud:~# for f in {1..2000}; do mktemp ; done 
                    /tmp/tmp.qabMyUDO5N
                    /tmp/tmp.QPuk8CcXSB
                    /tmp/tmp.NhErmerWFl
                    /tmp/tmp.CtkY3jvTbL
                    [...]
                    
                    root@nextcloud:~# time cp /tmp/tmp.* /backups/test/
                    real	4m20.998s
                    user	0m0.061s
                    sys	0m0.565s
                    
                    root@nextcloud:~# time rm -fr /backups/test/*
                    real	1m36.682s
                    user	0m0.050s
                    sys	0m0.196s
                    

                    Are you experiencing the same behaviour ?

                    robiR jcgonnardJ M 3 Replies Last reply
                    1
                    • jcgonnardJ jcgonnard

                      @msbt
                      Hi

                      I got a similar configuration with a CPX21 instance connected to a BX21 Storagebox.
                      While transfer speed for large files is fine, transfer speed for large amount of small files is horrible:

                      root@nextcloud:~# for f in {1..2000}; do mktemp ; done 
                      /tmp/tmp.qabMyUDO5N
                      /tmp/tmp.QPuk8CcXSB
                      /tmp/tmp.NhErmerWFl
                      /tmp/tmp.CtkY3jvTbL
                      [...]
                      
                      root@nextcloud:~# time cp /tmp/tmp.* /backups/test/
                      real	4m20.998s
                      user	0m0.061s
                      sys	0m0.565s
                      
                      root@nextcloud:~# time rm -fr /backups/test/*
                      real	1m36.682s
                      user	0m0.050s
                      sys	0m0.196s
                      

                      Are you experiencing the same behaviour ?

                      robiR Offline
                      robiR Offline
                      robi
                      wrote on last edited by
                      #24

                      @jcgonnard many factors influence the availability of IO on the system.

                      Shared systems get busy.

                      See what is available with dd:
                      dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync ; rm /tmp/test1.img

                      Conscious tech

                      1 Reply Last reply
                      0
                      • jcgonnardJ jcgonnard

                        @msbt
                        Hi

                        I got a similar configuration with a CPX21 instance connected to a BX21 Storagebox.
                        While transfer speed for large files is fine, transfer speed for large amount of small files is horrible:

                        root@nextcloud:~# for f in {1..2000}; do mktemp ; done 
                        /tmp/tmp.qabMyUDO5N
                        /tmp/tmp.QPuk8CcXSB
                        /tmp/tmp.NhErmerWFl
                        /tmp/tmp.CtkY3jvTbL
                        [...]
                        
                        root@nextcloud:~# time cp /tmp/tmp.* /backups/test/
                        real	4m20.998s
                        user	0m0.061s
                        sys	0m0.565s
                        
                        root@nextcloud:~# time rm -fr /backups/test/*
                        real	1m36.682s
                        user	0m0.050s
                        sys	0m0.196s
                        

                        Are you experiencing the same behaviour ?

                        jcgonnardJ Offline
                        jcgonnardJ Offline
                        jcgonnard
                        wrote on last edited by
                        #25

                        @jcgonnard

                        SSHFS:

                        root@nextcloud:~# dd if=/dev/zero of=/backups/test.img bs=1G count=1 oflag=dsync
                        1+0 records in
                        1+0 records out
                        1073741824 bytes (1.1 GB, 1.0 GiB) copied, 50.1201 s, 21.4 MB/s
                        root@nextcloud:~# dd if=/dev/zero of=/backups/test.img bs=4M count=250 oflag=dsync
                        250+0 records in
                        250+0 records out
                        1048576000 bytes (1.0 GB, 1000 MiB) copied, 78.6863 s, 13.3 MB/s
                        root@nextcloud:~# dd if=/dev/zero of=/backups/test.img bs=1 count=1000 oflag=dsync
                        1000+0 records in
                        1000+0 records out
                        1000 bytes (1.0 kB) copied, 70.862 s, 0.0 kB/s
                        

                        LOCAL:

                        root@nextcloud:~# dd if=/dev/zero of=/tmp/test.img bs=1G count=1 oflag=dsync
                        1+0 records in
                        1+0 records out
                        1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.863714 s, 1.2 GB/s
                        root@nextcloud:~# dd if=/dev/zero of=/tmp/test.img bs=4M count=250 oflag=dsync
                        250+0 records in
                        250+0 records out
                        1048576000 bytes (1.0 GB, 1000 MiB) copied, 1.31499 s, 797 MB/s
                        root@nextcloud:~# dd if=/dev/zero of=/tmp/test.img bs=1 count=1000 oflag=dsync
                        1000+0 records in
                        1000+0 records out
                        1000 bytes (1.0 kB) copied, 0.500667 s, 2.0 kB/s
                        

                        As I said, transfer speed for medium/big files is fine enough, the problem is for small files.
                        I just asked if some of you experienced the same issue with the same configuration (hetzner VM + storagebox) and if there is a way to improve performances or if I need to find something else that would match my needs

                        robiR 1 Reply Last reply
                        0
                        • jcgonnardJ jcgonnard

                          @jcgonnard

                          SSHFS:

                          root@nextcloud:~# dd if=/dev/zero of=/backups/test.img bs=1G count=1 oflag=dsync
                          1+0 records in
                          1+0 records out
                          1073741824 bytes (1.1 GB, 1.0 GiB) copied, 50.1201 s, 21.4 MB/s
                          root@nextcloud:~# dd if=/dev/zero of=/backups/test.img bs=4M count=250 oflag=dsync
                          250+0 records in
                          250+0 records out
                          1048576000 bytes (1.0 GB, 1000 MiB) copied, 78.6863 s, 13.3 MB/s
                          root@nextcloud:~# dd if=/dev/zero of=/backups/test.img bs=1 count=1000 oflag=dsync
                          1000+0 records in
                          1000+0 records out
                          1000 bytes (1.0 kB) copied, 70.862 s, 0.0 kB/s
                          

                          LOCAL:

                          root@nextcloud:~# dd if=/dev/zero of=/tmp/test.img bs=1G count=1 oflag=dsync
                          1+0 records in
                          1+0 records out
                          1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.863714 s, 1.2 GB/s
                          root@nextcloud:~# dd if=/dev/zero of=/tmp/test.img bs=4M count=250 oflag=dsync
                          250+0 records in
                          250+0 records out
                          1048576000 bytes (1.0 GB, 1000 MiB) copied, 1.31499 s, 797 MB/s
                          root@nextcloud:~# dd if=/dev/zero of=/tmp/test.img bs=1 count=1000 oflag=dsync
                          1000+0 records in
                          1000+0 records out
                          1000 bytes (1.0 kB) copied, 0.500667 s, 2.0 kB/s
                          

                          As I said, transfer speed for medium/big files is fine enough, the problem is for small files.
                          I just asked if some of you experienced the same issue with the same configuration (hetzner VM + storagebox) and if there is a way to improve performances or if I need to find something else that would match my needs

                          robiR Offline
                          robiR Offline
                          robi
                          wrote on last edited by
                          #26

                          @jcgonnard that is pretty good performance for SSHFS.

                          You'll have to switch to a different mount option to increase small file performance, unless you can get all your small files to stream over via tar/zip/etc.

                          Conscious tech

                          1 Reply Last reply
                          0
                          • marcusquinnM marcusquinn

                            It looks like Hetzner are now pretty-much doing this exact same thing for their "Storage Share" solution:

                            • https://www.hetzner.com/storage/storage-share

                            @girish I think this needs to be a core feature of Cloudron, given the cost-efficiency, scaleability, and additional backup snapshots this offers for very little €s compared to things like GDrive & Dropbox per-user pricing.

                            MooCloud_MattM Offline
                            MooCloud_MattM Offline
                            MooCloud_Matt
                            wrote on last edited by MooCloud_Matt
                            #27

                            @marcusquinn
                            Hetzner don't use remote storage use remote clustered DB + local storage.
                            So it's not possible to compare the 2 installs cloudron + storagebox and hetzner storageshare, performance will be a lot better on storageshare, in order of magnitude especially on small files.

                            Matteo. R.
                            Founder and Tech-Support Manager.
                            MooCloud MSP
                            Swiss Managed Service Provider

                            1 Reply Last reply
                            0
                            • jcgonnardJ jcgonnard

                              @msbt
                              Hi

                              I got a similar configuration with a CPX21 instance connected to a BX21 Storagebox.
                              While transfer speed for large files is fine, transfer speed for large amount of small files is horrible:

                              root@nextcloud:~# for f in {1..2000}; do mktemp ; done 
                              /tmp/tmp.qabMyUDO5N
                              /tmp/tmp.QPuk8CcXSB
                              /tmp/tmp.NhErmerWFl
                              /tmp/tmp.CtkY3jvTbL
                              [...]
                              
                              root@nextcloud:~# time cp /tmp/tmp.* /backups/test/
                              real	4m20.998s
                              user	0m0.061s
                              sys	0m0.565s
                              
                              root@nextcloud:~# time rm -fr /backups/test/*
                              real	1m36.682s
                              user	0m0.050s
                              sys	0m0.196s
                              

                              Are you experiencing the same behaviour ?

                              M Offline
                              M Offline
                              msbt
                              App Dev
                              wrote on last edited by
                              #28

                              @jcgonnard I can't really tell, it's always running in the background and I haven't encountered any issues so far

                              MooCloud_MattM 1 Reply Last reply
                              0
                              • M msbt

                                @jcgonnard I can't really tell, it's always running in the background and I haven't encountered any issues so far

                                MooCloud_MattM Offline
                                MooCloud_MattM Offline
                                MooCloud_Matt
                                wrote on last edited by
                                #29

                                @msbt
                                the issue could start with a lot of concurrent users and a lot of small changes to file, due to SMB not working at FS lvl but at file level/block of data.
                                IF hetzner would offer NFS, that could be a solution or better even if there would be support for iscsi.

                                Matteo. R.
                                Founder and Tech-Support Manager.
                                MooCloud MSP
                                Swiss Managed Service Provider

                                1 Reply Last reply
                                0
                                • marcusquinnM marcusquinn referenced this topic on
                                • JOduMonTJ Offline
                                  JOduMonTJ Offline
                                  JOduMonT
                                  wrote on last edited by
                                  #30

                                  I would recommend you to use WebDAV instead of CIFS
                                  it will be faster as WebDAV is more modern and appropriate for extended network (non LAN).

                                  1 Reply Last reply
                                  0
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  • Login

                                  • Don't have an account? Register

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Bookmarks
                                  • Search