n8n

# Installation

You can install **n8n** using `npm`, but whether this is better or worse than using **Docker** depends on your use case. Here's how to do both — and a breakdown of their pros and cons. ---

# Installing n8n Using `npm` (Globally) ### **Install steps**: 1. **Ensure Node.js ≥ 20.x is installed** (recommended for compatibility):

node -v npm -v

2. **Install `n8n` globally:**

npm install -g n8n

3. **Start n8n:**

n8n

4. Access the web UI at: - http://localhost:5678

--- # Optional Configuration (For `npm` Install) To persist workflows and credentials: * Set environment variables in a `.env` file or your shell profile:

```bash export N8N_BASIC_AUTH_USER=admin export N8N_BASIC_AUTH_PASSWORD=yourpassword export N8N_HOST=0.0.0.0 export N8N_PORT=5678 export DB_TYPE=sqlite ```

> You can also use [PM2](https://pm2.keymetrics.io/) or a systemd service to keep it running in the background.

# See