KnowledgebaseSelf-Hosting › n8n on a LYLIX VPS — self-hosted workflow automation (Zapier alternative)

n8n on a LYLIX VPS — self-hosted workflow automation (Zapier alternative)

n8n is the open-source Zapier — a visual workflow builder for chaining together APIs, webhooks, databases, and 400+ pre-built integrations. Self-host on a 2 GB VPS and you eliminate per-workflow charges, get unlimited executions, and keep credentials inside your control.

Install (Docker Compose)

# /opt/n8n/docker-compose.yml
services:
  postgres:
    image: postgres:16
    restart: unless-stopped
    environment:
      POSTGRES_USER: n8n
      POSTGRES_PASSWORD: STRONG_PW
      POSTGRES_DB: n8n
    volumes:
      - /opt/n8n/pg:/var/lib/postgresql/data

  n8n:
    image: n8nio/n8n:latest
    restart: unless-stopped
    depends_on:
      - postgres
    ports:
      - "127.0.0.1:5678:5678"
    environment:
      N8N_HOST: n8n.example.com
      N8N_PROTOCOL: https
      N8N_PORT: 5678
      WEBHOOK_URL: https://n8n.example.com/
      DB_TYPE: postgresdb
      DB_POSTGRESDB_HOST: postgres
      DB_POSTGRESDB_DATABASE: n8n
      DB_POSTGRESDB_USER: n8n
      DB_POSTGRESDB_PASSWORD: STRONG_PW
      GENERIC_TIMEZONE: America/New_York
      N8N_ENCRYPTION_KEY: <long-random-string>        # used to encrypt stored credentials
    volumes:
      - /opt/n8n/data:/home/node/.n8n
cd /opt/n8n
docker compose up -d

Reverse proxy as usual. First-visit prompts to create an owner account (which is also the admin).

How you actually use it

Workflows are built in the visual editor. Add a trigger node (webhook, schedule, app event), chain transformation nodes (HTTP, function, database query), end with action nodes (send email, post to Slack, write to Google Sheets). Each workflow can be tested step-by-step in the UI before activating.

Examples that fit n8n's strengths:

  • "When a form is submitted on my website, create a record in Airtable + send me a Telegram message."
  • "Every day at 9 AM, fetch new RSS items, summarize via OpenAI API, post to my Discord channel."
  • "When a customer signs up in Stripe, add them to ConvertKit and send a welcome email."
  • "Watch a directory for new files, OCR them, upload to a CRM."

Webhooks need the WEBHOOK_URL right

The WEBHOOK_URL env var tells n8n what URL to give external services for webhook triggers. Must be your public-facing reverse-proxy URL, not the internal Docker port. Get this wrong and webhooks don't work even though everything else does.

Credentials handling

n8n stores connection credentials (API keys, OAuth tokens, DB passwords) encrypted with N8N_ENCRYPTION_KEY. Back up that key separately from the database — losing it means every stored credential becomes unrecoverable. Same playbook as backup encryption keys (see the related article in backups-recovery).

Resource use

Idle: ~200 MB RAM, negligible CPU. Active workflows: depends — most workflows execute in milliseconds, but ones that pull large datasets, run LLM calls, or use the "Code" node with heavy logic can spike CPU.

Concurrent execution defaults are conservative (5-10 simultaneous workflows). Bump EXECUTIONS_PROCESS_TIMEOUT and worker count for larger fleets.

Backups

Two things: the PostgreSQL DB (workflow definitions, execution history) and the /home/node/.n8n data directory (binary blobs, custom nodes). Plus the N8N_ENCRYPTION_KEY as documented above.

Upgrade

cd /opt/n8n
docker compose pull
docker compose up -d

n8n is actively developed — releases come weekly. Review release notes between major versions; minor versions are mostly drop-in.

Also Read

« « Back

Powered by WHMCompleteSolution