How to Install n8n on Debian 12
n8n is a powerful open-source workflow automation tool. This article guides you through installing n8n on a Debian 12 server, including core prerequisites and troubleshooting advice.
Prerequisites
- Debian 12 server (root or sudo access)
- Basic familiarity with the Linux command line
- Internet connection
Install Node.js
n8n requires Node.js (version 18 or higher is recommended). To install Node.js on Debian 12:
- Update your system:
sudo apt update && sudo apt upgrade -y - Install Node.js from the official repositories:
sudo apt install -y nodejs npmFor the latest Node.js versions, consider usingnvm(Node Version Manager). - Verify installation:
node -v npm -v
Install n8n
- Install n8n globally using npm:
sudo npm install n8n -g - Check the installation:
n8n --version
Running n8n
- Start n8n in the background:
n8n start - By default, n8n runs on
http://localhost:5678.For production, consider running n8n with a process manager likepm2and securing access with HTTPS and authentication.
Troubleshooting & Tips
- Permission errors? Try installing n8n with
sudoor review your npm permissions. - Port 5678 already in use? Change the port with
export N8N_PORT=XXXXbefore starting n8n. - Check logs for errors:
n8n start --tunnelcan help with debugging.
Next Steps
- Secure your n8n instance with authentication and HTTPS.
- Explore more n8n guides in our Knowledge Base.
- Consider networking best practices for automation tools.