1. Basic n8n Installation and Setup
n8n is a powerful open-source workflow automation tool that connects workflows, tasks, and data across various apps and services. To get started, installing n8n via Docker is the most recommended method.
1.1. Installing n8n with Docker
First, ensure Docker is installed on your system. Use the following command to run the n8n container:
docker run -it --rm \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
--name n8n \
n8nio/n8n
Explanation:
- `-it`: Interactive and pseudo-TTY allocation
- `--rm`: Automatically remove the container when it exits
- `-p 5678:5678`: Map host port 5678 to container port 5678
- `-v ~/.n8n:/home/node/.n8n`: Mount n8n data to a persistent volume on the host (prevents data loss)
- `--name n8n`: Assign the name \'n8n\' to the container
- `n8nio/n8n`: The Docker image to use
1.2. Accessing the n8n Web UI
Once the container is started, open your web browser and navigate to the following address to access the n8n interface:
http://localhost:5678
Tip: You will be prompted to create an administrator user account during the initial setup.