Fastest and Easiest Installation of N8n
Getting n8n up and running for your workflow automation needs can be surprisingly quick and straightforward, especially when leveraging the power of Windows Subsystem for Linux (WSL) and Docker. This guide will walk you through the process, ensuring you’re automating in no time!
Step 1: Install Ubuntu WSL
The first step to a seamless n8n installation is setting up Ubuntu within Windows Subsystem for Linux. This allows you to run a full Linux environment directly on your Windows machine, providing a robust platform for Docker.
Instructions:
- Enable WSL: Open PowerShell as an administrator and run the following command:
PowerShell
wsl --install
This command will enable the necessary optional components, download the latest Linux kernel, set WSL 2 as the default, and install a Ubuntu distribution by default.
- Restart your computer when prompted.
- Complete Ubuntu Setup: After restarting, a console window will automatically open for Ubuntu. You’ll be asked to create a username and password for your new Linux distribution. Make sure to remember these credentials!
Step 2: Install Docker
Docker is a crucial component here, as it allows n8n to run in an isolated and portable environment. This simplifies installation, updates, and ensures consistency.
Instructions:
- Download Docker Desktop: Go to the official Docker website and download Docker Desktop for Windows: https://www.docker.com/products/docker-desktop
- Run the Installer: Double-click the downloaded installer and follow the on-screen prompts.
- Ensure that “Use WSL 2 instead of Hyper-V (recommended)” is checked during the installation process.
- Start Docker Desktop: Once installed, launch Docker Desktop from your Start Menu.
- Confirm WSL 2 Integration: Docker Desktop should automatically detect your WSL 2 installation. You might see a prompt about enabling WSL 2 integration in the Docker Desktop settings (Settings > Resources > WSL Integration). Ensure your Ubuntu distribution is enabled there.
Step 3: Install n8n using Docker Pull
With WSL and Docker in place, installing n8n is now a single command away! We’ll use docker pull
to download the n8n Docker image and then run it.
Instructions:
- Open your Ubuntu WSL Terminal: From your Windows Start Menu, search for “Ubuntu” and open the terminal application.
- Create a folder 📂 name it n8n using command mkdir <folder name > in this case would be mkdir n8n
- Now proceed to the n8n directory using cd n8n
- create following files
- link to git pull available if you like to grab it from there n8n/ at master · tauseefau/n8n or i have added the content below
- Pull the n8n Docker Image and install : In the Ubuntu terminal, execute the following command to download the latest n8n Docker image:
Bash
docker-compose up -d
This may take a few moments depending on your internet connection.
- Run n8n: Once the image is pulled, you can start n8n with the following command. This command maps port
5678
from the Docker container to port5678
on your local machine, allowing you to access n8n via your web browser. - Access n8n: After running the command, you should see n8n starting up in your terminal. Open your web browser and navigate to:
http://localhost:5678
Congratulations! You should now see the n8n welcome screen, ready for you to start building your workflows.
#docker-compose.yml
#.env file