[How-To] Web services using Swag (Proxy) in docker - Q&A

  • the op has homeassistant running in a vm, not in a docker container

    That was my understanding. ;)

    That's why the changes needed on the homeassist.subdomain.conf.


    SWAG will proxy everything, as long as the LAN IP is reachable (even on the same host, VM or not)

  • SWAG will proxy everything, as long as the LAN IP is reachable (even on the same host, VM or not)

    It will even proxy to any IP / domain in the internet. Go create a google search in your domain :) *


    * They will probably do a redirect as first step, so only a short fun

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • is it wrong or dangerous?

    It is beeing served by swag, so when you access it outside of your house, it is secured:

  • SWAG changed the way to use GeoIP (MaxMindDB):

    Zitat

    LinuxServer Changes:

    Move maxmind to a new mod

    It is a bit difficult to set it now.

  • Hey, appreciate the tutorial, after trying it I got "Welcome to your SWAG instance" but not Jellyfin, so also looked on linuxserver and added some stuff to the stack from them but that didn't help either. Seems no matter what I do I just get the "Welcome to your SWAG instance" screen but never a login for Jellyfin.

    Here's my setup, hopefully someone can spot what I did wrong:


    The stack for Jellyfin:

    The stack for DuckDNS without my actual personal info:

    And this is the stack for Swag, also without personal info, the only difference with this one and your tutorial is that it has the DuckDNS token added:

    This is the log for Swag, everything reads as if it should be working correctly:

    Both Swag and Jellyfin are running on the same network called "swag": 4rQHs5j.png


    The ports in my router are open, for both 443 and 80, showing the first one in the image, think I read that 80 is not even necessary?

    It's an Asus router with Asuswrt-merlin firmware on it.

    XIp1l7h.jpeg


    The Jellyfin network settings are pretty much still default, so perhaps I need to make changes there. The jellyfin.subdomain.conf says to set the public https port to 443 but that gave me the exact same results as not doing that.

    VFWUYmQ.png

    Did of course also remove the .sample part from the Swag/nginx/proxy-confs/jellyfin.subdomain.conf file, didn't do anything else to it, so the code is still default. Did try to change the $upstream_app to <172.27.0.3> but that also made no difference.

    Do feel like the setup is very close to working but for now whatever I do always gives me this:

    xAwpeCO.jpeg

    That's when trying to acces through "https://www.jellyfin.mydomain*.duckdns.org/" or "https://www.mydomain*.duckdns.org/jellyfin".

    Hopefully I provided enough information and it can help someone figure out what went wrong, thank you very much :)

  • You posted quite a lot, but what about the conf files redirecting th traffic to jellyfin?

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Hey, appreciate the tutorial,

    If you had really followed chente tutorial, you wouldn't have PUID 998.


    Sorry but you probably mixed tutoriais.

    • Offizieller Beitrag

    That's when trying to acces through "https://www.jellyfin.mydomain*.duckdns.org/" or "https://www.mydomain*.duckdns.org/jellyfin".

    Hopefully I provided enough information and it can help someone figure out what went wrong, thank you very much :)

    I agree with both of them, with Zoki and with Soma .

    You must edit the file jellyfin.subdomain.conf or jellyfin.subfolder.conf (depending on how you want to access it, by subdomain or subfolder) as Zoki says. Read carefully point 5 of the guide. I would say that this is the only thing you need to make it work.

    And of course in none of my tutorials you will see the use of user 998 as Soma says. This way it can work for you, but in an insecure way, it is not advisable at all. Look here.

  • Ah sorry, didn't know the PUID and PGID mattered that much that's why I used the default one I once found using ssh, did now make an user in OMV5 and it has UID 1000 and GID 100, added the user to the groups "users" and "docker", also updated the jellyfin, duckdns and swag stacks with the new PUID and PGID in Portainer.


    Had already removed .sample from the jellyfin.subdomain.conf filename, but thought it would automatically find the jellyfin container, but it seems I might need to point it to the correct location then?

    Did try to change the $upstream_app to <172.27.0.3> and then restarted the containers but that made no difference.

    I removed sample from the "subdomain" and not "subfolder" file as I understood this "Due to a DuckDNS limitation, our cert only covers the wildcard subdomains, but it doesn't cover the main url." from the linuxserver website as subfolders not working with DuckDNS, but it could be that I'm misunderstanding it.

    This is the code for the jellyfin.subdomain.conf :

  • Did try to change the $upstream_app to <172.27.0.3>

    Use the LAN IP, not the docker IP.

  • Of course, that makes sense, changed it to it's local IP, 192.168.50.205 and restarted the container, also set the public HTTPS port number in jellyfin to 443 and restarted the container but both still shows "Welcome to your SWAG instance" and not jellyfin...


    Just to be sure, this is what you meant right?

    Also changed them separately from each other, have one be 192.168.50.205 and the other jellyfin and vice versa.

    Really appreciate the fast responses, and thanks for the help so far.

  • Muchas gracias.

    Lo unico que no veo es maxmind.conf en mi ruta.

    can i create it?

    No. To make it use the Maxmind, you need to follow the instructions on the page I have posted.

    As I said, it's not easy, especcially if english is not your best.


    Of course, that makes sense, changed it to it's local IP, 192.168.50.205 and restarted the container

    You have 2x typos on the jellyfin.subdomain.conf.

    Lines #22 && #34 need to be like this:

    Code
            set $upstream_app 192.168.50.205;



    also set the public HTTPS port number in jellyfin to 443 and restarted the container but both still shows

    Do not change anything in jellyfin, other than checking the box for Allow remote connections to this server.


    Restart all containers and reach jellyfin with:

    https://jellyfin.<yourdomain>.duckdns.org

  • Haha, yeah that is indeed more logical, thank you very much, it now works! Part of the issue might have been that I went to http://www.jellyfin.etc instead of http://jellyfin.etc as well, as on the www version it still only shows "Welcome to your SWAG instance".

    But thank you very much, I've been trying to figure this out for almost a week now, remade all 3 stacks multiple times as well.

  • on the www version it still only shows "Welcome to your SWAG instance".

    And that is the reason wildcard env is there for.

    The mistake you were making was that you were using a sub.subdomain approach.


    Ripping this appart:


    You create a DOMAIN in duckdns: for eg. mydomain.duckdns.org

    Then you use the SUBDOMAIN conf on SWAG: for eg. jellyfin, nextcloud, vaultwarden, etc


    Since you have wildcard, everything you write before DOMAIN, will go to the SWAG park page unless you have used the respective SUBDOMAIN.CONF.


    If you write something before the SUBDOMAIN, for eg www.jellyfin.mydomain.duckdns.org, SWAG will assume the SUBDOMAIN as www for which you don't have a SUBDOMAIN.CONF and will end at the SWAG park page.

    This is seen as SUB.SUBDOMAIN.DOMAIN.duckdns.org


    Hope this makes more sense now.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!