Skip to main content
The n8n CLI provides a comprehensive set of commands for managing your n8n instance. Access the CLI through the n8n command in your terminal.

Getting Help

To see available commands:
n8n --help
To check your n8n version:
n8n --version
# or
n8n -v

Main Commands

start

Starts the n8n server with Web UI and activates all workflows.
n8n start
--open
boolean
default:"false"
Automatically opens the n8n UI in your default browser after startup.
Examples:
n8n start
The start command initializes the full n8n server including:
  • Web UI (Editor)
  • Workflow execution engine
  • Active workflow triggers
  • Webhook endpoints
  • REST API

worker

Starts an n8n worker process for queue mode execution. Workers handle workflow executions from the queue.
n8n worker
--concurrency
number
default:"10"
Number of jobs that can run in parallel on this worker.
Examples:
n8n worker
Important: Concurrency less than 5 can lead to an unstable environment. Consider setting it to at least 5 for best performance.
Environment Variables:
  • N8N_CONCURRENCY_PRODUCTION_LIMIT: Overrides the --concurrency flag if set to a value other than -1
  • QUEUE_WORKER_TIMEOUT: Graceful shutdown timeout (deprecated, use N8N_GRACEFUL_SHUTDOWN_TIMEOUT)

webhook

Starts a dedicated webhook process that intercepts production webhook URLs. Useful for scaling webhook handling separately.
n8n webhook
Queue Mode Required: The webhook command only works when execution mode is set to queue. It cannot run in regular execution mode.
Use Cases:
  • Separate webhook handling from main process
  • Scale webhook endpoints independently
  • Improve reliability for high-traffic webhooks

execute

Executes a specific workflow once from the command line.
n8n execute --id=WORKFLOW_ID
--id
string
required
The ID of the workflow to execute.
--rawOutput
boolean
default:"false"
Outputs only JSON data with no additional text.
Examples:
n8n execute --id=5
The execute command does not support queue mode and will automatically fall back to regular execution mode.

execute-batch

Executes multiple workflows for testing and comparison purposes.
n8n execute-batch
--ids
string
Comma-separated workflow IDs or path to file containing IDs.
--concurrency
number
default:"1"
How many workflows can run in parallel.
--debug
boolean
default:"false"
Display all errors and debug messages.
--output
string
Path to save execution results JSON file.
--snapshot
string
Directory to save execution snapshots for later comparison.
--compare
string
Directory containing snapshots to compare against current execution.
--shallow
boolean
default:"false"
Compare only top-level attributes, ignoring nested JSON objects.
--skipList
string
Path to JSON file containing workflow IDs to skip.
--retries
number
default:"1"
Number of times to retry failed workflows (0 to disable).
--shortOutput
boolean
default:"false"
Show only summary, omitting full execution details.
Examples:
n8n execute-batch
This command is particularly useful for automated testing, regression testing, and CI/CD workflows.

Additional Commands

List Commands

Lists all workflows in the database.
n8n list:workflow

Database Commands

Resets the database (development only).
n8n db:reset

Command-Line Options

Global Options

These options work with most commands:
OptionDescription
--version, -v, -VDisplay n8n version
--helpDisplay help for command

Interactive Features

When running n8n start in a TTY terminal:
  • Press o to open the n8n editor in your browser
  • Press Ctrl+C to gracefully shut down n8n

Environment Configuration

All CLI commands respect environment variables for configuration. See the Environment Variables documentation for details. Key configuration areas:
  • Database connection
  • Execution mode (regular/queue)
  • Network and ports
  • Security settings
  • Node.js settings

Next Steps

Execution Modes

Learn about different execution modes and flags

Import/Export

Import and export workflows and credentials

User Management

Manage users via CLI

Configuration

Configure n8n settings