Error when I try to open n8n home deployed in docker swarm

I have deployed n8n in my docker swarm cluster as a docker stack using docker composse. I can access to this swarm cluster by VPN because its in isolated datacenter. I use Traeffik in docker swarm to inter connect the services and access from outside the cluster. The Traefik use port 80. I have n8n deployed with a local volume and constaint to one node, and if I wan to acces to it, I can see a lot of error in my browser like:

-GET http://NODE_IP:80/n8n-abkassets/index-sFuAwd8C.js net::ERR_ABORTED 404 (Not Found)
Or
-Refused to apply style from ‘http://NODE_IP:80/n8n-abkassets/index-GbijzjdD.css’ because its MIME type (‘text/plain’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.

I’ve set the environment variables like this:
- N8N_PATH=n8n-abk
- N8N_HOST=localhost
- N8N_PORT=5678
- N8N_PROTOCOL=HTTP

n8n version: latest in dockerhub
Database (default: SQLite):SQLite
Running n8n via (Docker, npm, n8n cloud, desktop app):Docker
Operating system:Ubuntu

How can I solve this error?

Thanks

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Enol, welcome to the community!

With the 404 errors occurring on Traefik I first suspected the problem could with your Traefik config rather than n8n.

However, seeing you are using Docker swarm, is there a chance your Traefik instance and n8n simply can’t talk to each other as expected in your current setup? Are you also seeing this problem when using docker/docker compose instead on a single machine?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.