Nexus Repository Manager behind traefik issue

I am trying to run nexus as a docker service in our docker swarm, but although the service is up and running, the web page simply shows “initializing” with a few mini image icons.
We are using traefik as our proxy/load balancer also running in the swarm and using traefik labels to redirect traffic based on the url to the correct running service on the backend. I have attached the stack file that we are using to spin up the service. Traefik listens for the path and forwards to the nexus container on port 8081, but for some reason we receive the screenshot showed below. I have tried changing the port the nexus app is running on to 8080 and adding the X-Forwarded-Proto:https label to traefik, but am not sure what the actual issue is.
I am able to run nexus as a standalone container and see the ui, but we want to run it as a service behind traefik.

The issue seems to be that the images, gifs, and js for the welcome page are not loading and are sending a 404 not found error. I think this is because they are looking at instead of /nexus/pathtoimages and I am not sure how to fix this.

I submitted a support ticket with sonotype support and they recommended I change the web app context path

ie. sonatype-work/nexus3/etc/ should contain


If anyone has any experience running nexus behind traefik or has an idea of what might be wrong your assistance would be greatly appreciated. Thanks.

That is correct. In general, when running behind a reverse proxy, like apache httpd, nginx, or traefik, the web context in traefik should match that of the backend Nexus application.

You will likely also need to set other http headers. We have examples for apache and nginx at Run Behind a Reverse Proxy.

Also, as mentioned, the webapp context can be changed via More settings are described at Configuring the Runtime Environment

p.s. the setting for Nexus 3.x is named nexus-context-path. the setting for Nexus 2.x is named nexus-webapp-context-path


I had to deal with the exact same issue.

The Nexus container has an environment variable set up in the file that looks like the following:

So in my docker-compose I had to add:

image: sonatype/nexus3:3.9.0
- traefik.enable=true
- traefik.frontend.rule=PathPrefix:/nexus
- traefik.port=8081

It worked after that.