Configuration Guide
n8n-deploy uses a local SQLite database to store workflow paths, server links, and SSL settings. Configuration can come from CLI flags, the database, or environment variables.
🔧 Configuration Methods
1. CLI Flags
Highest priority configuration method.
n8n-deploy wf list-server --remote http://n8n.example.com:5678
2. Environment Variables
Second-highest priority configuration method.
# Set n8n server URL
export N8N_SERVER_URL=http://n8n.example.com:5678
# Set workflow directory
export N8N_DEPLOY_FLOW_DIR=/path/to/workflows
3. .env Files (Development Mode)
Lowest priority configuration method, only active in development mode.
# Copy .env.example to .env
cp .env.example .env
# Edit .env file
ENVIRONMENT=development
N8N_SERVER_URL=http://n8n.example.com:5678
N8N_DEPLOY_FLOW_DIR=/path/to/workflows
📋 Available Configuration Options
Server Configuration
--remote/N8N_SERVER_URL- Specifies the n8n server for remote operations
- Resolution priority:
- CLI explicit (
--remote staging) - Workflow’s linked server (
server_idin database) - Environment variable (
N8N_SERVER_URL)
- CLI explicit (
- Example:
n8n-deploy wf push my-workflow --remote production
SSL Verification
--skip-ssl-verify(per-command)- Bypasses SSL certificate verification for current operation
- Useful for servers with self-signed certificates
server sslcommand (persistent)- Stores SSL setting in database per server
n8n-deploy server ssl production --skip-verifyn8n-deploy server ssl production --verify- Resolution priority:
- CLI flag (
--skip-ssl-verify) - Server’s stored setting (
skip_ssl_verifycolumn) - Default: verify SSL certificates
- CLI flag (
Directory Configuration
--data-dir/N8N_DEPLOY_DATA_DIR- Application data directory (database, backups)
- Required: Must be set via CLI or environment
--flow-dir/N8N_DEPLOY_FLOWS_DIR- Directory containing workflow JSON files
- Resolution priority:
- CLI explicit (
--flow-dir ./foo) - Workflow’s stored
file_folderfrom database - Environment variable (
N8N_DEPLOY_FLOWS_DIR) - Current working directory (with warning)
- CLI explicit (
Environment Configuration
ENVIRONMENT- Set to
developmentto enable .env file loading - Default:
production(ignores .env files)
- Set to
Testing Configuration
N8N_DEPLOY_TESTING- Set to
1to prevent default workflow initialization during tests - Useful for test environments
- Set to
🔍 Configuration Precedence
Configuration options are evaluated in this order:
- CLI Flags (Highest Priority)
- Database-stored values (workflow
file_folder,server_id, serverskip_ssl_verify) - Environment Variables
- .env Files (Development Mode Only)
- Default Values (Lowest Priority)
🔗 Updating Stored Configuration
Use wf link to update workflow metadata without push/pull:
# Update stored flow directory
n8n-deploy wf link my-workflow --flow-dir ./new-location
# Link to different server
n8n-deploy wf link my-workflow --server production
# Combine options
n8n-deploy wf link my-workflow --flow-dir ./workflows --server staging
Use server ssl to configure per-server SSL settings:
# Skip SSL verification for server
n8n-deploy server ssl production --skip-verify
# Re-enable SSL verification
n8n-deploy server ssl production --verify
💡 Pro Tips
- Use environment variables for persistent settings
- Use CLI flags for one-time overrides
- Keep sensitive information out of version control
- Use the
envcommand to view current configuration
# Show current configuration
n8n-deploy env
# Show configuration in JSON format
n8n-deploy env --json
🆘 Troubleshooting
- If a configuration seems incorrect, use
n8n-deploy envto verify - Check file paths and permissions
- Ensure API keys are correctly configured