Previous class
# Install SeedDMS Guide

N8N Docker Set Up

Login to Dev Server

eg: Putty to 192.168.1.109

Install Docker:

# Install prerequisites sudo apt install -y apt-transport-https ca-certificates curl software-properties-common # Add Docker's official GPG key curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg # Add Docker's repository to APT sourcesecho"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null # Update package lists again sudo apt update

Install Docker Compose

sudo apt install docker-compose-plugin

Verify Installation

Check if the plugin is installed:

bash

Copy code
docker compose version

Use docker compose Command

Try running your Compose file again:

bash

Copy code
docker compose up
NGINX Example
  1. Install NGINX:
bash

Copy code
sudo apt install nginx

Configure NGINX for n8n: Create a file /etc/nginx/sites-available/n8n with the following content:

nginx

Copy code
server { listen 80; server_name <your-public-domain>; location / { proxy_pass http://localhost:5678; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; client_max_body_size 50M; } }

Enable the site and reload NGINX:

bash

Copy code
sudo ln -s /etc/nginx/sites-available/n8n /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx

If you get an 400 error this is the fix:

server {

  # Existing configuration...

  client_header_buffer_sTest the configuration for syntax errors:

bash

Copy code
sudo nginx -t

Reload NGINX to apply changes:

bash

Copy code
sudo systemctl reload nginx

ize 16k;

  large_client_header_buffers 4 32k;

}

  • Mark as Completed
  • More
Next class
Comments (0)
Login or Join to comment.

IMREAL.LIFE

Close