• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support General Questions Swag Docker config example for jellyfin?

    Pages (2): 1 2 Next »

     
    • 0 Vote(s) - 0 Average

    Swag Docker config example for jellyfin?

    revivor
    Offline

    Junior Member

    Posts: 9
    Threads: 1
    Joined: 2024 Mar
    Reputation: 0
    #1
    2024-03-26, 06:19 PM (This post was last modified: 2024-03-26, 06:37 PM by revivor. Edited 4 times in total.)
    Hello,
    Can someone post an example for swag docker config files pls? 
    I m going insane with this. 
    I tried offical config from swag and tried the Nginx config from Jelly-Wiki but nothing works…

    I would like to use http Auth with redirect to https
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-03-27, 12:44 PM
    Someone posted their SWAG config in the Jellyfin Matrix chat last month. I'll try to track that down, but probably won't have the time to do that until Saturday.

    I have a SWAG installed on my test system, but haven't gotten around to figuring out a working config and writing up docs for it yet.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    revivor
    Offline

    Junior Member

    Posts: 9
    Threads: 1
    Joined: 2024 Mar
    Reputation: 0
    #3
    2024-03-27, 02:10 PM
    Thanks for your Reply! That Chat would be very helpful!

    i Found a script for SWAG at the bottom of this site about letsencrypt.

    https://jellyfin.org/docs/general/networ...tsencrypt/

    It mentioned that this is for subfolder and subdomain installations. i dont use both of them. So which variable has to change for normal domain without sub?


    Quote:server {
        listen 443 ssl;
        listen [::]:443 ssl;
        server_name jellyfin.*;
        include /config/nginx/ssl.conf;
        client_max_body_size 0;
        location / {
            include /config/nginx/proxy.conf;
            resolver 127.0.0.11 valid=30s;
            set $upstream_app jellyfin;
            set $upstream_port 8096;
            set $upstream_proto http;
            proxy_pass $upstream_proto://$upstream_app:$upstream_port;
            proxy_set_header Range $http_range;
            proxy_set_header If-Range $http_if_range;
        }
        location ~ (/jellyfin)?/socket/ {
            include /config/nginx/proxy.conf;
            resolver 127.0.0.11 valid=30s;
            set $upstream_app jellyfin;
            set $upstream_port 8096;
            set $upstream_proto http;
            proxy_pass $upstream_proto://$upstream_app:$upstream_port;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $http_connection;
      }
    }
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-03-27, 02:47 PM (This post was last modified: 2024-03-27, 02:50 PM by TheDreadPirate. Edited 2 times in total.)
    Code:
    location ~ (/jellyfin)?/socket/ {

    Is this what you actually have in the SWAG config? It should be

    Code:
    location ~ (/socket/ {

    Also, in your DNS is "jellyfin" resolving to your jellyfin server? Try putting your container/host IP instead of "jellyfin" for the proxy pass.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    revivor
    Offline

    Junior Member

    Posts: 9
    Threads: 1
    Joined: 2024 Mar
    Reputation: 0
    #5
    2024-03-27, 05:07 PM
    Thanks again!

    I ve change into this
    but still get "no response"

    This my default.conf now:

    Quote:server {
        listen 443 ssl;
        listen [::]:443 ssl;
        server_name jellyfin.*;
        include /config/nginx/ssl.conf;
        client_max_body_size 0;
        location / {
            include /config/nginx/proxy.conf;
            resolver 127.0.0.11 valid=30s;
            set $upstream_app 192.0.0.2;
            set $upstream_port 8096;
            set $upstream_proto http;
            proxy_pass $upstream_proto://$upstream_app:$upstream_port;
            proxy_set_header Range $http_range;
            proxy_set_header If-Range $http_if_range;
        }
        location ~ (/socket/ {
            include /config/nginx/proxy.conf;
            resolver 127.0.0.11 valid=30s;
            set $upstream_app 192.0.0.2;
            set $upstream_port 8096;
            set $upstream_proto http;
            proxy_pass $upstream_proto://$upstream_app:$upstream_port;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $http_connection;
      }
    }


    what about
    Quote:server_name jellyfin.*;

    should i change jellyfin here too? Server Name of the Host or the Docker Container Name? My Jellyfin is not on Docker!

    My Setup:
    `
    Libreelec with official Jellyfin Addon and "SWAG Docker Addon" runs on the same host. Only SWAG is in docker.

    Maybe Docker Addon don't talk with host? How can i bring them together?

    In jellyfin Network Settings is https not active. Only the official Port Entry 8920. Is that correct?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #6
    2024-03-27, 05:17 PM
    (2024-03-27, 05:07 PM)revivor Wrote: what about
    Quote:server_name jellyfin.*;


    This is the name that the server listens for on port 443.  This is should be fine as is.

    (2024-03-27, 05:07 PM)revivor Wrote: should i change jellyfin here too? Server Name of the Host or the Docker Container Name? My Jellyfin is not on Docker!

    My Setup:
    `
    Libreelec with official Jellyfin Addon and "SWAG Docker Addon" runs on the same host. Only SWAG is in docker.

    Maybe Docker Addon don't talk with host? How can i bring them together?

    In jellyfin Network Settings is https not active. Only the official Port Entry 8920. Is that correct?

    Can you share the docker compose for SWAG?  What is the network_mode?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    revivor
    Offline

    Junior Member

    Posts: 9
    Threads: 1
    Joined: 2024 Mar
    Reputation: 0
    #7
    2024-03-27, 05:24 PM
    I've read this in the commentary of the Script.

    Quote:# in jellyfin settings, under "Advanced/Networking" add subdomain.mydomain.tld as a known proxy

    what does this mean in my case? only domain name " domain.****.eu " or Container Name of SWAG?

    this is my docker script
    Quote:docker run -d \
      --name=swag \
      --cap-add=NET_ADMIN \
      -e PUID=1000 \
      -e PGID=1000 \
      -e TZ=Europe/London \
      -e URL=domain.****.eu \
      -e VALIDATION=http \
      -e PROPAGATION= #optional \
      -e DHLEVEL=2048 \
      -e ONLY_SUBDOMAINS=false \
      -e STAGING=false\
      -p 443:443 \
      -p 80:80 \
      -v /storage/.config/swag/config:/config \
      --restart unless-stopped \
      lscr.io/linuxserver/swag:latest
    revivor
    Offline

    Junior Member

    Posts: 9
    Threads: 1
    Joined: 2024 Mar
    Reputation: 0
    #8
    2024-03-27, 05:39 PM
    Docker inspect says

    network_mode "default"

    Quote:  },
            "NetworkSettings": {
                "Bridge": "",
                "SandboxID": "05",
                "SandboxKey": "/var/run/docker/netns/054f6796f4c4",
                "Ports": {
                    "443/tcp": [
                        {
                            "HostIp": "0.0.0.0",
                            "HostPort": "443"
                        },
                        {
                            "HostIp": "::",
                            "HostPort": "443"
                        }
                    ],
                    "80/tcp": [
                        {
                            "HostIp": "0.0.0.0",
                            "HostPort": "80"
                        },
                        {
                            "HostIp": "::",
                            "HostPort": "80"
                        }
                    ]
                },
                "HairpinMode": false,
                "LinkLocalIPv6Address": "",
                "LinkLocalIPv6PrefixLen": 0,
                "SecondaryIPAddresses": null,
                "SecondaryIPv6Addresses": null,
                "EndpointID": "
                "Gateway": "172.17.0.1",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "IPAddress": "172.17.0.2",
                "IPPrefixLen": 16,
                "IPv6Gateway": "",
                "MacAddress": "",
                "Networks": {
                    "bridge": {
                        "IPAMConfig": null,
                        "Links": null,
                        "Aliases": null,
                        "MacAddress": "",
                        "NetworkID": "975a63930bcb89cf32daa65d6bb244b5f73704b2002579b2451e9c753b4e477d",
                        "EndpointID": "a8d8eed550eeeaff45eb4a3dbca7c70c528f5546300a3a31a7abf67b018d1453",
                        "Gateway": "172.17.0.1",
                        "IPAddress": "172.17.0.2",
                        "IPPrefixLen": 16,
                        "IPv6Gateway": "",
                        "GlobalIPv6Address": "",
                        "GlobalIPv6PrefixLen": 0,
                        "DriverOpts": null,
                        "DNSNames": null
                    }
                }
            }
        }
    ]
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #9
    2024-03-27, 05:41 PM
    Ah. Not using host networking. You'd have to do additional configuration to allow SWAG to communicate with non-docker services. Or just add "--network host" as one of the parameters so that is uses the same IP and NIC as the host OS and other apps (including Jellyfin). You will need to open port 443 in the host firewall after doing this.

    The "Known Proxies" config tells Jellyfin to log the "X-Forwarded-For" field, which would have the original requestor when using a reverse proxy on a different host. Since SWAG and Jellyfin are on the same host, this is not necessary.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    revivor
    Offline

    Junior Member

    Posts: 9
    Threads: 1
    Joined: 2024 Mar
    Reputation: 0
    #10
    2024-03-27, 06:10 PM
    I've added
    --network host \

    to the docker script. and recreate the container. At the End I get this message

    Quote:WARNING: Published ports are discarded when using host network mode

    I've restarted and fill in the same swag config as before.

    Now I am at network mode = host

    and on my Router I made Portsharing for this "host" on all ports used in Jellyfin and 443.

    Quote: You will need to open port 443 in the host firewall after doing this.

    How?

    Is there something special on libreelec (this is the host) with Port 443?

    as I leave SWAG default.conf as it was. I get this message when I enter domain URL:

    if i use our config then the other message appears:


    Attached Files Thumbnail(s)
           
    Pages (2): 1 2 Next »

    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode