Here is "something" ChatGPT coder did for me to resolve the issue, but to be quite honest I'm not sure much about the technical part on doing it. Not too techy YET. However, actively working my ways around it. Any thoughts? Would love to see a Nate's video in regards to this type of issues (if worth it). Note: I'm currently doing this with Windows PowerShell (Admin Mode).
# Docker Setup Guidance for n8n
This repository captures quick notes for resolving the `failed to connect to the docker API at npipe:////./pipe/dockerDesktopLinuxEngine` error when trying to pull the `n8nio/n8n` image on Windows, plus a minimal checklist for running n8n on a Linux VPS (e.g., Hostinger).
## Fixing the Docker API error on Windows
The error indicates the Docker Engine is not reachable. Common fixes:
1. **Ensure Docker Desktop is installed and running**
- Install Docker Desktop for Windows (with WSL 2 backend).
- Start Docker Desktop and wait for the whale icon to show “Docker Desktop is running.”
2. **Verify WSL 2 is enabled and updated**
```powershell
wsl --list --verbose
wsl --update
wsl --set-default-version 2
```
Make sure the default distro is Version 2.
3. **Restart Docker services** (from an elevated PowerShell)
```powershell
net stop com.docker.service
net start com.docker.service
```
Then reopen PowerShell and run `docker info` to confirm the daemon is reachable.
4. **Switch to the correct engine**
- In Docker Desktop, go to **Settings → General** and ensure **Use the WSL 2 based engine** is checked.
- If you previously switched to Windows containers, switch back to Linux containers from the Docker Desktop menu.
5. **Test again**
```powershell
docker version
docker pull n8nio/n8n:latest
```
## Running n8n on a Linux VPS (e.g., Hostinger)
1. **Install Docker and Docker Compose**
```bash
sudo apt update
sudo apt install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
echo \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin sudo usermod -aG docker $USER
newgrp docker
docker version
```
2. **Create an n8n data directory** (for persistence)
```bash
mkdir -p ~/n8n_data
```
3. **Run n8n with Docker**
```bash
docker run -d \
--name n8n \
-p 5678:5678 \
-v ~/n8n_data:/home/node/.n8n \
-e N8N_BASIC_AUTH_ACTIVE=true \
-e N8N_BASIC_AUTH_USER=admin \
-e N8N_BASIC_AUTH_PASSWORD=choose-a-strong-password \
n8nio/n8n:latest
```
Replace the credentials and add any needed environment variables (e.g., webhooks, HTTPS proxy).
4. **Check logs and status**
```bash
docker logs -f n8n
docker ps
```
5. **Enable auto-start on reboot (optional)**
```bash
docker update --restart unless-stopped n8n
```
These steps should resolve the API connection issue on Windows and provide a minimal path to get n8n running on a VPS.