Jellyfin Forum
Docker help! (for hosting my jellyfin server) - 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: Docker help! (for hosting my jellyfin server) (/t-docker-help-for-hosting-my-jellyfin-server)



Docker help! (for hosting my jellyfin server) - SpiderUnderUrBed - 2023-10-07

Hello i want to set up macvlan for my jellyfin server on docker compose, here is my config file and ip a log: sp
Code:
spiderunderurbed@raspberrypi:~/jellyfinserver-compose $ cat docker-compose.yaml
version: '2.4'
services:
  jellyfin:
    image: jellyfin/jellyfin
    container_name: mediaserver
    user: 1001:1001
    volumes:
      - /home/spiderunderurbed/config:/config
      - /home/spiderunderurbed/cache:/cache
      - /home/spiderunderurbed/media:/media
    restart: 'unless-stopped'
    networks:
      dockervlan:
        ipv4_address: 192.168.0.75

networks:
  dockervlan:
    name: dockervlan
    driver: macvlan
    driver_opts:
      parent: eth0
    ipam:
      config:
        - subnet: "192.168.0.0/24"
          ip_range: "192.168.0.64/26"
          gateway: "192.168.0.1"
My ip a:
Code:
spiderunderurbed@raspberrypi:~/jellyfinserver-compose $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
      valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether d8:3a:dd:28:02:7a brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether d8:3a:dd:28:02:7b brd ff:ff:ff:ff:ff:ff
    inet 192.168.68.90/22 brd 192.168.71.255 scope global dynamic noprefixroute wlan0
      valid_lft 85694sec preferred_lft 74894sec
    inet6 fe80::293d:5189:4d60:3ae7/64 scope link
      valid_lft forever preferred_lft forever
4: tailscale0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc pfifo_fast state UNKNOWN group default qlen 500
    link/none
    inet 100.66.201.41/32 scope global tailscale0
      valid_lft forever preferred_lft forever
    inet6 fd7a:115c:a1e0:ab12:4843:cd96:6242:c929/128 scope global
      valid_lft forever preferred_lft forever
    inet6 fe80::23c5:a3c:7a1b:26cb/64 scope link stable-privacy
      valid_lft forever preferred_lft forever
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:fc:c9:d1:cd brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
      valid_lft forever preferred_lft forever
6: br-98e10f920ca2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:da:42:3d:47 brd ff:ff:ff:ff:ff:ff
    inet 172.21.0.1/16 brd 172.21.255.255 scope global br-98e10f920ca2
      valid_lft forever preferred_lft forever
