Running N8N Locally With Orbstack
1. Create the Project Directory
Create a new n8n folder:
mkdir -p ~/n8n
cd ~/n8n
2. Create docker-compose.yml
# version: "3.8"
# this file uses the prebuilt image from Docker Hub
services:
n8n:
image: n8nio/n8n
container_name: n8n
ports:
- "5678:5678"
volumes:
- ~/.n8n:/home/node/.n8n
# - ./n8n:/data # Map the 'n8n' subdirectory in the current host directory to '/data' in the container
- ./:/data # Map the entire project directory to /data in the container
environment:
- GENERIC_TIMEZONE=
- TZ=
- WEBHOOK_TUNNEL_URL=http://localhost:5678
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=
- N8N_BASIC_AUTH_PASSWORD=
- N8N_SECURE_COOKIE=false # Disable secure cookies (not recommended, but fine for local development)
# Disabling secure cookies may pose a risk when deployed publicly; for local testing only.
3. Start the Service
For the first run, pull the image first,then start the service. Run in the project root directory, can open it directly in VS Code.
docker compose pull
docker compose up
4. Access n8n in the Browser
Open browser and visit: http://localhost:5678
5. Manage the Container with OrbStack GUI
OrbStack → Containers:
n8n
- Status: Running
- ▶ Start / ⏹ Stop / View Logs
Example Project Directory Structure
~/n8n/
├── docker-compose.yml
└──