Swag is not working anymore

  • Looks like that is the case.


    You need to see all of the ports being used by docker from compose / containers. You should see a list of all running containers with the ports in use. see if you can see any that are using 445


    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • That is what the error indicates. It has to be a port that is not in use by something else

    Asrock B450M, AMD 5600G, 64GB RAM, 6 x 4TB RAID 5 array, 2 x 10TB RAID 1 array, 100GB SSD for OS, 1TB SSD for docker and VMs, 1TB external SSD for fsarchiver OS and docker data daily backups

  • Hello,

    I was able to deploy swag on port 447 with such a stack. :

    I forwarded the port as follows on my router like shown on the attached pic. OMV is working on the port 88.

    With such settings, going to https://mydomain.duckdns.org goes nowhere, http://... also....

    What did I wrong....

  • You have been having a lot of fun getting this working. :)


    I think this issue you have now is that when you are on your lan (e.g. at home with client connected to your wifi or wired) then https://mydomain.duckdns.org will not resolve. You need https://mydomain.duckdns.org:447


    When not on your home network (e.g. on mobile network) then https://mydomain.duckdns.org will work but https://mydomain.duckdns.org:447 will not work.


    Can you test this - then I know the issue and can help you fix it


    FYI port forward rules on the router only apply to connections to your wan (not lan)

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • Out of interest, what service (omv, containers, other) is using the standard https port 443?


    My first choice strategy to fix this issue would be to free up port 443 and then run swag 443:443 - but this is not always possible/easy.


    The reason is that then you can use swag easily for everything - including whatever is currently using port 443.

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • Hello,

    I was able to deploy swag on port 447 with such a stack. :

    I forwarded the port as follows on my router like shown on the attached pic. OMV is working on the port 88.

    With such settings, going to https://mydomain.duckdns.org goes nowhere, http://... also....

    What did I wrong....

    Glad you got it working and got a partial answer to the question of why it wasn't resolving your domain locally.


    When you type a domain into your browser, the browser looks to an internet DNS server to find the ip address of your configured domain. That ip address points right back at you but normally internet service providers hardware don't allow for this type of traffic reflection (also known as hairpinning).


    You can continue to handle it like you are, or you can do what I, and many more, have done. I have an instance of pihole running on my system that acts as a local DNS server to handle any requests on your LAN, and if it doesn't have a lookup in it's table, it forwards the request on to the internet. You then configure your router to pass out the address of pihole as the primary dns server, or you manually configure your systems with the ip of pihole for dns.


    There are guides in the guide section of the forum on how to set up pihole in docker and one I made on how to set it up in an lxc. You could also opt to set it up on another system or a raspberry pi (it's called pihole because it was originally designed for a raspberry pi) The configuration is all explained in the guides and the documentation on the pihole website.


    There are other options as well. Some routers can handle local dns configurations with dnsmasq (dnsmasq is also what pihole uses), or and adguard docker container or you could also use a simple dnsmasq docker container if you don't want the ad blocking features of pihole or adguard.


    Using local dns allows you to use the same address regardless of if you are at home or not.

    Asrock B450M, AMD 5600G, 64GB RAM, 6 x 4TB RAID 5 array, 2 x 10TB RAID 1 array, 100GB SSD for OS, 1TB SSD for docker and VMs, 1TB external SSD for fsarchiver OS and docker data daily backups

  • - URL=mydomain.duckdns.org - SUBDOMAINS=wildcard - VALIDATION=duckdns

    When using wildcard on SWAG, the certificate is asign to the SUB.SUBDOMAIN


    The access to the server will only shows some thing on

    https://SUB.subdomain.duckdns.org


    The domain won't have a certificate.


    For eg

    https://www.subdomain.duckdns.org will show the SWAG park page but without the www, nothing shows

  • Out of interest, what service (omv, containers, other) is using the standard https port 443?


    My first choice strategy to fix this issue would be to free up port 443 and then run swag 443:443 - but this is not always possible/easy.


    The reason is that then you can use swag easily for everything - including whatever is currently using port

    Hello,

    I did not find any containers using port 443 in the list.

    I attach the list, maybe you will be better than me :)

    Best regards,

    Harold

  • I am sorry. I made a bast verifications. When I am either on my home network or mobile network, the same address (https://mydomain.duckdns.org:447) but not https://mydomain.duckdns.org

  • You are correct. None of your containers are using port 443. It might not be a docker container using the port...


    What port is omv gui using? http or https? what ports?


    have you tried starting swag on 443?

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • I have swag running on two servers on my network. One using default port 443 and the other 444 so it does work fine.


    You just do https://emby.mydomain.duckdns.org:447


    And configure the reverse proxy in swag normally. Remember you have only changed to port you use on the host side. The container does not change and does not care. It just forwards the request internally and returns the results back.

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • If I were you I would get the reverse proxy working when on the network. Get one or two of the services you want to reverse proxy to working.


    From outside you need to use https://emby.mydomain.duckdns.org (and this is an issue as you really want 1 url that works for both cases). Correct?


    We can fix this issue. There are a few ways to do it. But my advice is get the basics working then we can help you with the next part...

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • hahaha. I am happy I said to check port 443! It simplifies everything a fair bit (as you have just found out).

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • One thing to think about but not for now!


    While your setup is working, it is probably a bit inefficient. I'm guessing (as I don't know your network setup) but probably every time you connect to a reverse proxied service (while at home), your network has to do an external dns lookup to to find out the service is actually on your network and so this is a waste of time/resource. Others have pointed out you might want to investigate split or hairpin DNS.


    Or use an intermediary system like pihole or adguard. I use adguard and it has a really clever and simple way to 'rewrite' (or redirect) to the correct internal address without needing to do an external dns lookup.


    Right now, just enjoy your working setup!

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!