How to Self-Host n8n: Complete Guide to Installation, Security, Webhooks, and Remote Access
n8n is the most powerful open-source workflow automation platform available. Unlike Zapier or Make, self-hosting n8n means no per-task fees, no execution limits, and your credentials never leave your own hardware.
In this article 10 sections
Run workflow automation on infrastructure you control, with a deliberate security and recovery plan
Self-hosting n8n gives you control over its application, database, credentials, updates, and backups. It also makes you responsible for securing public webhooks and recovering safely from failures. This guide explains a single-host Docker Compose deployment with PostgreSQL, local verification, external task runners, and public HTTPS access through Localtonet. It includes a coordinated backup procedure and an isolated restore exercise, with explicit verification gates wherever release-specific behavior needs checking.
📋 What's in this guide
Understand the deployment and its trust boundaries
n8n combines a visual workflow editor, credentials, triggers, integrations, and execution history. Self-hosting moves operation of the application and its storage onto infrastructure you administer. It does not guarantee that workflow data stays there: individual nodes can send records, files, prompts, and credentials to external services.
This tutorial covers one n8n instance, PostgreSQL, persistent application storage, and a separate task-runner container. It is not a high-availability or queue-mode deployment. Adding workers, Redis, shared binary storage, or multiple webhook processors requires a different operational design.
SQLite is also a valid choice for smaller single-instance installations. PostgreSQL is used here for its conventional logical backup tools and clear separation from application storage, not because every production installation must use it.
Publishing port 5678 can expose the complete application, including editor routes. Complete owner registration locally first. If the editor must remain private, put a separately configured, tested route-filtering gateway in front of n8n rather than treating an obscure webhook path as protection.
Self-hosting also includes licensing responsibility. Review n8n’s Sustainable Use License guidance for your intended use, especially if customers will access n8n itself or you intend to sell hosted functionality. Internal automation and reselling an automation service are not necessarily equivalent licensing scenarios.
Choose versions and prepare the host
The release snapshot available for this revision labels n8n 2.45.5, dated October 28, 2026, as stable. It also lists newer 2.x entries and 3.x releases. Consequently, the earlier 2.36.8 pin is obsolete as a claim about the current stable release. This example selects 2.45.5 as an explicit 2.x validation target, not as a perpetual recommendation or an assertion that every later release is suitable.
No execution test record or current support-policy confirmation was supplied for this revision. We therefore cannot honestly label this Compose configuration “tested on 2.45.5.” Before production use, confirm support status, image availability, configuration compatibility, and migration requirements against the official release notes, then complete the tests below. Record the tested image versions and digests. Do not substitute a 3.x image without reviewing its migration guidance.
Use a supported 64-bit host with sufficient memory, CPU, and durable storage for your workflows, execution retention, and payload sizes. There is no useful universal hardware minimum for all n8n workloads. A Raspberry Pi requires compatible 64-bit images and workload testing, not assumptions based on old service files.
- Install Docker Engine and the Compose plugin using Docker’s operating-system-specific installation instructions and Compose installation guidance.
- Use an administrative account with permission to run Docker. Docker access is highly privileged.
- Have OpenSSL, curl, and a private configuration directory available. The shell examples below target a Linux host.
- Prepare a password manager or secrets vault, encrypted off-device backup storage, and a separate restore-test host or VM.
- For public access, install our current client on a device that can reach n8n and use an authorized Localtonet account.
docker version
docker compose version
openssl version
curl --version
Docker installation differs by distribution, package repository, and host policy, so this guide does not invent a universal privileged installer. Likewise, npm installation requires the exact Node.js range supported by your selected n8n release. Containers avoid managing that host runtime, but they do not eliminate compatibility checks.
Consult the n8n Docker installation guidance, environment-variable reference, and task-runner deployment documentation when validating the selected pin. These are especially important when moving between major releases.
Install with Docker Compose and PostgreSQL
The following is a concrete configuration to validate, not a claim of completed release testing. It publishes only n8n’s application port, bound to host loopback. PostgreSQL and the task broker remain unpublished. The explicit project name makes volume names predictable for the backup procedure.
Create a private project directory
mkdir -p ~/n8n-self-hosted
chmod 700 ~/n8n-self-hosted
cd ~/n8n-self-hosted
umask 077
Keep this directory out of public repositories, shared folders, and web roots.
Generate three independent secrets
openssl rand -hex 32
openssl rand -hex 32
openssl rand -hex 32
Use separate outputs for the database password, encryption key, and runner authentication token. Store them securely. Hexadecimal values avoid accidental Compose interpolation characters.
Create the protected environment file
Create .env with these settings, replacing every secret placeholder before starting:
COMPOSE_PROJECT_NAME=n8nprod
N8N_VERSION=2.45.5
POSTGRES_IMAGE=postgres:16
POSTGRES_USER=n8n
POSTGRES_DB=n8n
POSTGRES_PASSWORD=REPLACE_WITH_DATABASE_SECRET
N8N_ENCRYPTION_KEY=REPLACE_WITH_ENCRYPTION_KEY
N8N_RUNNERS_AUTH_TOKEN=REPLACE_WITH_RUNNER_SECRET
GENERIC_TIMEZONE=UTC
TZ=UTC
chmod 600 .env
PostgreSQL 16 is the major-version channel used here. Record its resolved image digest as well. A major-version tag can receive new builds and is not a reproducibility guarantee.
Create compose.yaml
services:
postgres:
image: ${POSTGRES_IMAGE}
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
n8n:
image: docker.n8n.io/n8nio/n8n:${N8N_VERSION}
restart: unless-stopped
ports:
- "127.0.0.1:5678:5678"
environment:
DB_TYPE: postgresdb
DB_POSTGRESDB_HOST: postgres
DB_POSTGRESDB_PORT: 5432
DB_POSTGRESDB_DATABASE: ${POSTGRES_DB}
DB_POSTGRESDB_USER: ${POSTGRES_USER}
DB_POSTGRESDB_PASSWORD: ${POSTGRES_PASSWORD}
N8N_ENCRYPTION_KEY: ${N8N_ENCRYPTION_KEY}
GENERIC_TIMEZONE: ${GENERIC_TIMEZONE}
TZ: ${TZ}
N8N_RUNNERS_ENABLED: "true"
N8N_RUNNERS_MODE: external
N8N_RUNNERS_BROKER_LISTEN_ADDRESS: "0.0.0.0"
N8N_RUNNERS_AUTH_TOKEN: ${N8N_RUNNERS_AUTH_TOKEN}
volumes:
- n8n_data:/home/node/.n8n
depends_on:
postgres:
condition: service_healthy
task-runners:
image: n8nio/runners:${N8N_VERSION}
restart: unless-stopped
environment:
N8N_RUNNERS_TASK_BROKER_URI: http://n8n:5679
N8N_RUNNERS_AUTH_TOKEN: ${N8N_RUNNERS_AUTH_TOKEN}
depends_on:
- n8n
volumes:
postgres_data:
n8n_data:
The broker listens on the container network so the separate runner can connect. Port 5679 is not published to the host. Matching version tags are intentional, but you must confirm that the runner image exists and is compatible with your selected application release.
Validate, pull, and start locally
docker compose config --quiet
docker compose pull
docker compose up -d
docker compose ps
docker compose logs --tail=100 n8n task-runners
docker compose exec n8n n8n --version
Stop if images cannot be pulled, migrations fail, or runner compatibility is unresolved. A successful YAML parse proves syntax, not runtime compatibility. Record image IDs or repository digests after validation.
Create the owner and verify operation
curl -I http://127.0.0.1:5678/
docker compose logs --tail=100 postgres
Open http://127.0.0.1:5678 on the host, complete owner registration, and verify logout and login. Create a harmless manual workflow and a JavaScript Code node returning synthetic data. Confirm execution and runner connectivity before exposing anything publicly.
For example, a JavaScript Code node in its all-items mode can return return [{ json: { runnerCheck: true } }];. This tests a real runner task rather than merely checking whether its container is running. Python execution, additional packages, and native dependencies need separate validation; do not assume identical capabilities across runtimes.
If a browser reports a secure-cookie problem on plain local HTTP, use the documented localhost behavior for the installed release or establish trusted local HTTPS. Do not permanently disable secure cookies to make public access work. On a remote server, use an authorized administrative connection rather than changing the binding to every interface just to complete setup.
Do not replace N8N_ENCRYPTION_KEY after storing credentials. Database recovery without its matching key may leave credential records unreadable. Changing a PostgreSQL initialization password in .env also does not reset a password already stored in an existing database volume.
Secure the service before accepting public traffic
Workflow editors hold significant power. They can use credentials, call APIs, transform sensitive data, and execute code. Limit editor accounts, remove departed users, review community nodes, and avoid sharing the owner account.
- Use dedicated, least-privilege provider credentials for each workflow.
- Separate development and production provider accounts where practical.
- Keep secrets out of node names, notes, URLs, expressions, screenshots, and execution logs.
- Configure execution retention and pruning deliberately against the installed version’s documentation.
- Patch the host and images, protect administrative access, and never mount the Docker socket into n8n.
- Review payload sizes, concurrency, disk consumption, and error rates before increasing workload.
docker compose ps
ss -lnt
Confirm that host port 5678 is bound to 127.0.0.1, not 0.0.0.0. PostgreSQL and the runner broker should have no host-published ports. Loopback binding limits direct network exposure; it does not replace authentication or protect against a compromised host.
Our available tunnel access controls depend on the current configuration and plan. A provider cannot normally complete an interactive SSO login, and an edge Basic Authentication challenge may conflict with the provider’s delivery mechanism. Test any edge policy against both editor access and webhook requests. For a webhook-only public boundary, configure and validate an allowlisted route gateway instead of assuming the tunnel filters application paths.
A public HTTPS endpoint does not prove who sent the event. Validate signatures or another appropriate authentication mechanism before business processing. Reject malformed and unauthorized requests before sending messages, writing records, deploying code, or changing payment state.
Test webhook delivery and authentication
A webhook receives an HTTP request instead of polling for events. In n8n, the test URL is associated with an editing-time listener; the production URL is associated with the workflow version registered for production. Saving an edit is not sufficient evidence that production is running the edited version.
| Endpoint | Typical path | Operational meaning |
|---|---|---|
| Test webhook | /webhook-test/... | Available while the test listener is registered; use synthetic data. |
| Production webhook | /webhook/... | Requires the production workflow to be published or activated as appropriate to the version. |
| Editor | Application routes on the same host | Used for authenticated administration, not provider event delivery. |
A reproducible authentication smoke test
This test uses the generic Webhook node’s Header Auth option, documented in the n8n Webhook node guide. It verifies basic request rejection and delivery, not GitHub or Stripe signature validation.
- Create a workflow with a Webhook node using POST and the path
lt-smoke. - Select Header Auth and create a credential with header name
X-Webhook-Test-Keyand a fresh random secret. - Use an immediate response and no external side-effect nodes. Start the test listener.
- Copy the displayed test URL. Send a request without the header and confirm it is rejected without an authorized workflow execution.
- Restart the listener if necessary, then send a request with the correct header and inspect the synthetic payload.
TEST_URL='http://127.0.0.1:5678/webhook-test/lt-smoke'
curl -i -X POST "$TEST_URL" \
-H 'Content-Type: application/json' \
--data '{"eventId":"smoke-001","synthetic":true}'
read -r -s -p 'Webhook test secret: ' TEST_SECRET
printf '\n'
curl -i -X POST "$TEST_URL" \
-H 'Content-Type: application/json' \
-H "X-Webhook-Test-Key: $TEST_SECRET" \
--data '{"eventId":"smoke-001","synthetic":true}'
unset TEST_SECRET
These commands are for a trusted administrative host: a secret passed as a command argument may be visible to privileged process inspection. Do not use verbose traces with production secrets. Repeat the same test through the public test URL after configuring Localtonet. Then publish or activate the harmless workflow, copy its production URL, and test that separately.
Header authentication is useful for a controlled sender, but it does not provide body integrity, timestamp checks, or replay protection by itself. A random path is also not authentication.
Provider signatures and replay protection
Provider-specific signature implementation is outside this tutorial’s executable workflow scope. Before connecting business actions, implement and test the provider’s exact verification contract, either in a verified provider trigger or a dedicated validating gateway. Do not assume that every dedicated trigger validates every required security property.
- GitHub: follow GitHub’s webhook signature-validation instructions. Validate
X-Hub-Signature-256using the webhook secret and the unmodified request body, with a timing-safe comparison. Treat delivery identifiers and replay handling separately. - Stripe: follow Stripe’s signature-verification documentation. Use the endpoint signing secret, preserve the required raw body, and apply the SDK’s timestamp checks. An API key is not a webhook signing secret.
- Custom forms: validate schema, types, field lengths, content type, and allowed values. Keep service secrets out of browser code and add appropriate abuse controls.
Acceptance tests should include a valid delivery, a modified body, a missing signature, a wrong secret, and a duplicate event. For schemes with signed timestamps, include stale events. Each invalid case must fail before side effects. Use a durable provider event identifier and an atomic uniqueness check for idempotency; two concurrent deliveries can defeat an informal “check then write” design.
Payment events can arrive late or out of order. Query authoritative provider state where needed. For longer processing, acknowledge only after the event has been durably accepted by your design, not simply because an HTTP request arrived.
Publish through a Localtonet HTTP tunnel
With Localtonet, the client establishes an outbound connection to our relay. A running HTTP tunnel provides a public HTTPS URL without inbound router port forwarding, firewall changes, VPN setup, or a public IP address. Use the Localtonet HTTP tunnel documentation for the current product workflow and available options.
For this guide, run the client directly on the n8n host so 127.0.0.1:5678 is reachable from it. A client in a different container has its own loopback interface; the same address would not identify the host service. Do not solve that mismatch by casually publishing n8n on all interfaces.
Install and run the client
Use the current installation path for your operating system and keep the client running on the device that can reach n8n.
Select the device
Authenticate or select that device using its device-specific AuthToken. Keep the token out of workflow data, screenshots, and shared configuration.
Select an available relay
Choose a server or region currently offered in the dashboard. Do not copy a hardcoded server code from another deployment.
Create the HTTP configuration
Choose the available Process Type: Random Sub Domain, Custom Sub Domain, or Custom Domain. Set the local target to 127.0.0.1 and port 5678. Consult current DNS instructions before using a custom domain.
Start and verify the tunnel
Creating a configuration does not start it. Press Start and use the assigned public HTTPS URL. Confirm that the application requires login, then test only the harmless webhook workflow.
Stop or delete when finished
Stop the tunnel when public access is unnecessary. Delete the configuration when it is no longer needed. Recheck hostname behavior before relying on a restarted endpoint.
The pricing information on our homepage available for this revision lists a 30-minute free-plan tunnel timeout. Check current pricing and your dashboard before production use. Availability requires the client/device connection and running tunnel, regardless of whether the application itself remains healthy.
Set public URLs without guessing proxy trust
Add these entries to the existing n8n environment mapping, replacing the example with the assigned URL. Preserve the database, runner, encryption-key, and timezone settings:
WEBHOOK_URL: https://your-assigned-public-hostname/
N8N_EDITOR_BASE_URL: https://your-assigned-public-hostname/
WEBHOOK_URL defines the public webhook base, not an individual webhook path. N8N_EDITOR_BASE_URL identifies the editor’s public base URL; it does not create access controls. If the editor uses a separate private address, configure that actual address instead.
n8n’s reverse-proxy webhook configuration guidance also covers N8N_PROXY_HOPS and forwarding X-Forwarded-For, X-Forwarded-Host, and X-Forwarded-Proto. However, the supplied Localtonet information does not establish the exact trusted HTTP-hop count or header behavior for every topology. We therefore do not prescribe N8N_PROXY_HOPS=1 as a verified Localtonet setting.
Before production, inspect sanitized headers reaching a diagnostic endpoint on your own host and confirm the public host and HTTPS scheme. Test whether client-supplied forwarding headers are overwritten or safely handled. Map every proxy, including any local gateway, and obtain confirmation where necessary before setting the trusted-hop count. A tunnel diagram alone cannot establish that trust boundary.
docker compose config --quiet
docker compose up -d n8n
docker compose logs --tail=100 n8n
Changing environment values requires container recreation; a simple process restart does not apply a new Compose environment.
Local and public verification checklist
- Local n8n remains reachable and owner login works.
- The public URL shows login, never unfinished owner registration.
- Generated webhook URLs use the intended public hostname.
- Authorized synthetic test and production requests create the expected executions.
- Missing or incorrect authentication is rejected before business actions.
- Provider signature rejection and duplicate handling pass their separate tests.
- Editor sessions and forwarded-header behavior work under the verified proxy configuration.
- Stopping the tunnel makes public access unavailable while local n8n remains reachable.
- Restarting the tunnel preserves or updates the endpoint as expected; changed URLs are updated in n8n and provider registrations.
Create one recovery point and restore in isolation
Workflow exports are useful for selective recovery, but a full recovery set includes the PostgreSQL dump, application data, exact configuration and image versions, matching encryption key, and provider-side operational records. Any additional binary storage or external files used by workflows need their own coordinated backup coverage.
| Item | Purpose | Protection |
|---|---|---|
| Database dump | Workflows, users, credentials, execution state | Encrypt and retain off-device |
| Application volume | Persistent instance files outside PostgreSQL | Archive while application writers are stopped |
| Encryption key and secrets | Credential recovery and service authentication | Separate protected secrets vault |
| Configuration and image identities | Recreate the original runtime | Versioned, access-controlled recovery record |
| Provider registrations | URLs, subscriptions, signing-secret ownership | Protected operational documentation |
Capture a coordinated backup
Schedule downtime, stop incoming delivery through the tunnel, and allow in-flight workflows to finish or follow your documented interruption procedure. Then stop n8n and its runners before both the database dump and directory archive. PostgreSQL can remain running because no application writers should remain. Do not use this single-instance procedure unchanged if workers or other database writers exist.
These commands assume the explicit n8nprod project and database names above. Pre-pull the helper image before the maintenance window. Run the following block in Bash; it stops on failure and deliberately does not automatically restart an incompletely backed-up application.
set -euo pipefail
cd ~/n8n-self-hosted
umask 077
docker pull alpine:3.22
STAMP=$(date -u +%Y%m%dT%H%M%SZ)
BACKUP="$HOME/n8n-backups/$STAMP"
mkdir -p "$BACKUP"
docker volume inspect n8nprod_n8n_data >/dev/null
docker compose stop n8n task-runners
docker compose exec -T postgres \
pg_dump -U n8n -d n8n -Fc > "$BACKUP/n8n.dump"
docker run --rm --network none \
-v n8nprod_n8n_data:/source:ro \
-v "$BACKUP:/backup" \
alpine:3.22 \
tar -czf /backup/n8n-data.tar.gz -C /source .
cp compose.yaml "$BACKUP/compose.yaml"
docker compose images > "$BACKUP/images.txt"
docker compose exec -T postgres \
pg_restore --list < "$BACKUP/n8n.dump" > "$BACKUP/dump-contents.txt"
docker run --rm --network none \
-v "$BACKUP:/backup:ro" alpine:3.22 \
tar -tzf /backup/n8n-data.tar.gz > "$BACKUP/archive-contents.txt"
(cd "$BACKUP" && sha256sum n8n.dump n8n-data.tar.gz > SHA256SUMS)
docker compose start n8n task-runners
Record the environment and exact image digests in your protected recovery system without placing plaintext secrets beside ordinary archives. Encrypt and transfer the recovery set off-device, verify its checksum after transfer, then restore tunnel access after application checks. Listing an archive proves readability, not successful recovery.
For database details, consult PostgreSQL’s pg_dump documentation and pg_restore documentation. This example backs up one application database, not every cluster role or unrelated database.
Restore only into clean, isolated targets
Never run a restore rehearsal against production volumes. docker compose down does not remove named volumes, and docker volume create does not empty an existing volume. Restored workflows can contain live credentials, schedules, and registered triggers. Use a separate disposable host or VM with outbound access blocked to production APIs and networks, no Localtonet client connection, and no production inbound routing before starting restored n8n.
Preload the recorded images on the disposable host, then enforce and verify network isolation outside the application. A different Compose project name alone is not isolation from production services. Host-level egress controls must cover Docker traffic as well as host processes. If you cannot establish that boundary, restore storage only and do not start n8n.
On that host, create a private restore directory containing the saved compose.yaml and a protected .env reconstructed from the recovery record. Use the exact original image versions and encryption key. Copy the selected backup into a local directory and set BACKUP to it. The explicit project argument below overrides the production project name in the environment file.
set -euo pipefail
cd ~/n8n-restore
BACKUP="$HOME/restore-input"
RESTORE_PROJECT=n8nrestorecheck
# Abort if either target volume already exists.
for volume in \
"${RESTORE_PROJECT}_postgres_data" \
"${RESTORE_PROJECT}_n8n_data"
do
if docker volume inspect "$volume" >/dev/null 2>&1; then
echo "Refusing existing restore volume: $volume" >&2
exit 1
fi
done
(cd "$BACKUP" && sha256sum -c SHA256SUMS)
docker volume create "${RESTORE_PROJECT}_n8n_data"
docker run --rm --network none \
-v "${RESTORE_PROJECT}_n8n_data:/restore" \
-v "$BACKUP:/backup:ro" \
alpine:3.22 \
tar -xzpf /backup/n8n-data.tar.gz -C /restore
# Start PostgreSQL only. Do not start restored n8n yet.
docker compose -p "$RESTORE_PROJECT" up -d postgres
docker compose -p "$RESTORE_PROJECT" ps
Wait until PostgreSQL is healthy. The fresh database volume creates an empty application database using the environment settings. Restore into it without dropdb or --clean:
docker compose -p n8nrestorecheck exec -T postgres \
pg_restore -U n8n -d n8n \
--exit-on-error --no-owner --no-privileges \
< "$BACKUP/n8n.dump"
If restoration fails, do not overlay another attempt onto these targets. Investigate, then use a new disposable project with fresh volumes. Removing failed restore resources is a destructive cleanup operation and must be restricted to that disposable environment.
Only after verifying the host’s network quarantine should you start the restored application and runner:
docker compose -p n8nrestorecheck up -d n8n task-runners
docker compose -p n8nrestorecheck logs --tail=200 n8n task-runners
Schedules may start immediately, but quarantine must prevent production contact. Inspect and disable production workflows using the installed release’s lifecycle controls while still isolated. Do not guess database updates to deactivate them. Verify owner login, workflow visibility, representative stored data, and credential recovery using sandbox credentials or controlled test endpoints. Live credential decryption checks must not become accidental production API calls.
Keep the rehearsal isolated until it is destroyed. A real recovery cutover is a separate operation: ensure the old instance is stopped, reconcile missed and duplicate events, update endpoint registrations, and enable reviewed workflows deliberately. Two recovered instances must never both process the same scheduled business work.
Upgrade with migration and rollback planning
A container update can also migrate the database. Reverting an image tag does not necessarily reverse schema changes. Review release notes, security advisories, environment-variable changes, runner compatibility, and major-version migration instructions before choosing a new pin.
- Record current and target application, runner, and database image identities.
- Create a coordinated pre-upgrade recovery set.
- Restore it into the quarantined staging environment and test the target version there.
- Validate manual workflows, Code nodes, credentials, schedules, webhook lifecycle, public URLs, and signature rejection.
- Schedule maintenance and change production pins only after acceptance.
cd ~/n8n-self-hosted
docker compose config --quiet
docker compose pull n8n task-runners
docker compose up -d n8n task-runners
docker compose logs --tail=200 n8n task-runners
docker compose exec n8n n8n --version
If rollback is required after migration, use the pre-upgrade database, application data, configuration, key, and image versions together. Never assume an older application can safely open a newer schema. PostgreSQL major upgrades are also separate migration projects; do not change postgres:16 to a new major against the same data directory without its supported upgrade procedure.
Troubleshoot from the inside outward
| Problem | Likely area | Checks and correction |
|---|---|---|
| Local page unavailable | Container or binding | Inspect Compose status, n8n logs, and the loopback listener before investigating the tunnel. |
| Database connection fails | Credentials or health | Check PostgreSQL logs and matching environment values. Initialization variables do not rewrite an existing database password. |
| Code node stalls | Runner connectivity | Check runner logs, compatible images, shared authentication token, and broker access inside Docker. |
| Credentials cannot decrypt | Key mismatch | Restore the key paired with the database. A lost key may require recreating credentials. |
| Webhook URL contains localhost | Public base URL | Correct WEBHOOK_URL, recreate n8n, and reopen the node. |
| Test succeeds, production fails | Workflow lifecycle | Check publication or activation, the selected production version, HTTP method, and registered path. |
| Public endpoint unavailable | Tunnel lifecycle | Check the connected client, selected device, local target, Start state, and current plan timeout. |
| Editor works, provider delivery fails | Edge challenge or route | Check whether an authentication challenge blocks the provider and inspect its delivery diagnostics. |
| Valid signature rejected | Raw body or secret | Confirm exact body bytes, endpoint signing secret, algorithm, and applicable timestamp tolerance. |
| Duplicate business actions | Retries or concurrency | Use durable event identifiers and atomic idempotency enforcement. |
| Wrong scheme or proxy warning | Forwarded headers | Inspect trusted proxy behavior and hop configuration; do not suppress warnings with an arbitrary trust count. |
| Restore contains unexpected files | Dirty target volume | Stop the rehearsal. Rebuild with fresh isolated volumes rather than extracting over stale data. |
docker compose ps
docker compose logs --tail=200 n8n
docker compose logs --tail=200 postgres
docker compose logs --tail=200 task-runners
docker compose exec n8n n8n --version
docker compose config --quiet
Redact logs before sharing. Full docker compose config output can expand secrets from the environment file; use --quiet when you only need validation. Monitor database growth, disk capacity, execution failures, runner errors, and public delivery failures as routine operations, not only during incidents.
Frequently asked questions
Is self-hosted n8n free for every commercial use?
No blanket assumption is safe. Review n8n’s current licensing terms for your exact use, especially when customers access n8n itself or you sell hosted functionality.
Does every production installation require PostgreSQL?
No. SQLite can suit smaller single-instance deployments. PostgreSQL is used here for a conventional logical recovery workflow. Queue-mode and multi-worker deployments require additional planning.
Does self-hosting keep all workflow data on my server?
No. Workflows can send data to external APIs, AI services, email systems, and databases. Review each node, credential, and destination.
Why bind port 5678 to 127.0.0.1?
It limits direct host-port access to loopback. A mapping such as 5678:5678 commonly listens on all interfaces. The Localtonet client must run where it can reach the selected local target.
Does Localtonet expose only webhook routes?
No. A standard HTTP tunnel to n8n can expose the complete application. Complete owner setup first and use a separately tested route-filtering design if only webhook paths should be public.
Is the public URL permanent and always available?
Do not assume permanence. Availability depends on the configuration, plan, connected device, and running tunnel. Our homepage pricing snapshot lists a 30-minute free-plan timeout; check current terms before registering production callbacks.
Are workflow exports a complete backup?
No. Preserve the database, application files, matching encryption key, configuration, image identities, and provider-side records. Test restoration into clean, isolated targets without contacting production systems.
Can I use this on a Raspberry Pi?
Potentially, on supported 64-bit hardware with compatible application, runner, and database images. Validate architecture support, storage reliability, memory use, and representative workloads before depending on it.
Publish a verified n8n endpoint with Localtonet
Complete local setup, authentication tests, proxy verification, and an isolated recovery rehearsal first. Then use our HTTP tunnel to provide public HTTPS access without inbound router port forwarding. Keep the client connected, start the tunnel explicitly, and stop it when public access is no longer needed.
Get Started Free →Corrections & updates
Substantive changes approved by the Localtonet editorial team are listed transparently below.
Localtonet is a secure multi-protocol tunneling and proxy platform designed to expose localhost, devices, private services, and AI agents to the public internet supporting HTTP/HTTPS tunnels, TCP/UDP forwarding, mobile proxy infrastructure, file server publishing, latency-optimized game connectivity, and developer-ready AI agent endpoint exposure from a single unified control plane.