Installing n8n for
local workflow automation

A practical reference for installing and accessing a self-hosted n8n instance, preserving its configuration, and validating an HTTP webhook before moving a workflow into production.

By Ashraf GamalUpdated 12 October 2026n8n · Self-hostingApprox. 6 min read

Personal note: This article reflects my experience and is for educational purposes only—not official vendor guidance. Always verify procedures against current vendor documentation.

1. Objective and scope

n8n is a workflow automation platform that connects services and APIs through visual workflows. This guide focuses only on installing and preparing n8n for local testing. It does not cover SIEM deployment or AI-model setup.

The install method and n8n version of an existing host should be recorded before changing it. The generic examples below are intended for a local test workflow and should be adapted to the network layout of the host.

2. Choose an installation method

For a new self-hosted instance, follow n8n's current Docker-based installation path. The current documentation states that npm-based installs are deprecated from n8n 3.0 and that n8n is distributed only through Docker for fresh installs. Existing npm installations may continue working for now, but new installations and future upgrades should use the documented Docker-based path.

References: official one-line setup, Docker Compose setup, and the npm installation note.

3. Recommended fresh installation

Install Docker Engine and the Docker Compose v2 plugin for your operating system first. The one-line setup script checks that Docker is installed and running and uses Docker Compose to create the instance files and start n8n.

# Confirm Docker and Compose are available
docker --version
docker compose version
docker info

# Run the official n8n setup script from the directory
# where you want the new n8n folder to be created
curl -fsSL https://get.n8n.io | sh

The official script creates an n8n directory in the current working directory, writes the configuration files, downloads the n8n container, and starts the service. Because this command downloads and executes a remote script, use only the official n8n endpoint and review it first if required by your security policy.

After the setup completes, inspect the generated Compose project:

cd n8n
docker compose ps
docker compose logs -f n8n

Open http://localhost:5678 from a browser on the same host. For a remote host, use the host's reachable address only when the service is intentionally exposed to that network and firewall rules permit it. For custom configuration, follow the official Docker Compose guide rather than treating an unversioned quick-start command as a production deployment plan.

4. Access and persistence

  1. Complete the initial setup in the browser and create the instance owner account if prompted.
  2. Record the installed n8n version from the UI or terminal, as well as whether the host uses Docker or npm.
  3. For Docker, confirm a persistent volume is mounted to /home/node/.n8n; do not delete it when recreating the container.
  4. Restrict access to port 5678 to trusted networks and administrators. A LAN address is not a substitute for authentication or transport security.

5. Validate a test webhook with curl

This example uses a local test endpoint; replace the host if the request originates from another machine:

http://localhost:5678/webhook-test/n8n-test

In the n8n editor, create a Webhook node with method POST and path n8n-test. Start listening for a test event (the button label may differ by version), then send a small JSON request from a machine that can reach the n8n host:

curl -i -X POST \
  'http://localhost:5678/webhook-test/n8n-test' \
  -H 'Content-Type: application/json' \
  -d '{"message":"n8n webhook connectivity test","source":"curl"}'

Check the HTTP response and the Webhook node's execution data in the editor. A successful request should reach the waiting test execution; an HTTP response by itself does not prove later nodes or downstream integrations succeeded.

Test URL versus production URL

The /webhook-test/ URL is for editor test executions and requires the test listener to be waiting. For an activated workflow, n8n uses the production webhook URL, normally under /webhook/. Do not move a workflow to production until the request body, error handling, authentication needs, and expected response have been tested.

6. Known issues and troubleshooting

Connection refused or timeout

Webhook returns “not registered” or does not trigger

Workflow state disappears after container recreation

No n8n installation error or confirmed repair was recorded in this conversation; the items above are diagnostic checks rather than claims about a failure observed in this setup.

7. Security checklist before production

8. Official references

Installation interfaces and deployment recommendations can change between n8n releases. Consult the official documentation for the exact version in use, and treat the commands here as reference examples rather than a complete production deployment standard.

Discuss workflow automation

Planning a self-hosted n8n workflow or need help preparing it for reliable operation?

Reach out to discuss local automation, API integration, workflow validation, and production-readiness considerations.