Skip to main content
n8n support is available starting from Zylon 1.52

n8n Integration

n8n is a workflow automation tool now integrated into Zylon, enabling you to create flows by connecting different services and systems. The deployment and configuration of n8n are automatically managed by Zylon, requiring minimal user setup.

Important Considerations

  • Version management: Zylon manages the deployed n8n version to ensure compatibility with the rest of the system. Manual n8n updates are not available.
  • Access: n8n is available at its own subdomain (for default: https://n8n.your-zylon-instance.com)
  • User management: User management in n8n is independent from Zylon users. Users must be created and managed directly within the n8n interface.

Configuration

To enable n8n in your environment, you only need to modify the corresponding option in the /etc/zylon/zylon-conf.yaml file:
n8n:
  enabled: true  # Set to false to disable n8n
  host: ""  # Specify a custom host if needed.
  publicApi:
    enabled: false  # Enable n8n's public REST API
  externalConnection:
    enabled: false  # Allow outbound connections to n8n services
  license:
    key: ""  # n8n license key
    type: ""  # License type (community or enterprise)
n8n’s public API allows you to manage workflows, executions, credentials, and other resources programmatically through REST endpoints (API Documentation)
The license fields only apply when externalConnection.enabled is set to true and an internet connection is available.
In airgap mode, externalConnection.enabled will always be false regardless of the configured value (Semi-airgap installation)

SSL Certificates Configuration

This section is only necessary if you are not using Let’s Encrypt certificates
If your Zylon installation uses manual SSL certificates (not Let’s Encrypt), you will need to create an additional Kubernetes secret specifically for n8n. First, ensure you have completed all the steps in the manual SSL certificates installation guide.

Create a Secret for n8n

Once you have your certificate files ready (tls.crt and tls.key), create a secret in the Kubernetes cluster specifically for n8n:
# Create the n8n SSL secret
sudo k0s kubectl create secret tls zylon-tls-n8n --key tls.key --cert tls.crt -n zylon

# Verify the secret was created correctly
sudo k0s kubectl describe secret zylon-tls-n8n -n zylon
After creating the secret, reload the configuration:
sudo zylon-cli sync
Your n8n instance will now use HTTPS with the configured SSL certificates.

External Connections

When external connections are disabled, certain n8n functionalities are automatically deactivated:
  • Community packages: Installation of packages from the NPM registry is disabled
  • Workflow templates: Community workflow templates are disabled
  • License activation: Licenses are not validated and will not work in this mode
These restrictions ensure that n8n operates without external dependencies.

Proxy Configuration

n8n uses Zylon’s global proxy configuration. The system automatically manages proxy certificates and endpoints, so no additional n8n-specific configuration is required. If your organization uses a proxy, configure it following the proxy configuration guide.

Backup Management

n8n uses PostgreSQL as its database, which means all n8n information is automatically included in Zylon’s standard database backups. For more information about backup management, see the Zylon backup documentation. For specific use cases involving workflow migration or transfer between environments, see the Workflow Import and Export section.

Apply Configuration

After modifying the configuration file, apply the changes:
sudo zylon-cli sync

Workflow Import and Export

n8n provides CLI commands that allow selective export and import of entities. These commands are especially useful for:
  • Migration from other environments: If you want to migrate n8n information to Zylon from another existing environment
  • Selective import: Export specific workflows from other environments and import them into Zylon without needing to migrate the entire instance
For more information about CLI commands, see the official n8n documentation.

Basic Export Commands

Export all workflows:
n8n export:workflow --all --output=/home/node/.n8n/workflows.json
Export a specific workflow:
n8n export:workflow --id=42 --output=/home/node/.n8n/workflow-42.json
Export credentials:
n8n export:credentials --all --output=/home/node/.n8n/credentials.json
Export decrypted credentials:
n8n export:credentials --all --output=/home/node/.n8n/credentials.json --decrypted
Use the --decrypted option when migrating between instances with different encryption keys.
Export complete instance:
n8n export:entities --outputDir=./outputs --includeExecutionHistoryDataTables=true

Basic Import Commands

Import workflows:
n8n import:workflow --input=/home/node/.n8n/workflows.json
Import a specific workflow:
n8n import:workflow --input=/home/node/.n8n/workflow-42.json
Import credentials:
n8n import:credentials --input=/home/node/.n8n/credentials.json
Import all instance:
Only works if the export database type matches the target database type. Zylon n8n uses PostgreSQL.
Import complete instance:
n8n import:entities --inputDir ./outputs --truncateTables true

Transfer Files from Your Local Machine

If you need to import workflows, credentials or other files located on your local machine, you must first transfer them to the n8n pod:

1. Get the Persistent Volume ID

# Get the n8n Persistent Volume ID
N8N_PV_ID=$(kubectl get pvc zylon-n8n-data -o jsonpath='{.spec.volumeName}' -n zylon)

# Build the directory path
N8N_PV_DIR="/var/zylon/data/$N8N_PV_ID"

# View the result
echo $N8N_PV_DIR

2. Copy Files to the Volume

# Copy file from your local machine
sudo cp /local/path/workflows.json $N8N_PV_DIR/

3. Access the Pod and Verify the File

kubectl exec -it deployment/zylon-n8n -n zylon -- /bin/sh
# Inside the pod, verify the file is available
ls /home/node/.n8n/

Important Notes

Exported entities retain their original IDs, so importing them will overwrite existing entities with the same ID.
Export files must be located in an accessible directory within the pod, typically /home/node/.n8n/.