Hey everyone, I’m currently trying to run Jellyfin with Tailscale using docker compose and a reverse proxy through Caddy. I’m using this guide to do this. After configuring the yaml, I tried to start things up and Tailscale and Jellyfin started, but Caddy wouldn’t start and it gave the following error:

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/root/Jellyfin/jellyfin-tailscale/caddy/conf/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": create mountpoint for /etc/caddy/Caddyfile mount: cannot create subdirectories in "/var/lib/docker/overlay2/325e35ec5a4c8d8bac5d7576e2deeb4b8365af027486e232ad78b458708b639b/merged/etc/caddy/Caddyfile": not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

I checked the Caddy Image information here, and modified the yaml to mount the Caddyfile directory instead.

New code looks like this ~/Jellyfin/jellyfin-tailscale/caddy/conf:/etc/caddy

Now when I restart the services with Docker Compose, all three start, however Caddy (and therefore Jellyfin) won’t run, they continually try restarting. By looking at it with docker logs caddy, I see that it throws out this error over and over:

Error: reading config from file: read /etc/caddy/Caddyfile: is a directory

I’ve inspected both the Caddyfile in /etc/caddy and in ~/Jellyfin/jellyfin-tailscale/caddy/conf using file Caddyfile, and both say they’re Caddyfile: ASCII text.

What am I missing and how do I fix it?

EDIT: Forgot to put in links

  • krolden@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    26 days ago

    Post your compost file

    Also I wouldn’t bother with a tailscale container, just run it on the host

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    26 days ago

    Do not use /root inside or outside of a container for plain file access. That’s insane.

    This is a permissions issue, so set the mount point to something else that’s world readable by default. Event /tmp isn’t a horrible idea.

    You also don’t mention if Podman is the underlying runtime managing the container, but if it is, you need get familiar with mounting when things like SElinux are enabled on this host.

    • techwooded@lemmy.caOP
      link
      fedilink
      arrow-up
      2
      ·
      26 days ago

      Thanks for the info, I’ll try using a different mount point. Which directory would be best?

      Do not use /root inside or outside of a container for plain file access. That’s insane.

      Yeah I agree, I don’t know where that came from in the initial error. That line in the yaml file had the path as ~/Jellyfin/jellyfin-tailscale/caddy/conf/Caddyfile so it was in my user directory

      You also don’t mention if Podman is the underlying runtime managing the container

      I’m not using Podman

      • just_another_person@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        26 days ago

        Anything that already exists and won’t have pwd permissions issues is fine. Generally whatever your direct user has access to, so you don’t have to add things to the base image.

  • techwooded@lemmy.caOP
    link
    fedilink
    arrow-up
    1
    ·
    26 days ago

    UPDATE: For those keeping score at home, I needed to change the mount from /etc/caddy to /usr/share/caddy and now it works. However, I have a new problem:

    Once I get all three containers (caddy, jellyfin, and tailscale) up and running, now I can’t access it. All three report as being up and I checked the logs and none list any errors, but when I go to my tailnet address, it can’t find anything. I’ve even put the port number in and it can’t find anything. Any ideas?

    • Luke@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      25 days ago

      You have a lot going on there all at once that could be contributing to the whole thing failing.

      If it were me, I would try to get caddy working independently of everything else first, since it was your original problem, then layer in the other containers one by one in case you’ve got configuration problems in them too.

      Caddy by itself is super easy to verify with something like a browse directive pointed at an empty directory.

      Then add your tailscale container and configs, and check that you can still access the browse page from caddy.

      Then add your Jellyfin container and adjust the Caddyfile to proxy to it.

      • techwooded@lemmy.caOP
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        25 days ago

        I went through all this, and it seems Jellyfin was the problem. I added this into my yaml:

        ports: - "8096"

        And now I can access the server…if I use port 32769…which I figured out by using docker compose ps -a. I also had restarted it once, and before the restart, I accessed it with 32768. Any idea on how to fix this? I don’t even know what’s causing it