- Update AGENTS.md header with current commit (366af12) and date (2026-01-13) - Add beads, n8n, opencode to README.md Available Packages table - Update docs/README.md packages list - Create docs/packages/beads.md (220 lines) - Create docs/packages/n8n.md (310 lines) - Create docs/packages/opencode.md (346 lines) Documentation now reflects commitbc75505which added these three packages.
7.2 KiB
7.2 KiB
n8n
Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
Description
n8n (pronounced "n-eight-n") is a workflow automation tool that helps you connect different services and automate tasks without writing code. It features a visual node-based editor for creating workflows with hundreds of integrations.
Features
- 🎨 Visual Workflow Editor: Drag-and-drop interface for creating workflows
- 🔗 Hundreds of Integrations: Connect to popular services (Slack, GitHub, Google, etc.)
- 🔄 Webhook Support: Trigger workflows via HTTP requests
- 📝 Code Node: Execute JavaScript/TypeScript code within workflows
- 🚀 Cloud & Self-Hosted: Use n8n Cloud or self-host on your own infrastructure
- 📊 Data Transformation: Map and transform data between services
- ⏰ Scheduling: Run workflows on schedules (cron-like)
- 🔒 Security: Credential management and secure data handling
- 🎯 Fair-Code License: Source available with usage restrictions for commercial use
Installation
Via Overlay
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
n8n
];
}
Direct Reference
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
inputs.m3ta-nixpkgs.packages.${pkgs.system}.n8n
];
}
Run Directly
nix run git+https://code.m3ta.dev/m3tam3re/nixpkgs#n8n
Usage
Basic Usage
# Start n8n (default configuration)
n8n start
# Start with custom configuration file
n8n start --config /path/to/config
# Run in worker mode (for production with queue)
n8n worker
# Execute a workflow from file
n8n execute /path/to/workflow.json
Development Mode
# Start with tunnel (external access)
n8n start --tunnel
# Disable telemetry
n8n start --no-telemetry
# Specify workflow directory
n8n start --workflows /path/to/workflows
# Enable/disable features
n8n start --enable-editor
n8n start --disable-metrics
Workflow Management
# Export workflow to file
n8n export:workflow --id=123 --output=workflow.json
# Import workflow from file
n8n import:workflow --input=workflow.json
# Execute workflow
n8n execute:workflow --id=123
Configuration
Environment Variables
N8N_BASIC_AUTH_ACTIVE: Enable basic authentication (default: false)N8N_BASIC_AUTH_USER: Basic auth usernameN8N_BASIC_AUTH_PASSWORD: Basic auth passwordN8N_ENCRYPTION_KEY: Encryption key for credentialsN8N_HOST: Host URL for web UI (default: localhost)N8N_PORT: Port for web UI (default: 5678)N8N_PROTOCOL: Protocol (http or https)N8N_PATH: Path to mount n8n (default: /)N8N_EDITOR_BASE_URL: Base URL for editorN8N_WEBHOOK_URL: URL for webhook endpointsN8N_TIMEZONE: Timezone for execution (default: UTC)N8N_LOG_LEVEL: Logging level (output, warn, error, verbose)N8N_LOG_OUTPUT: Log output destination (console, file)N8N_METRICS: Enable metrics collection (default: true)DB_TYPE: Database type (sqlite3db, postgresdb, mysqldb)DB_SQLITE_VACUUM_ON_STARTUP: Vacuum SQLite on startup
Database Configuration
By default, n8n uses SQLite for simplicity. For production, use PostgreSQL or MySQL:
# PostgreSQL
export DB_TYPE=postgresdb
export DB_POSTGRESDB_HOST=localhost
export DB_POSTGRESDB_PORT=5432
export DB_POSTGRESDB_DATABASE=n8n
export DB_POSTGRESDB_USER=n8n
export DB_POSTGRESDB_PASSWORD=yourpassword
# MySQL/MariaDB
export DB_TYPE=mysqldb
export DB_MYSQLDB_HOST=localhost
export DB_MYSQLDB_PORT=3306
export DB_MYSQLDB_DATABASE=n8n
export DB_MYSQLDB_USER=n8n
export DB_MYSQLDB_PASSWORD=yourpassword
Security
Set up encryption for credentials:
# Generate encryption key
export N8N_ENCRYPTION_KEY=$(openssl rand -base64 32)
# Use in production
export N8N_ENCRYPTION_KEY="your-32-char-encryption-key"
NixOS Module
For NixOS, use the n8n module from nixpkgs for a complete service configuration:
services.n8n = {
enable = true;
settings = {
host = "0.0.0.0";
port = 5678;
timezone = "UTC";
};
environment = {
N8N_ENCRYPTION_KEY = "your-encryption-key";
DB_TYPE = "postgresdb";
DB_POSTGRESDB_HOST = "/var/run/postgresql";
DB_POSTGRESDB_DATABASE = "n8n";
};
};
Use Cases
Webhook Automation
Trigger workflows via HTTP requests:
# Start n8n with tunnel for public URL
n8n start --tunnel
# Create webhook workflow in UI
# Workflow receives data from external service
# Process and send to another service
Scheduled Tasks
Run tasks on a schedule:
// In workflow editor, use Schedule Trigger
// Set cron expression: "0 9 * * *" (daily at 9 AM)
// Connect to nodes that perform tasks
Data Sync Between Services
Keep data synchronized:
# Create workflow with:
# 1. Webhook trigger (service A)
# 2. Data transformation node
# 3. HTTP request node (service B)
# 4. Response back to service A
Automated Reporting
Generate and send reports:
// Workflow steps:
// 1. Schedule trigger (daily/weekly)
// 2. Database query node
// 3. Data formatting
// 4. Email or Slack notification
Integration Examples
Slack Integration
// Create Slack notification workflow
// 1. Trigger (webhook or schedule)
// 2. Process data
// 3. Send message to Slack channel
GitHub Integration
// GitHub repository automation
// 1. GitHub webhook trigger (push, PR, issue)
// 2. Conditional logic
// 3. Actions (create issue, comment, etc.)
Email Automation
// Email processing workflow
// 1. Email trigger (IMAP)
// 2. Parse email content
// 3. Process data
// 4. Send response or forward
Performance Optimization
Production Tips
- Use PostgreSQL or MySQL instead of SQLite
- Enable queue mode with Redis
- Use worker nodes for scaling
- Configure proper resource limits
- Set up load balancing for web UI
Queue Mode
# Start main n8n process
export QUEUE_BULL_REDIS_HOST=redis-server
export QUEUE_BULL_REDIS_PORT=6379
n8n start
# Start worker processes
n8n worker
Build Information
- Version: 2.4.1
- Language: TypeScript/JavaScript (Node.js)
- Package Manager: pnpm
- License: Sustainable Use (Fair-Code)
- Source: GitHub
Dependencies
nodejs- JavaScript runtimepnpm- Package manager (build-time)python3- Required for SQLite bindingsnode-gyp- Node.js native addon build toollibkrb5- Kerberos authenticationlibmongocrypt- MongoDB encryptionlibpq- PostgreSQL client library
Platform Support
- Linux
- macOS
Notes
- Package has ~80,000 files, so stripping and ELF patching are disabled for performance
- SQLite3 bindings are rebuilt during build phase
- TypeScript files and source maps are removed in preInstall phase
- Non-deterministic files (.turbo, .modules.yaml, types) are removed
- Node modules are pruned to production dependencies only
Related
- Adding Packages - How to add new packages
- Quick Start - Getting started guide
- n8n Documentation - Official documentation
- n8n Community - Community forum