-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
Logan McDuffie edited this page Dec 19, 2025
·
2 revisions
Before using the CLI, configure your n8n instance credentials.
n8n-cli configureThis prompts for:
-
n8n API URL - Your n8n instance URL (e.g.,
http://localhost:5678) - API Key - Your n8n API key
Configuration is saved to ~/.config/n8n-cli/.env with secure permissions.
n8n-cli configure --url http://localhost:5678 --api-key your-api-keyEnvironment variables take precedence over saved configuration:
export N8N_API_URL=http://localhost:5678
export N8N_API_KEY=your-api-key
n8n-cli workflows| Platform | Location |
|---|---|
| Linux/macOS | ~/.config/n8n-cli/.env |
| Windows | %USERPROFILE%\.config\n8n-cli\.env |
- Open your n8n instance
- Go to Settings > API
- Click Create API Key
- Copy the generated key
- Run
n8n-cli configureand paste the key when prompted
After configuring, verify your setup:
n8n-cli workflowsIf successful, you'll see a list of workflows (or an empty array if none exist).