Web UI Not Working Through Nginx

I’m running the hotio/duplicacy Docker image and the web UI is inoperable when I try to access it through my domain with Nginx handing the reverse proxy. Everything is fine through regular LAN access, but when I load it through my domain it appears that none of the CSS or JavaScript is functional.

Instead of this view:
Correct login

I get this view:
Incorrect login

Since the JavaScript isn’t functional, I can’t get past this login page.

I have a few other apps running behind Nginx but this is the only one with this issue.

I guess that was because files under /assets were not loaded. For example, can you open http://host:port/assets/js/jquery.min.js?

Nope, none of the assets are accessible. Trying to access any of them brings me to the admin password page.

Any suggestions on how to get the assets to load through Nginx?

Is it something in your Nginx setup that doesn’t forward these requests to the web UI?

I’m not very experienced with Nginx, but I have Vaultwarden and Emby exposed through it and they’re working fine through the web interfaces. It seems isolated to Duplicacy, but I don’t know what to check for.

Check the log file ~/.duplicacy-web/logs/duplicacy_web.log to see if there are any requests like:

2022/07/12 20:59:43 [::1]:59453 GET /assets/css/bootstrap.min.css
2022/07/12 20:59:43 [::1]:59454 GET /assets/css/paper-dashboard.css
2022/07/12 20:59:43 [::1]:59458 GET /assets/js/jquery.min.js
2022/07/12 20:59:43 [::1]:59457 GET /assets/js/jquery-1.10.2.min.js
2022/07/12 20:59:43 [::1]:59456 GET /assets/css/font-awesome.min.css
2022/07/12 20:59:43 [::1]:59455 GET /assets/css/duplicacy-web.css
2022/07/12 20:59:43 [::1]:59457 GET /assets/js/chartist.min.js
2022/07/12 20:59:43 [::1]:59454 GET /assets/js/bootbox.min.js
2022/07/12 20:59:43 [::1]:59453 GET /assets/js/bootstrap.min.js
2022/07/12 20:59:43 [::1]:59458 GET /assets/js/axios.min.js
2022/07/12 20:59:43 [::1]:59455 GET /assets/js/paper-dashboard.js
2022/07/12 20:59:43 [::1]:59456 GET /assets/js/polyfill.min.js
2022/07/12 20:59:43 [::1]:59456 GET /assets/img/product-icon.png
2022/07/12 20:59:43 [::1]:59456 GET /assets/fonts/fontawesome-webfont.woff2?v=4.7.0

If you don’t see these requests then it means Nginx isn’t forwarding them to the web GUI.

Ugh unrelated to this but I had a power outage that lasted almost 24 hours. Now when I go to restart Duplicacy I get “Failed to load the configuration file /app/.duplicacy-web/duplicacy.json.” I checked the file and it’s 0 bytes, completely empty. I assume the unclean shutdown is to blame.

Is there a way to recover from this or will I need to start over from scratch?

Disregard my last question. I used a new Docker image to get back to a working state.

I just tried accessing via Nginx and it appears to be forwarding to the web GUI and being rejected because the admin token isn’t provided:

2022/07/19 23:13:24 [ip:port] GET /duplicacy/ administration token not provided
2022/07/19 23:13:24 [ip:port] GET /duplicacy/assets/js/jquery.min.js administration token not provided
2022/07/19 23:13:24 [ip:port] GET /duplicacy/assets/js/axios.min.js administration token not provided
2022/07/19 23:13:24 [ip:port] GET /duplicacy/assets/js/bootstrap.min.js administration token not provided
2022/07/19 23:13:24 [ip:port] GET /duplicacy/assets/css/bootstrap.min.css administration token not provided
2022/07/19 23:13:24 [ip:port] GET /duplicacy/assets/css/duplicacy-web.css administration token not provided
2022/07/19 23:13:24 [ip:port] GET /duplicacy/assets/js/chartist.min.js administration token not provided
2022/07/19 23:13:24 [ip:port] GET /duplicacy/assets/js/polyfill.min.js administration token not provided
2022/07/19 23:13:24 [ip:port] GET /duplicacy/assets/js/jquery-1.10.2.min.js administration token not provided
2022/07/19 23:13:24 [ip:port] GET /duplicacy/assets/css/paper-dashboard.css administration token not provided
2022/07/19 23:13:24 [ip:port] GET /duplicacy/assets/js/paper-dashboard.js administration token not provided
2022/07/19 23:13:24 [ip:port] GET /duplicacy/assets/css/font-awesome.min.css administration token not provided
2022/07/19 23:13:24 [ip:port] GET /duplicacy/assets/js/bootbox.min.js administration token not provided
2022/07/19 23:13:24 [ip:port] GET /duplicacy/assets/img/product-icon.png administration token not provided

However, if I access through my LAN, only the root access is denied due to the admin token:

2022/07/19 23:16:24 [ip:port] GET / administration token not provided
2022/07/19 23:16:24 [ip:port] GET /assets/css/bootstrap.min.css
2022/07/19 23:16:24 [ip:port] GET /assets/css/paper-dashboard.css
2022/07/19 23:16:24 [ip:port] GET /assets/css/duplicacy-web.css
2022/07/19 23:16:24 [ip:port] GET /assets/css/font-awesome.min.css
2022/07/19 23:16:24 [ip:port] GET /assets/js/jquery-1.10.2.min.js
2022/07/19 23:16:24 [ip:port] GET /assets/js/jquery.min.js
2022/07/19 23:16:24 [ip:port] GET /assets/js/bootstrap.min.js
2022/07/19 23:16:24 [ip:port] GET /assets/js/bootbox.min.js
2022/07/19 23:16:24 [ip:port] GET /assets/js/axios.min.js
2022/07/19 23:16:24 [ip:port] GET /assets/js/chartist.min.js
2022/07/19 23:16:24 [ip:port] GET /assets/js/paper-dashboard.js
2022/07/19 23:16:24 [ip:port] GET /assets/js/polyfill.min.js