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
  • Brite
  • 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. Support
  3. Trying to add an sshfs mounted location as a regular file system volume type in Cloudron

Trying to add an sshfs mounted location as a regular file system volume type in Cloudron

Scheduled Pinned Locked Moved Solved Support
volumessshfs
25 Posts 7 Posters 2.4k Views 6 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.
  • J Offline
    J Offline
    joseph
    Staff
    wrote on last edited by
    #12

    Didn't get an answer to my earlier question. Is it a symlink? You can't add symlinks.

    Can you try node -e "fs.realpathSync('/the/path')" ? This function is failing or returning something other than the path you are adding for some reason.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      msbt
      App Dev
      wrote on last edited by
      #13

      Can only speak for my issue, not a symlink:

      /mnt# ls -la
      total 12
      drwxr-xr-x  4 root root 4096 Jun  9 09:21 .
      drwxr-xr-x 23 root root 4096 Dec 17 11:10 ..
      drwxr-xr-x  1 root root    0 Jun  9 09:22 media
      drwxr-xr-x  2 root root 4096 Dec 17 11:31 volumes
      

      Your command doesn't fail, but doesn't give any output either.

      J 1 Reply Last reply
      0
      • M msbt

        Can only speak for my issue, not a symlink:

        /mnt# ls -la
        total 12
        drwxr-xr-x  4 root root 4096 Jun  9 09:21 .
        drwxr-xr-x 23 root root 4096 Dec 17 11:10 ..
        drwxr-xr-x  1 root root    0 Jun  9 09:22 media
        drwxr-xr-x  2 root root 4096 Dec 17 11:31 volumes
        

        Your command doesn't fail, but doesn't give any output either.

        J Offline
        J Offline
        joseph
        Staff
        wrote on last edited by
        #14

        @msbt said in Trying to add an sshfs mounted location as a regular file system volume type in Cloudron:

        Your command doesn't fail, but doesn't give any output either.

        My bad... Can you try like this:

        root@my:/mnt# node -e "console.log(fs.realpathSync('/mnt/folder'))"
        /mnt/folder
        
        M 1 Reply Last reply
        0
        • J joseph

          @msbt said in Trying to add an sshfs mounted location as a regular file system volume type in Cloudron:

          Your command doesn't fail, but doesn't give any output either.

          My bad... Can you try like this:

          root@my:/mnt# node -e "console.log(fs.realpathSync('/mnt/folder'))"
          /mnt/folder
          
          M Offline
          M Offline
          msbt
          App Dev
          wrote on last edited by
          #15

          @joseph sure:

          /mnt# node -e "console.log(fs.realpathSync('/mnt/media'))"
          /mnt/media
          
          J 1 Reply Last reply
          0
          • M msbt

            @joseph sure:

            /mnt# node -e "console.log(fs.realpathSync('/mnt/media'))"
            /mnt/media
            
            J Offline
            J Offline
            joseph
            Staff
            wrote on last edited by joseph
            #16

            @msbt you are trying to add /mnt/media in the Volumes view ? I cannot see why https://git.cloudron.io/platform/box/-/blob/master/src/volumes.js?ref_type=heads#L57 will fail . That's where the error message comes from. If you are ok debugging a bit, just put some console.log in that function and systemctl restart box.

            M 1 Reply Last reply
            0
            • J joseph

              @msbt you are trying to add /mnt/media in the Volumes view ? I cannot see why https://git.cloudron.io/platform/box/-/blob/master/src/volumes.js?ref_type=heads#L57 will fail . That's where the error message comes from. If you are ok debugging a bit, just put some console.log in that function and systemctl restart box.

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

              @joseph happy to, can you maybe enable chat so we can do that 1:1?

              1 Reply Last reply
              0
              • J Offline
                J Offline
                joseph
                Staff
                wrote on last edited by
                #18

                @msbt can you instead write to me at support@cloudron.io please? Will debug it right away.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  msbt
                  App Dev
                  wrote on last edited by msbt
                  #19

                  My issue is resolved, adding a --allow-other parameter to the mount solved it, thanks @girish and @joseph

                  andreasduerenA 1 Reply Last reply
                  4
                  • J joseph has marked this topic as solved on
                  • M msbt

                    My issue is resolved, adding a --allow-other parameter to the mount solved it, thanks @girish and @joseph

                    andreasduerenA Offline
                    andreasduerenA Offline
                    andreasdueren
                    wrote last edited by
                    #20

                    @msbt I'm sorry but could you do a small writeup of your setup? I'd be interested in using a storage box as storage backend.

                    1 Reply Last reply
                    1
                    • M Offline
                      M Offline
                      msbt
                      App Dev
                      wrote last edited by
                      #21

                      @andreasdueren the setup in this case is based on rclone, is that what you're looking for? Because the regular storage box setup you probably already know of, since you posted in there as well 😉 https://forum.cloudron.io/post/32783

                      andreasduerenA 1 Reply Last reply
                      2
                      • M msbt

                        @andreasdueren the setup in this case is based on rclone, is that what you're looking for? Because the regular storage box setup you probably already know of, since you posted in there as well 😉 https://forum.cloudron.io/post/32783

                        andreasduerenA Offline
                        andreasduerenA Offline
                        andreasdueren
                        wrote last edited by
                        #22

                        @msbt Yes the regular storage box setup i'm well familiar with. But that won't work with immich. So you installed rclone and connected via the SFTP backend?

                        M 1 Reply Last reply
                        0
                        • andreasduerenA andreasdueren

                          @msbt Yes the regular storage box setup i'm well familiar with. But that won't work with immich. So you installed rclone and connected via the SFTP backend?

                          M Offline
                          M Offline
                          msbt
                          App Dev
                          wrote last edited by
                          #23

                          @andreasdueren yep, I did this to install and configure it:

                          curl https://rclone.org/install.sh | sudo bash
                          rclone config
                          

                          after that, the config will resides in

                          ~/.config/rclone/rclone.conf
                          

                          and will look something like this (I enabled encryption too, because why not 😉 :

                          [backup]
                          type = sftp
                          host = u123456-sub1.your-storagebox.de
                          user = u123456-sub1
                          port = 23
                          pass = hashed_pwd
                          md5sum_command = md5 -r
                          sha1sum_command = sha1 -r
                          shell_type = unix
                          idle_timeout = 0
                          
                          [backupcrypt]
                          type = crypt
                          remote = backup:backup
                          

                          mounting:

                          mkdir /mnt/backup
                          chown -R yellowtent:yellowtent /mnt/backup
                          rclone mount backupcrypt: /mnt/backup \
                              --crypt-password "verylonghashedpwd" \
                              --crypt-password2 "evenlongerhashedpwd" \
                              --vfs-cache-mode writes --daemon --transfers 3 --checkers 6 --allow-other
                          

                          The last bit was the important one, without it mounting wasn't possible. You should now be able to mount the rclone thing as a volume. For whatever reason it shows the red dot, I'm guessing that's because of the fs. However, I haven't had an issue with that in months. Currently I'm mounting it manually on every machine reboot, but there are ways to mount it automatically.

                          andreasduerenA 1 Reply Last reply
                          2
                          • M msbt

                            @andreasdueren yep, I did this to install and configure it:

                            curl https://rclone.org/install.sh | sudo bash
                            rclone config
                            

                            after that, the config will resides in

                            ~/.config/rclone/rclone.conf
                            

                            and will look something like this (I enabled encryption too, because why not 😉 :

                            [backup]
                            type = sftp
                            host = u123456-sub1.your-storagebox.de
                            user = u123456-sub1
                            port = 23
                            pass = hashed_pwd
                            md5sum_command = md5 -r
                            sha1sum_command = sha1 -r
                            shell_type = unix
                            idle_timeout = 0
                            
                            [backupcrypt]
                            type = crypt
                            remote = backup:backup
                            

                            mounting:

                            mkdir /mnt/backup
                            chown -R yellowtent:yellowtent /mnt/backup
                            rclone mount backupcrypt: /mnt/backup \
                                --crypt-password "verylonghashedpwd" \
                                --crypt-password2 "evenlongerhashedpwd" \
                                --vfs-cache-mode writes --daemon --transfers 3 --checkers 6 --allow-other
                            

                            The last bit was the important one, without it mounting wasn't possible. You should now be able to mount the rclone thing as a volume. For whatever reason it shows the red dot, I'm guessing that's because of the fs. However, I haven't had an issue with that in months. Currently I'm mounting it manually on every machine reboot, but there are ways to mount it automatically.

                            andreasduerenA Offline
                            andreasduerenA Offline
                            andreasdueren
                            wrote last edited by
                            #24

                            @msbt nice, thanks! Will have to read out on that. How is speed? Are you using it for immich?

                            M 1 Reply Last reply
                            0
                            • andreasduerenA andreasdueren

                              @msbt nice, thanks! Will have to read out on that. How is speed? Are you using it for immich?

                              M Offline
                              M Offline
                              msbt
                              App Dev
                              wrote last edited by
                              #25

                              @andreasdueren you're welcome, I forgot to post the Hetzner docs, they also have a bit of information on that. Speeds are fine, never had any issues with various kinds of media.

                              1 Reply Last reply
                              1
                              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