i want to run n8n in docker locally but it is showing this error There is a deprecation related to your environment variables. Please take the recommended actions to update your configuration:
N8N_RUNNERS_ENABLED -> Running n8n without task runners is deprecated. Task runners will be turned on by default in a future version. Please set N8N_RUNNERS_ENABLED=true to enable task runners now and avoid potential issues in the future. Learn more: https://docs.n8n.io/hosting/configuration/task-runners/
[license SDK] Skipping renewal on init because renewal is not due yet or cert is not initialized
You've hit a deprecation warning, but it's important to note that n8n is actually running and accessible at http://localhost:5678 as indicated by the line:
code
Editor is now accessible via:
http://localhost:5678
The message about N8N_RUNNERS_ENABLED is a warning, not an error that prevents n8n from starting. It's telling you that in a future version, task runners will be enabled by default, and if you don't explicitly enable them now, your setup might change behavior unexpectedly later.
The [license SDK] Skipping renewal... line is also just informational and not an error.
To remove the deprecation warning and follow n8n's recommendation, you need to set the environment variable N8N_RUNNERS_ENABLED to true when you run your Docker container.
Here's how you can do it, using either docker run or docker-compose (which is highly recommended for n8n for persistence and easier management):
Recommended Method: Using Docker Compose
This is the best way to run n8n locally as it ensures your data persists and makes configuration easier.
Create a docker-compose.yml file:
Create a file named docker-compose.yml in a new directory (e.g., n8n-local) and paste the following content:
yaml
version: '3.8'
services:
n8n:
image: n8n/n8n
restart: unless-stopped
ports:
- '5678:5678'
volumes:
- n8n_data:/home/node/.n8n # This is crucial for persisting your workflows and data
environment:
# --- Fix for the deprecation warning ---
- N8N_RUNNERS_ENABLED=true
# -------------------------------------
- N8N_HOST=${N8N_HOST:-localhost} # Optional: helps n8n generate correct URLs if you use webhooks
- N8N_PORT=5678
- N8N_PROTOCOL=http
- N8N_EMAIL_MODE=none # Or smtp, ses, etc. if you want email
# Uncomment and configure these if you want persistence with Postgres or MySQL:
# - DB_TYPE=postgresdb
# - DB_POSTGRESDB_HOST=n8n_postgres
# - DB_POSTGRESDB_PORT=5432
# - DB_POSTGRESDB_DATABASE=n8n
# - DB_POSTGRESDB_USER=n8n
# - DB_POSTGRESDB_PASSWORD=your_secure_password
volumes:
n8n_data:
# Docker manages this volume, keeping your n8n data safe
Start n8n with Docker Compose:
Open your terminal, navigate to the directory where you saved docker-compose.yml, and run:
bash
docker compose up -d
(If docker compose doesn't work, try docker-compose up -d)
The -d flag runs it in detached mode (in the background).
Access n8n:
Open your browser and go to http://localhost:5678.
Alternative Method: Using docker run (less recommended for long-term use)
If you prefer to use a single docker run command, you can add the -e flag for environment variables:
-e N8N_RUNNERS_ENABLED=true: This is the key part to resolve the warning.
-it: Runs in interactive mode, allowing you to see logs.
--rm: Removes the container when you stop it (be careful, without a volume, your data would be lost).
-p 5678:5678: Maps port 5678 on your host to port 5678 in the container.
-v n8n_data:/home/node/.n8n: Mounts a named Docker volume for persistence. If you remove --rm, your data will persist across runs. If you keep --rm and don't mount a volume, your data will not persist.
n8n/n8n:latest: The n8n Docker image. You could specify n8n/n8n:1.100.1 if you want a specific version.
After applying one of these solutions, you will no longer see the N8N_RUNNERS_ENABLED deprecation warning in your Docker logs when n8n starts.