Swag is not working anymore
-
- OMV 6.x
- harold.mouras
-
-
It might be file permissions on the directory/files created by the container.
To see if you can get the container to run at all, edit the compose and use 0 (root) as the PUID.
Then redeploy the container (edit stack and redeploy) and post back the log
If you get it working using root, then we can make it safer after
Hello,
yes, as 0 with the PUID, that works. Should I let the 0 now or change something else ?
Thank you again,
Harold
-
You are in business. Good news.
I would not recommend that you run the container as root (PUID 0). This is easy to fix and will apply to other containers if/when you use them.
The problem is permissions/ownership of the folders/files that the container creates when it first runs. You just need to change the permissions recursively on your local swag config folder ( /srv/dev-disk-by-uuid-92231eb7-e8d7-49e4-8445-0aaa5c450b26/config/swag)
You can do this using winSCP (if you use windows) or from the cli (i.e. terminal via ssh). I would recommend you download and use winscp as it is a useful tool/application.
From the cli you will need to run (as root so using sudo) - see below.
Then update your stack and redeploy.
Good luck.
-
-
Thank you so much for everything
-
Code
Display Moreservices: swag: image: lscr.io/linuxserver/swag container_name: swag hostname: swag cap_add: - NET_ADMIN environment: - PUID=1000 - PGID=1000 - TZ=Europe/Paris - EMAIL=anothermail - URL=anotherdomain.duckdns.org - SUBDOMAINS=wildcard - VALIDATION=duckdns - DUCKDNSTOKEN=mytoken volumes: - /etc/localtime:/etc/localtime:ro - /appdata/swag:/config ports: - 444:444 restart: unless-stopped
I did forward the port 444 to 444 on the router. I can see the swag screen working.
How I did edit an heimdall stack like this :
Code
Display More--- services: heimdall: image: lscr.io/linuxserver/heimdall:latest container_name: heimdall environment: - PUID=1000 - PGID=1000 - TZ=Etc/UTC volumes: - /srv/dev-disk-by-uuid-a4573920-1223-409f-95b0-eb4903d28617/appdata/heimdall/config:/config ports: - 81:80 - 458:458 restart: unless-stopped
set up the heimdall.subdomain.conf under the proxy_confs subfolder of swag like this :
Code
Display Moreserver { listen 443 ssl; listen [::]:443 ssl; server_name heim.*; include /config/nginx/ssl.conf; client_max_body_size 0; include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; set $upstream_app 192.168.0.12; set $upstream_port 81; set $upstream_proto https; proxy_pass $upstream_proto://$upstream_app:$upstream_port;
I can see the heimdall page at http://NAS-IP:81 but not by typing http://heim.anotherdomain.duckdns.org
I do not know what is not well set up.
Thanks,
Harold
-
All good.
Did you change folder owner to 1000 and the container is working?
With your setup you need to port forward 443 to 443 on ip 192.168.0.12
Also in your reverse proxy config I think there is a mistake. Try:
set $upstream_proto http;
-
-
Yes, I did change on the first OMV system with the swag problems. It works now perfectly.
My last message was about another OMV system (another PC).
Thanks
-
No worries.
If you have more than one swag docker on your network you will need to use a different port for swag and forward this to the other system
Also check/try the change
set $upstream_proto http;
-
I did change the line to http in the heimdall.subdomaine.conf file. Restarted the swag container.
Also as you see in the swag yml, I specified port 444:444 which also I did opened on the router.
-
-
I see now I am looking at your post on a computer (not on my iphone).
Setup looks ok I think but you need to use https not http for url.
-
Yes, but this adress is going to the swag screen
-
That indicates there is something wrong with your reverse proxy config file for heim. I don't use heim so I do not know to set it up.
Have you tested access from outside your network or are you doing your testing on the lan?
Do you have adguard or pihole on your network with any DNS re-write rules?
-
-
A couple of things that might help but not sure.
1. in your swag yaml I think you need to change your port mapping to 444:443 as the container is listening on 443 (not 444).
2. This is very minor and will not be the issue but in your heimall yaml you have 1000 as PGID and PUID. This is unusal.
-
You have also made some errors with your heimdall yaml. It would help if you read the docker docs.
You can't just change the container port inside your yaml as the container is 'built' using this port. so you need something like this - note I have only changed the host port and this is mapped to the container port that is not changed.
Then you need to continue with this logic into your reverse proxy config - see below. Note that I am using the https port/config.
so the connection url is https://heim.xxxx
Code
Display Moreserver { listen 443 ssl; listen [::]:443 ssl; server_name heim.*; include /config/nginx/ssl.conf; client_max_body_size 0; location / { include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; set $upstream_app 192.168.0.12; set $upstream_port 458; set $upstream_proto https; proxy_pass $upstream_proto://$upstream_app:$upstream_port; } }
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!