Bachelor Tech
  • Home
  • Tutorials
  • Tips
  • Portfolio
  • About Jan
  • Contact Jan

1. Deploy n8n in Docker

by Jan Bachelor February 7, 2026

You can use the same VM as for Prometheus, Loki and Grafana to deploy n8n in Docker:

# Create directory and a docker-compose file
sudo mkdir -p /opt/n8n
cd /opt/n8n
sudo nano docker-compose.yml
services:
  n8n:
    image: docker.n8n.io/n8nio/n8n:latest
    container_name: n8n
    restart: unless-stopped
    ports:
      - "5678:5678"
    environment:
      - GENERIC_TIMEZONE=Europe/Prague
      - TZ=Europe/Prague # Change it according to yours
      - N8N_HOST=n8n.yourdomain.priv
      - N8N_PORT=5678
      - N8N_PROTOCOL=http
      - WEBHOOK_URL=http://n8n.yourdomain.priv:5678/
      - N8N_SECURE_COOKIE=false
      - NODE_ENV=production
      # Allow selected built-in Node modules (fs, path)
      - NODE_FUNCTION_ALLOW_BUILTIN=fs,path
      # Database - using SQLite for simplicity, can upgrade to PostgreSQL later
      - DB_TYPE=sqlite
    volumes:
      - n8n_data:/home/node/.n8n
      - ./local-files:/files
    networks:
      - n8n-network
    healthcheck:
      test: ["CMD-SHELL", "wget -q --spider <http://localhost:5678/healthz> || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 30s

volumes:
  n8n_data:
    name: n8n_data

networks:
  n8n-network:
    name: n8n-network
# Create local-files directory with correct permissions
sudo mkdir -p local-files
sudo chown -R 1000:1000 local-files

# Deploy
docker compose pull
docker compose up -d

# Check status
docker compose logs -f
  • Try accessing it on the website:
Screenshot of n8n being successfully started.
First login into n8n
  • Complete your registration to receive a free license key (indicate that you are not using n8n for work purposes).

Connect n8n with Claude

  • Head to https://platform.claude.com/dashboard , log in and if you do not have it already, purchase a credit for $5. Don’t worry, it will last us for quite a while 😇
Create an API key on platform.claude.com
  • Copy over the key and head to n8n. Add a new credential (in case you cannot find this section, then create a blank workflow and add a step for Anthropic and create the credential then):
Screenshot from n8n showing where to add credentials.
Add a new credential in n8n
Add the recently created API key into n8n

Connect n8n with Discord

  • In n8n, add another credential for a Discord webhook:
Screenshot from n8n where the Discord Webhook API can be added.
Prepare for a new Discord webhook credential in n8n
  • On Discord, modify your existing server / channel settings and add a new webhook (or create a new server if you do not have one already):
Screenshot from Discord showing the creation of a new webhook.
Create the credential in Discord and copy paste it into n8n

Copy the webhook URL and paste it into the window in n8n that expects the URL with the webhook data.

With that being done, we can import our first infrastructure AI-advisory workflow!

2. Create An Infrastructure Monitor Workflow
Go back to course overview: Part 2 – Automate Infrastructure Monitoring from Prometheus & Loki with AI-powered n8n workflows with AWX or Semaphore UI (Ansible)

Leave a Comment Cancel Reply

Save my name, email, and website in this browser for the next time I comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 FacebookWhatsappEmail

Course Steps

  1. 1. Deploy n8n in Docker
  2. 2. Create An Infrastructure Monitor Workflow
  3. 3. Plan For An AI-Driven Workflow To Remedy Common Issues
  4. 4. Create AWX/Semaphore Remediation Jobs
  5. 5. Discord Bot Set Up
  6. 6. The AI-Assisted Remediation Workflow Into n8n
  7. 7. Real Test Scenarios
  8. 8. Security & Functionality Considerations

Other courses

Turn your Raspberry Pi into a Proxmox Backup...

July 13, 2025

Create an automated Gravity workflow that will allow...

January 19, 2024

Dynamically Populate Gravity Forms from Google Sheets (GSheets...

March 16, 2021

Concur Alternative: Import Employees’ Credit Card Expenses to...

January 19, 2024

OPNSense in HA with CARP with dual WANs

June 30, 2025

Buy Me a Coffee

Buy Me a Coffee Buy Me a Coffee

Recent Posts

  • How to get LXC containers for Proxmox outside of ready-made templates

  • How to join two Proxmox nodes into a cluster (PVE 8.x)

  • How to Rename a Proxmox Node

All Rights Reserved. The theme was customized from Soledad, see PenciDesign

Bachelor Tech
  • Home
  • Tutorials
  • Tips
  • Portfolio
  • About Jan
  • Contact Jan