Python Version 3 Install in Self Hosted Plan

Describe the problem/error/question

What is the error message (if any)? - Python runner unavailable: Python 3 is missing from this system

Internal mode is intended only for debugging. For production, deploy in external mode: Set up task runners | Deploy | n8n Docs

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • n8n EXECUTIONS_PROCESS setting (default: own, main):-Own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): - Self Hosted
  • Operating system: - Windows

@AI4CCTV_Team the python code node runs through a task runner that needs Python 3 on the system, and that error means it cant find it. how are you running n8n, npm or docker? if its npm on windows, install Python 3 and make sure its on PATH, then restart n8n and internal mode will pick it up. if docker, the n8n image doesnt bundle python, youd switch to the n8nio/runners image in external mode (thats the docs link in your error).

use npn , i have self hosted my n8n , in VPS Cloud

@AI4CCTV_Team on npm you just need Python 3 installed on the VPS itself and on PATH, then restart n8n and the runner picks it up. on ubuntu/debian thats apt install python3. one gotcha, if n8n runs as a systemd or pm2 service, python3 has to be on THAT services PATH, not just your login shell, so confirm with python3 --version from the same context n8n runs in.

My VPS is a Windows Server! , Can you guide me step by step .

@AI4CCTV_Team honest heads up, the python runner is a known weak spot on Windows + npm in internal mode, n8n built it for docker/linux, so just installing python often isnt enough there. the supported route is external mode: npm install -g @n8n/task-runner, then start n8n with N8N_RUNNERS_MODE=external, N8N_RUNNERS_AUTH_TOKEN=, and N8N_RUNNERS_TASK_BROKER_URI=localhost:5679, and run the runner alongside it. honestly the smoothest path on windows is running n8n in docker where the runner is built in. thread 237218 has people working through the exact windows steps if you want to follow along.

Okay thank you

Hey @AI4CCTV_Team, since you asked for step-by-step, the easiest path on Windows Server is switching to Docker. the quickest way to get there:

1. Install Docker Desktop for Windows Server

Download from docker.com and install it. Make sure it’s set to Linux containers mode.

2. Create a docker-compose.yml in a folder

services:

  n8n:

    image: docker.n8n.io/n8nio/n8n

    ports:

      - "5678:5678"

    volumes:

      - C:\n8n\data:/home/node/.n8n

    environment:

      - N8N_RUNNERS_ENABLED=true

3. Start it:

docker compose up -d

4. Open n8n at http://localhost:5678

Python will work out of the box, the Docker image includes the task runner with Python 3 pre-installed. No PATH issues, no Windows compatibility headaches.

If you want to keep your existing workflows, copy your SQLite database from your current .n8n folder into C:\n8n\data before starting Docker.

Here’s a concrete step-by-step for Windows Server + npm + external mode Python runner:

**Step 1 - Install Python 3**

- Download from Python Releases for Windows | Python.org (3.11 or 3.12 recommended)

- During install, check “Add Python to PATH”

- After install, open a new Command Prompt and verify: `python --version`

**Step 2 - Install the n8n task runner**

```

npm install -g @n8n/task-runner

```

**Step 3 - Stop your current n8n process** (Ctrl+C, or stop the Windows service/pm2 process)

**Step 4 - Set env vars and restart n8n in external mode**

In Command Prompt (run as Administrator):

```

set N8N_RUNNERS_MODE=external

set N8N_RUNNERS_AUTH_TOKEN=my-secret-token-here

set N8N_RUNNERS_TASK_BROKER_URI=localhost:5679

n8n start

```

(Replace `my-secret-token-here` with any random string - it just needs to match in both commands.)

**Step 5 - Start the task runner in a second terminal window**

```

n8n-task-runner start --n8n-uri=http://localhost:5679 --auth-token=my-secret-token-here

```

Use the exact same token in both Step 4 and Step 5.

**Step 6 - Test it**

Create a Code node set to Python and run it. The Python 3 is missing error should be gone.

**Tip for production:** To persist these env vars across reboots, set them via System Properties → Environment Variables (Windows GUI), or use a .env file with pm2 if that is how you are running n8n.