Jellyfin Forum
SOLVED: Issue with new install - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Issue with new install (/t-solved-issue-with-new-install)



Issue with new install - Lukatz - 2025-02-22

Hello All,

I just used Docker to setup Jellyfin on my Debian 12 server. My docker compose file is below. I am running into an issue that Jellyfin can not see the sub-folders in /data/media. So far my searches have not turned up anything to point me in the right direction. I am getting this error in the log. 

Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "Could not find a part of the path '/data/media/movies'". URL "GET" "/Environment/DirectoryContents".

 
Code:
jellyfin:
    container_name: jellyfin
    image: ghcr.io/linuxserver/jellyfin
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Kolkata
    ports:
      - '8096:8096'
    devices:
      - '/dev/dri/card0:/dev/dri/card0'
    volumes:
      - '/home/${USER}/server/configs/jellyfin:/config'
      - '/home/${USER}/server/media:/data/media'
    restart: unless-stopped

When I do an ls -la I get the following results. Since I have Jellyfin running as my user it should have access to the folders with this is my understanding.
drwxr-xr-x 7 (user) (user) 4096 Feb 22 11:24 .
drwxr-xr-x 7 (user) (user) 4096 Feb 22 11:24 ..
drwxr-xr-x 7 (user) (user) 4096 Feb 22 11:24 audiobooks
drwxr-xr-x 7 (user) (user) 4096 Feb 22 11:24 books
drwxr-xr-x 7 (user) (user) 4096 Feb 22 11:24 movies
drwxr-xr-x 7 (user) (user) 4096 Feb 22 11:24 music
drwxr-xr-x 7 (user) (user) 4096 Feb 22 11:24 tv


My Jellyfin build is 10.10.6. If there is anything else I need to provide let me know. Thank you for any help you can give me.
10.10.6
10.10.6


RE: Issue with new install - TheDreadPirate - 2025-02-22

Where are you defining ${USER}? In a .env file? Is that set to a user name or user ID?


RE: Issue with new install - Lukatz - 2025-02-22

(Yesterday, 10:32 PM)TheDreadPirate Wrote: Where are you defining ${USER}?  In a .env file?  Is that set to a user name or user ID?

I am new to this so forgive me if I am wrong. From my understanding when I set the environmental arguments it makes it use my user as the user that Jellyfin uses. At least that is what I understand.


RE: Issue with new install - TheDreadPirate - 2025-02-23

Docker will not use the host's environment variables by default. So specifying $USER within a Docker compose will not translate to your username inside the Docker container.

You will need to either directly specify your path or you need to create a .env or custom environment file where you do define $USER.

https://docs.docker.com/compose/how-tos/environment-variables/set-environment-variables/#use-the-env_file-attribute


RE: Issue with new install - Lukatz - 2025-02-23

(Today, 01:46 AM)TheDreadPirate Wrote: Docker will not use the host's environment variables by default.  So specifying $USER within a Docker compose will not translate to your username inside the Docker container.

You will need to either directly specify your path or you need to create a .env or custom environment file where you do define $USER.

https://docs.docker.com/compose/how-tos/environment-variables/set-environment-variables/#use-the-env_file-attribute

Again please correct me if I am wrong but the way I read it here (https://docs.linuxserver.io/general/understanding-puid-and-pgid/#using-the-variables) is when using the PUID and PGUID it sets the user to the number I use. In this case 1000 which is my user. I did change my path from ${USER} to my actual user. I then stopped and restarted my Jellyfin container and I did not see a change. I still had the same paths and could not see any other folders. Thank you for helping me understand this.

You can ignore the above. Thank you again for your help! I deleted my container and started a new one after changing the file path to my user and it worked!