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. Support
  3. Access Cloudron volume from WordPress container

Access Cloudron volume from WordPress container

Scheduled Pinned Locked Moved Solved Support
volumes
7 Posts 5 Posters 962 Views 5 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.
    • T Offline
      T Offline
      THI_Staff
      wrote on last edited by girish
      #1

      Hi guys 🙂

      Please could you help with the following; thank you very much in advance.

      We've done out homework using both Cloudron and forum resources, see links below (thank you to all who documented their prior experience and troubleshooting):

      • https://docs.cloudron.io/volumes/#filesystem-mountpoint
      • https://docs.cloudron.io/apps/#mounts

      We created a volume, we presented it to the WordPress app container / website, but we are not able to access an mp4 hosted on the volume from within WordPress to display the mp4 on a website page or post.

      Here is what we've done:

      • In Cloudron Volumes, we created a volume called ovitest of type Filesystem and pointing to /srv/ovitest (we created this folder on the host first using FileZilla); permissions were assigned to root, as one would expect
      • In one of our WordPress Cloudron containers / websites, on Storage tab under the Mounts section, we added the volume ovitest with Read and Write permissions
      • As per advice from https://forum.cloudron.io/topic/5747/volumes-are-not-working/8 we figured out that our cloudron user and group equivalent on our setup is www-data, so we ran "chown -R www-data:www-data /media/ovitest" to change permissions on the new volume, we confirmed from FileZilla that this change applied succesfully and plus, checking other hosted apps / systems we have, we noted the same Owner of www-data elsewhere so we are confident that the mount is set up correctly from a host / Cloudron perspective
        NB: We were slightly surprised by the chown command using /media/ovitest given that we set up the Filesystem volume with /srv/ovitest, but the chowm command worked. Also when we run "ls -lah /media" in the Terminal for the website, we do get ovitest returned in the results.

      Now, trying to access the mp4 file from the WordPress site, we can't figure out what the correct URL or UNC path is; we tried /media/ovitest/Red-cloud.mp4 which is correct from a Cloudron perspective, but it does not load in a video WordPress object (because the mp4 can't be found or accessed); we also tried https://<our_web_domain>/media/ovitest/Red-cloud.mp4 but this does not work either (mp4 can't be found or accessed). We confirmed the mp4 has correctly inherited the www-data user and group permissions, so we are out of ideas, hence asking you guys for advice.

      Not sure if we also need a symlink created as detailed here https://forum.cloudron.io/topic/7619/filesystem-mount-inside-container/5 but our website is not showing under /home for root as benborges detailed in his post; so this may not apply to us.

      Finally, as mentioned here https://forum.cloudron.io/topic/7619/filesystem-mount-inside-container/11 we also ran "chmod 777 Red-cloud.mp4" but this made no different as far as accessing this file from WordPress.

      Your help and assistance is much appreciated, thank you again.

      THI Staff

      1 Reply Last reply
      0
      • BrutalBirdieB Offline
        BrutalBirdieB Offline
        BrutalBirdie
        Partner
        wrote on last edited by
        #2

        Hmmm linking @staff maybe @nebulon or @girish have some thoughts.

        Like my work? Consider donating a drink. Cheers!

        1 Reply Last reply
        0
        • robiR Offline
          robiR Offline
          robi
          wrote on last edited by robi
          #3

          It seems the app container can see the mount from terminal so that's fine.

          However now you have to map the mount dir to something the webserver can read and have access to.

          For WP that means something like an additional dir in the wp-content/uploads/ tree that sym-links to the /media/ovitest mount path.

          Once you can see and select your .mp4 from the media picker or filemanager plugin in WP, it'll work.

          Conscious tech

          1 Reply Last reply
          0
          • T Offline
            T Offline
            THI_Staff
            wrote on last edited by
            #4

            @robi That makes a lot of sense, though we've not seen any of this mentioned in the Cloudron documentation.

            I will talk to our WordPress developer though he is new to the Cloudron packaged WP container deployment so if anybody can detail further what exactly is required for the following 2 steps, we would be very grateful indeed. Of course we'll have a go ourselves as well. Thank you @robi

            "However now you have to map the mount dir to something the webserver can read and have access to.
            For WP that means something like an additional dir in the wp-content/uploads/ tree that links to the /media/ovitest mount path."

            1 Reply Last reply
            0
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #5

              @THI_Staff did you get this sorted out? Somehow I missed this thread.

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

                If I'm understanding the aim, maybe a job for the Minio app? Might make future migrations of content locations easier, too.

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

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  THI_Staff
                  wrote on last edited by
                  #7

                  @girish Yes, all sorted, thank you for asking.

                  Thanks to @robi's suggestion all we needed to do was the following:

                  • in terminal window for our WordPress app, at /app/code/wp-content/uploads we created a symlink (ln -s /media/ovitest ovitest) and then updated its permissions, just in case (chown -R www-data:www-data ovitest)
                  • then we could access the mp4 at https://<our_web_domain>/wp-content/uploads/ovitest/Red-cloud.mp4

                  Thank you very much all; we did enjoy finding the fix in the end. 🙂 And of course we will make good use of it as we can now keep 10-20 GB of data, or even more, outside the WordPress data container, so out of the backup, but still reference this content on our website, which is great.

                  1 Reply Last reply
                  3
                  • nebulonN nebulon marked this topic as a question on
                  • nebulonN nebulon has marked this topic as solved on
                  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