Seleccione el flujo que necesita y copie los comandos con un clic. Todo comparte la misma configuracion para no cometer errores entre pestanas.
Run the maintained pre-patched container (`latestold` for v1, `latest`/`stable` and `beta` for v2) when you want the fastest install.
Manual Patch Workflow
Use this track when you want a doc-style checklist you can audit or adapt. The workflow itself is fully supported; only the helper script is flagged as deprecated because the Dockerfile patch now covers every maintained version.
Docs-first
New baseline
Dockerfile patch (clean rebuild)
Rebuild any upstream n8n release with the license override baked in. Works on every currently available version and keeps your containers immutable.
# Dockerfile patch to change license server URL and public key
#Change N8N_BASE_TAG as needed
ARG N8N_BASE_TAG=2.1.1
FROM n8nio/n8n:${N8N_BASE_TAG}
USER root
# ---- Build arguments ----
ARG NEW_URL="https://www.n8selfhosted.com"
ARG NEW_CERT="-----BEGIN PUBLIC KEY-----\nMIICsTCCAZmgAwIBAgIBATANBgkqhkiG9w0BAQsFADAcMRowGAYDVQQDExFNeSBM\naWNlbnNlIFNlcnZlcjAeFw0yNTEwMTYyMjE5MDFaFw0zNTEwMTYyMjE5MDFaMBwx\nGjAYBgNVBAMTEU15IExpY2Vuc2UgU2VydmVyMIIBIjANBgkqhkiG9w0BAQEFAAOC\nAQ8AMIIBCgKCAQEAvQKuPlPTTIdeCyj0CW4Z+sXX8b3G+hXTT8O8OgiXgW75UVDr\nsPhmC5dLyj6rQRjZqdNhaJz6FTYR0Ga93BS4nKSlCAq4k5gDprKuRiGTvPrPcBgE\n3OFc994QHU/lUUGHwT0SI3mw71rWS1FiklRKLbRYbFu1JUneRohTqzaY6SLklNEp\nlXPEzzHAYDahoJGeLhQA8IE5u6KxXIOx4TjntVU9Rhy1VeTshXimhtyRhp/aenaX\n4Lv+tQDecwYCw2OMeOUcg1Dmrev82E5BMSkTQW334Wu6PdSfZLHzm2wAAjgvEvNv\nG7jSI2jluZi8gYGtaiWqgj2kpYczWwC/LgrL9wIDAQABMA0GCSqGSIb3DQEBCwUA\nA4IBAQCwMQuZvWZTHjBir4Se9XzbF6lg3CkCa6aKeavWh3GrcQR5olB+c25yhPwH\nfcbJCz3j3eobmNDSFHKu77qN0l7pvkXoS79SuBE43xqrHiAc8MJsebFzh723Xu9t\nKrvHErlblcq8ZhLxFl4pOiXknVXBndB7Ic8xphTd2f2myPqP8w6VVEg2rVfqBgNz\nk//FkhpnXEdEdpExmCARR/3T0zbad5R9bZltwcRHpmF8Nty9Yx69lO+GsjjTwvjq\nKnpCQ0MlWPCdRkOZZpT6EQrAQhdMvhQfxCvsGHvOAZoDWdFKIUqyhlu2o+XCk7OJ\nhNCqS2JdxHm/+CbsPJVonIlW2dTb\n-----END PUBLIC KEY-----"
# ---- Create and apply patch in one step ----
RUN TARGET_FILE=$(ls /usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n_io+license-sdk@*/node_modules/@n8n_io/license-sdk/dist/LicenseManager.js 2>/dev/null | head -n 1) && \
if [ -z "$TARGET_FILE" ]; then \
echo "ERROR: LicenseManager.js not found!"; \
find /usr/local/lib/node_modules/n8n -name "*.js" | grep -i license | head -n 10; \
exit 1; \
fi && \
echo "Found: $TARGET_FILE" && \
cp "$TARGET_FILE" "${TARGET_FILE}.backup" && \
node -e " \
const fs = require('fs'); \
const file = process.argv[1]; \
const url = process.argv[2]; \
const cert = process.argv[3]; \
let content = fs.readFileSync(file, 'utf8'); \
content = content.replace(/https:\/\/license\.n8n\.io/g, url); \
const formattedCert = cert.replace(/\\\\n/g, '\\n'); \
content = content.replace(/-----BEGIN PUBLIC KEY-----[\\s\\S]*?-----END PUBLIC KEY-----/g, formattedCert); \
fs.writeFileSync(file, content, 'utf8'); \
console.log('✓ Patched'); \
" "$TARGET_FILE" "$NEW_URL" "$NEW_CERT" && \
if grep -q "$NEW_URL" "$TARGET_FILE"; then \
echo "✓ Verified"; \
else \
echo "✗ Failed"; \
exit 1; \
fi && \
chown node:node "$TARGET_FILE" && \
chmod 644 "$TARGET_FILE"
# ---- Final setup ----
USER node
WORKDIR /home/node
docker run -d --name [container_name] -p 5678:5678 local/n8n-patched:latest
patcher.sh helper (legacy)
Deprecated
Still available for frozen containers (below 1.118.1) where rebuilding is not possible. It keeps a backup so you can restore with sh ./patcher.sh restore. New installs should stay on the Dockerfile patch.
Configuration Helper
Configure your container name and image. These values will be used in all copy buttons throughout this section.
Changes apply automatically to the copy buttons below.
1. Install Docker and Run n8n
Install Docker on your system and run the official n8n image.
Docker Run (Simple)
Start the container (no special environment variables required):
docker run -d --name [container_name] -p 5678:5678 [image_name]
Replace [container_name] and [image_name] (use n8nio/n8n:latest or your custom image).
Patch - creates a backup of the original license certificate and replaces it with a custom one.
Restore - restores the original certificate from the backup.
Patch command:
sh ./patcher.sh patch
Expected output for patch command:
/home/node # sh ./patcher.sh patch
Detected: Running main logic INSIDE the container.
...
Patch applied! Restart n8n for the changes to take effect.
Patch License URL applied! https://patcher.n8selfhosted.com
/home/node #
Restore command:
sh ./patcher.sh restore
Expected output for restore command:
/home/node # sh ./patcher.sh restore
Detected: Running main logic INSIDE the container.
...
Starting operation: RESTORE
Restoring the original file from backup...
Original file restored! Restart n8n for the changes to take effect.
/home/node #
Use "exit" to exit the container shell.
5. Restart the Container
After applying the patch, restart your container to apply the changes:
docker restart [container_name]
6. Activate the License
Access your application's web interface.
Go to Settings.
Enter your N8SH-Entomai license. (If you do not have one, check the "Get Free License" tab).
Docker Image Method (Recommended)
This is the easiest and fastest way to get started. The image is already patched.
Configuration Helper
Configure your container name and image. These values will be used in all copy buttons throughout this section.
Changes apply automatically to the copy buttons below.
1. Install Docker
Install Docker on your system following the official instructions.
2. Run the Pre-patched Container
Use the pre-patched Docker image that comes with the license already configured. No additional patching required.
Docker Run (Simple)
Start the container with the pre-patched image:
docker run -d --name [container_name] -p 5678:5678 [image_name]
The image ([image_name]) is already configured as ghcr.io/n8nsh/n8n:latest in the Configuration Helper.