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 - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Funkwhale
  3. How to get music in?

How to get music in?

Scheduled Pinned Locked Moved Funkwhale
11 Posts 4 Posters 89 Views 4 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.
  • jamesJ Offline
    jamesJ Offline
    james
    Staff
    wrote last edited by
    #2

    Hello @jdaviescoates

    Please try to use:

    export MEDIA_ROOT="/media/Music"
    

    in the /app/data/env.sh file.

    jdaviescoatesJ 1 Reply Last reply
    1
    • jdaviescoatesJ jdaviescoates

      I already have a Volume called Music at /media/Music so I mounted that in the Storage settings of the app and then as per the docs here https://docs.funkwhale.audio/administrator/configuration/env-file.html I created the following within env.sh using the File Manager

      MEDIA_ROOT="/media/Music"

      also tried:

      MEDIA_ROOT=/media/Music

      Neither resulted in anything being displayed in Funkwhale.

      Has anyone got this working yet?

      Thanks!

      PS I thought we normally had env instead of env.sh in Cloudron apps these days? 🤔

      J Offline
      J Offline
      joseph
      Staff
      wrote last edited by joseph
      #3

      @jdaviescoates said:

      PS I thought we normally had env instead of env.sh in Cloudron apps these days? 🤔

      env.sh -> export required
      env -> no export required

      1 Reply Last reply
      2
      • jamesJ james

        Hello @jdaviescoates

        Please try to use:

        export MEDIA_ROOT="/media/Music"
        

        in the /app/data/env.sh file.

        jdaviescoatesJ Offline
        jdaviescoatesJ Offline
        jdaviescoates
        wrote last edited by
        #4

        @james said:

        Hello @jdaviescoates

        Please try to use:

        export MEDIA_ROOT="/media/Music"
        

        in the /app/data/env.sh file.

        That didn't seem to make any difference. Any my server is running out of space so for now I've just deleted the app to free app a little.

        I use Cloudron with Gandi & Hetzner

        1 Reply Last reply
        0
        • jdaviescoatesJ jdaviescoates

          I already have a Volume called Music at /media/Music so I mounted that in the Storage settings of the app and then as per the docs here https://docs.funkwhale.audio/administrator/configuration/env-file.html I created the following within env.sh using the File Manager

          MEDIA_ROOT="/media/Music"

          also tried:

          MEDIA_ROOT=/media/Music

          Neither resulted in anything being displayed in Funkwhale.

          Has anyone got this working yet?

          Thanks!

          PS I thought we normally had env instead of env.sh in Cloudron apps these days? 🤔

          rmdesR Offline
          rmdesR Offline
          rmdes
          wrote last edited by rmdes
          #5

          @jdaviescoates you should mount the volume at /app/data/music in Cloudron's Storage settings instead of /media/Music.

          The package already expects music files at /app/data/music/, nginx already serves from there, and the env vars already point there. No env.sh changes needed, just change the mount point in Cloudron's UI.

          I have not tested with a volume mount (I'm still loading all my collection within /app/data/music natively in the container, but I will transition to volume mount soon

          1 Reply Last reply
          0
          • rmdesR Offline
            rmdesR Offline
            rmdes
            wrote last edited by rmdes
            #6

            Another way to import music fast :

            In-place import means Funkwhale indexes your music files without copying them — it reads the metadata (tags) and creates database entries, then streams directly from the original location.

            In the Cloudron context, it would work like this:

            1. Mount the volume at /app/data/music in Cloudron's Storage settings
            2. Files are immediately visible to Funkwhale - MUSIC_DIRECTORY_PATH already points there
            3. Import via CLI from the web terminal:
            /app/code/manage.sh import_files <library_id> "/app/data/music/" --in-place --recursive
            
            1. (Get your library ID from the Funkwhale web UI, create a library first if you haven't)
            2. Streaming works because nginx already serves /_protected/music/ from /app/data/music/ via X-Accel-Redirect, the files are served directly, no duplication

            The package even has scheduler tasks for maintaining in-place imports:

            • check_inplace_files_check - dry-run to see if any referenced files are missing
            • check_inplace_files_apply - actually update the database for missing files

            So the key point for the user: mount at /app/data/music, then in-place import just works out of the box. Their files stay on the mounted volume, Funkwhale only stores metadata in PostgreSQL, and nginx serves the audio directly from disk.

            jdaviescoatesJ 1 Reply Last reply
            1
            • rmdesR rmdes

              Another way to import music fast :

              In-place import means Funkwhale indexes your music files without copying them — it reads the metadata (tags) and creates database entries, then streams directly from the original location.

              In the Cloudron context, it would work like this:

              1. Mount the volume at /app/data/music in Cloudron's Storage settings
              2. Files are immediately visible to Funkwhale - MUSIC_DIRECTORY_PATH already points there
              3. Import via CLI from the web terminal:
              /app/code/manage.sh import_files <library_id> "/app/data/music/" --in-place --recursive
              
              1. (Get your library ID from the Funkwhale web UI, create a library first if you haven't)
              2. Streaming works because nginx already serves /_protected/music/ from /app/data/music/ via X-Accel-Redirect, the files are served directly, no duplication

              The package even has scheduler tasks for maintaining in-place imports:

              • check_inplace_files_check - dry-run to see if any referenced files are missing
              • check_inplace_files_apply - actually update the database for missing files

              So the key point for the user: mount at /app/data/music, then in-place import just works out of the box. Their files stay on the mounted volume, Funkwhale only stores metadata in PostgreSQL, and nginx serves the audio directly from disk.

              jdaviescoatesJ Offline
              jdaviescoatesJ Offline
              jdaviescoates
              wrote last edited by jdaviescoates
              #7

              @rmdes said:

              So the key point for the user: mount at /app/data/music

              But unless I've misunderstood Cloudron Volumes cannot be mounted there, they are always at /media/volume-name , no?

              Perhaps it's possible to symlink or something?

              But, I think if I set MUSIC_DIRECTORY_PATH to (in my case) /media/Music I'd guess it would've worked... will have another play...

              I use Cloudron with Gandi & Hetzner

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

                Looking at the repo, there are three paths:

                export MEDIA_ROOT="/app/data/media"
                export MUSIC_DIRECTORY_PATH="/app/data/music"
                export MUSIC_DIRECTORY_SERVE_PATH="/app/data/music"
                

                What's the difference between music and media 🤔 cc @james

                1 Reply Last reply
                1
                • jamesJ Offline
                  jamesJ Offline
                  james
                  Staff
                  wrote last edited by
                  #9

                  According to the documentation of Funkwhale:

                  MEDIA_ROOT

                  The path where you store media files (such as album covers or audio tracks) on your system. Make sure this directory actually exists.

                  MUSIC_DIRECTORY_PATH

                  The path on your server where Funkwhale places files from in-place imports. This path needs to be readable by the webserver and api and worker processes.

                  MUSIC_DIRECTORY_SERVE_PATH

                  On Docker setups the value of MUSIC_DIRECTORY_PATH may be different from the actual path on your server. You can specify this path in your docker-compose.yml file

                  When setting this in the /app/data/env.sh and creating the folders and setting the correct permissions manually.
                  A media file was uploaded to the volume.

                  export MEDIA_ROOT="/media/External SSD/funkwhale/media"
                  export STATIC_ROOT="/media/External SSD/funkwhale/static"
                  export MUSIC_DIRECTORY_PATH="/media/External SSD/funkwhale/music"
                  export MUSIC_DIRECTORY_SERVE_PATH="/media/External SSD/funkwhale/music"
                  
                  1 Reply Last reply
                  1
                  • J Offline
                    J Offline
                    joseph
                    Staff
                    wrote last edited by
                    #10

                    thanks @james. ok, so MEDIA_ROOT is like metadata and MUSIC_DIRECTORY_PATH is the real music. .

                    jamesJ 1 Reply Last reply
                    0
                    • J joseph

                      thanks @james. ok, so MEDIA_ROOT is like metadata and MUSIC_DIRECTORY_PATH is the real music. .

                      jamesJ Offline
                      jamesJ Offline
                      james
                      Staff
                      wrote last edited by
                      #11

                      @joseph
                      As I understood it, not even that.
                      MEDIA_ROOT is where all media uploaded gets stored.
                      MUSIC_DIRECTORY_PATH is like an import folder where you can manually upload files that then get imported.
                      But I am not 100 % certain, it is still confusing for me.

                      1 Reply Last reply
                      1

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      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