My DHCP range goes from .2 to .254-256 I am trying to get it to connect directly to my Huawei modem, my computer is connected to my tplink router. Primary ip: 192.168.1.1
I tried to add my supposed macvlan mac address i got.
Docker inspect:
Code:
[
    {
        "Id": "500d51cfe49793d86c47c6c7a3f724ed8e38168e164bdfac35efbd95c8a3086b",
        "Created": "2023-10-07T08:44:00.568427914Z",
        "Path": "/jellyfin/jellyfin",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 2637,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2023-10-07T19:52:03.047764571Z",
            "FinishedAt": "2023-10-07T19:52:02.507992928Z",
            "Health": {
                "Status": "healthy",
                "FailingStreak": 0,
                "Log": [
                    {
                        "Start": "2023-10-08T09:01:07.614745847+13:00",
                        "End": "2023-10-08T09:01:07.83370291+13:00",
                        "ExitCode": 0,
                        "Output": "  % Total    % Received % Xferd  Average Speed  Time    Time    Time  Current\n                                Dload  Upload  Total  Spent    Left  Speed\n\r  0    0    0    0    0    0      0      0 --:--:-- --:--:-- --:--:--    0\r100    7    0    7    0    0  1000      0 --:--:-- --:--:-- --:--:--  1000\nHealthy"
                    },
                    {
                        "Start": "2023-10-08T09:01:37.854643651+13:00",
                        "End": "2023-10-08T09:01:38.023980322+13:00",
                        "ExitCode": 0,
                        "Output": "  % Total    % Received % Xferd  Average Speed  Time    Time    Time  Current\n                                Dload  Upload  Total  Spent    Left  Speed\n\r  0    0    0    0    0    0      0      0 --:--:-- --:--:-- --:--:--    0\r100    7    0    7    0    0  1166      0 --:--:-- --:--:-- --:--:--  1400\nHealthy"
                    },
                    {
                        "Start": "2023-10-08T09:02:08.280258075+13:00",
                        "End": "2023-10-08T09:02:08.483869547+13:00",
                        "ExitCode": 0,
                        "Output": "  % Total    % Received % Xferd  Average Speed  Time    Time    Time  Current\n                                Dload  Upload  Total  Spent    Left  Speed\n\r  0    0    0    0    0    0      0      0 --:--:-- --:--:-- --:--:--    0Healthy\r100    7    0    7    0    0    777      0 --:--:-- --:--:-- --:--:--  777\n"
                    },
                    {
                        "Start": "2023-10-08T09:02:38.501256894+13:00",
                        "End": "2023-10-08T09:02:38.733973891+13:00",
                        "ExitCode": 0,
                        "Output": "  % Total    % Received % Xferd  Average Speed  Time    Time    Time  Current\n                                Dload  Upload  Total  Spent    Left  Speed\n\r  0    0    0    0    0    0      0      0 --:--:-- --:--:-- --:--:--    0\r100    7    0    7    0    0  1166      0 --:--:-- --:--:-- --:--:--  1166\nHealthy"
                    },
                    {
                        "Start": "2023-10-08T09:03:08.7518448+13:00",
                        "End": "2023-10-08T09:03:08.978628022+13:00",
                        "ExitCode": 0,
                        "Output": "  % Total    % Received % Xferd  Average Speed  Time    Time    Time  Current\n                                Dload  Upload  Total  Spent    Left  Speed\n\r  0    0    0    0    0    0      0      0 --:--:-- --:--:-- --:--:--    0\r100    7    0    7    0    0  1000      0 --:--:-- --:--:-- --:--:--  1000\nHealthy"
                    }
                ]
            }
        },
        "Image": "sha256:5bf98eaeff7dcb51e4ad3b965c4c5782246d944f0e657136ba8e63520909b59d",
        "ResolvConfPath": "/var/lib/docker/containers/500d51cfe49793d86c47c6c7a3f724ed8e38168e164bdfac35efbd95c8a3086b/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/500d51cfe49793d86c47c6c7a3f724ed8e38168e164bdfac35efbd95c8a3086b/hostname",
        "HostsPath": "/var/lib/docker/containers/500d51cfe49793d86c47c6c7a3f724ed8e38168e164bdfac35efbd95c8a3086b/hosts",
        "LogPath": "/var/lib/docker/containers/500d51cfe49793d86c47c6c7a3f724ed8e38168e164bdfac35efbd95c8a3086b/500d51cfe49793d86c47c6c7a3f724ed8e38168e164bdfac35efbd95c8a3086b-json.log",
        "Name": "/jellyfin",
        "RestartCount": 1,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/home/spiderunderurbed/cache:/cache",
                "/home/spiderunderurbed/config:/config"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "host",
            "PortBindings": {},
            "RestartPolicy": {
                "Name": "unless-stopped",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "private",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "KernelMemory": 0,
            "KernelMemoryTCP": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": null,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "Mounts": [
                {
                    "Type": "bind",
                    "Source": "/home/spiderunderurbed/mediaserver",
                    "Target": "/media"
                }
            ],
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/ca70bb136efcb5bc59e0fbb75f0227438e9e0d37baa9342f0bd5400d066568c8-init/diff:/var/lib/docker/overlay2/f84b305f83243aef92a47f4c321959496a5b8d9fc887d641084bac91567608d8/diff:/var/lib/docker/overlay2/5418ab9a835582e804f5daf21dacef13d3a92f9211a4d103de6c8bdb9ecb2437/diff:/var/lib/docker/overlay2/2fd04f751a7344065348571ed8548e57cb1ba7b31eb1f991d9aab1caca534f2a/diff:/var/lib/docker/overlay2/1abe56d3667d500ff45f0b5fe511ff319c2791e3d80ccf2ec97f242b126308d1/diff:/var/lib/docker/overlay2/394701b4715d90c532de3b009419175b326e4bb32a88909625eee25cbeebacd6/diff",
                "MergedDir": "/var/lib/docker/overlay2/ca70bb136efcb5bc59e0fbb75f0227438e9e0d37baa9342f0bd5400d066568c8/merged",
                "UpperDir": "/var/lib/docker/overlay2/ca70bb136efcb5bc59e0fbb75f0227438e9e0d37baa9342f0bd5400d066568c8/diff",
                "WorkDir": "/var/lib/docker/overlay2/ca70bb136efcb5bc59e0fbb75f0227438e9e0d37baa9342f0bd5400d066568c8/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/home/spiderunderurbed/mediaserver",
                "Destination": "/media",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/home/spiderunderurbed/cache",
                "Destination": "/cache",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/home/spiderunderurbed/config",
                "Destination": "/config",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "raspberrypi",
            "Domainname": "",
            "User": "1001:1001",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "8096/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "HEALTHCHECK_URL=http://localhost:8096/health",
                "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1",
                "LC_ALL=en_US.UTF-8",
                "LANG=en_US.UTF-8",
                "LANGUAGE=en_US:en",
                "JELLYFIN_DATA_DIR=/config",
                "JELLYFIN_CACHE_DIR=/cache",
                "JELLYFIN_CONFIG_DIR=/config/config",
                "JELLYFIN_LOG_DIR=/config/log",
                "JELLYFIN_WEB_DIR=/jellyfin/jellyfin-web",
                "JELLYFIN_FFMPEG=/usr/lib/jellyfin-ffmpeg/ffmpeg"
            ],
            "Cmd": null,
            "Healthcheck": {
                "Test": [
                    "CMD-SHELL",
                    "curl -Lk \"${HEALTHCHECK_URL}\" || exit 1"
                ],
                "Interval": 30000000000,
                "Timeout": 30000000000,
                "StartPeriod": 10000000000,
                "Retries": 3
            },
            "Image": "jellyfin/jellyfin",
            "Volumes": {
                "/cache": {},
                "/config": {}
            },
            "WorkingDir": "",
            "Entrypoint": [
                "/jellyfin/jellyfin"
            ],
            "OnBuild": null,
            "Labels": {}
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "be97617683ee4201b4333a392fe18b48f643352dd9bd796b90c1e750f204aef6",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": "/var/run/docker/netns/default",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "host": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "6a9c787194c55981a6cf92254a4316f22b585b5f4a77c2760950ed167727ab5b",
                    "EndpointID": "b7e592e935236dbea1cf91d0d0b42c230df208d8691ee255cfdaeefea66fc386",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "",
                    "DriverOpts": null
                }
            }
        }
    }
]

Why macvlan? macvlan has some benifits, currently some weird glitch or something is happening on my rasberry pi which makes the server located at a given ip verses localhost port 8096 work weird, like, it shows my server, but wont let me connect. Also macvlan i am using for security/isolation/convinience and testing purposes


RE: Docker help! (for hosting my jellyfin server) - TheDreadPirate - 2023-10-07

Make sure that you are bridging the vlans.