Introduction: Hello, community members! I’m reaching out to tap into the collective wisdom of our community to seek guidance on a challenge I’m currently facing with my infrastructure setup on a self-hosted server.
The Challenge: In my current self-hosted server environment, I’ve successfully deployed an instance of n8n, a robust workflow automation tool, along with Traefik serving as a reverse proxy to manage incoming traffic. However, I’m encountering difficulties as I attempt to deploy a second instance of n8n.
Key Details:
Port Mapping Challenge: n8n only exposes its internal port (5678), making it challenging to map different external ports for multiple instances.
Traefik Configuration: Configuring Traefik to efficiently route traffic for multiple n8n instances based on domains or paths has proven to be more complex than anticipated.
Server Configuration: Tweaking the server configuration to handle multiple instances while ensuring proper security and resource utilization is an ongoing challenge.
Desired Outcome: My ultimate goal is to have multiple instances of n8n running concurrently on my self-hosted server, each accessible through Traefik, ensuring seamless workflow automation.
Seeking Community Assistance: If anyone in our community has experience with running multiple n8n instances on a self-hosted server or expertise in Traefik configurations, I would greatly appreciate your guidance. Specifically, any insights on how to overcome the port mapping limitations of n8n and optimal Traefik configurations for routing traffic to distinct n8n instances would be immensely helpful.
What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
I run about 4 instances of n8n in my home setup but I don’t use Traefik I use nginx as my reverse proxy of choice.
What I do is I run n8n in containers and map the host port to something different so 10001 maps to container 1 on port 5678, 10002 maps to container 2 on 5678 and so on. Then in my reverse proxy configuration I direct the traffic to the local IP on the 1000x port. In theory you could also do this with private networks and using machine names but that depends on how good your Docker knowledge is.
For the Traefik configuration I don’t have any examples on that but looking at this it might just be a case of adding labels to your containers.