### Install and start NetworkManager Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Installs and starts the NetworkManager service. ```bash sudo apt install -y network-manager sudo systemctl start NetworkManager sudo systemctl enable NetworkManager ``` -------------------------------- ### Install KVM and libvirt dependencies Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Install the necessary virtualization packages and start the libvirt service. ```bash sudo apt install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager virtiofsd ``` ```bash sudo systemctl enable --now libvirtd ``` ```bash systemctl status libvirtd ``` -------------------------------- ### Install PostgreSQL Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Deploy a PostgreSQL instance for the multi-instance n8n setup. ```bash helm install postgresql bitnami/postgresql \ --set global.postgresql.auth.password=YourStrongPassword123 \ --set global.compatibility.openshift.adaptSecurityContext=auto \ -n n8n ``` -------------------------------- ### Start and enable libvirtd Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Starts the libvirt service and ensures it starts on boot. ```bash sudo systemctl start libvirtd sudo systemctl enable libvirtd ``` -------------------------------- ### Install and Configure NetworkManager Source: https://docs.n8n.io/llms-full.txt Installs and starts NetworkManager to handle cluster DNS entries. ```shell sudo apt install -y network-manager sudo systemctl start NetworkManager sudo systemctl enable NetworkManager ``` ```shell nmcli general status ``` -------------------------------- ### Install and manage n8n globally Source: https://docs.n8n.io/llms-full.txt Commands for installing, updating, and starting n8n globally via npm. ```bash npm install n8n -g ``` ```bash npm install -g n8n@0.126.1 ``` ```bash npm install -g n8n@next ``` ```bash n8n # or n8n start ``` -------------------------------- ### Configure and Start CRC Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Initialize the CodeReady Containers environment and start the cluster. ```bash crc setup ``` ```bash crc config set memory 14336 ``` ```bash # Open the file, paste your pull secret (from earlier), then Ctrl+O to save, Ctrl+X to exit nano ~/pull-secret.txt # Restrict permissions so only you can read it chmod 600 ~/pull-secret.txt ``` ```bash crc start --pull-secret-file ~/pull-secret.txt ``` -------------------------------- ### Configure and start the cluster Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Adjust memory allocation and start the OpenShift Local cluster. ```bash crc config set memory 14336 ``` ```bash echo "" > pull-secret.txt ``` ```bash crc start --pull-secret-file pull-secret.txt ``` -------------------------------- ### Install Helm Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Use this command to download and install the Helm package manager. ```shell curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash ``` -------------------------------- ### Install KVM and libvirt Source: https://docs.n8n.io/llms-full.txt Installs the KVM hypervisor and necessary libvirt components for cluster VM management. ```shell sudo apt install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils ``` -------------------------------- ### Caddyfile configuration examples Source: https://docs.n8n.io/llms-full.txt Examples of Caddyfile configurations for routing traffic to the n8n service. ```text n8n.. { reverse_proxy n8n:5678 { flush_interval -1 } } ``` ```text automate.example.com { reverse_proxy n8n:5678 { flush_interval -1 } } ``` -------------------------------- ### Markdown Syntax Examples Source: https://docs.n8n.io/llms-full.txt/1 Basic markdown formatting examples for text and lists in n8n. ```markdown The text in double asterisks will be **bold** The text in single asterisks will be *italic* Use # to indicate headings: # This is a top-level heading [](#this-is-a-top-level-heading)## This is a sub-heading [](#this-is-a-sub-heading)### This is a smaller sub-heading [](#this-is-a-smaller-sub-heading)You can add links: [Example](https://example.com/) Create lists with asterisks: * Item one * Item two Or created ordered lists with numbers: 1. Item one 2. Item two ``` -------------------------------- ### Setup PostgreSQL Database Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-google-cloud-run Commands to create a Cloud SQL instance, database, and user for n8n persistence. ```bash gcloud sql instances create $INSTANCE_NAME --database-version=POSTGRES_13 --tier=db-f1-micro --region=$REGION --root-password=your-root-password gcloud sql databases create $DB_NAME --instance=$INSTANCE_NAME gcloud sql users create $DB_USER --instance=$INSTANCE_NAME --password=your-n8n-password ``` -------------------------------- ### Install Redis Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Deploy a Redis instance for message queuing. ```bash helm install redis bitnami/redis \ --set global.compatibility.openshift.adaptSecurityContext=auto \ -n n8n ``` -------------------------------- ### Customize task runner Dockerfile Source: https://docs.n8n.io/deploy/host-n8n/configure-n8n/set-up-task-runners Example Dockerfile for installing custom dependencies in task runners. ```dockerfile FROM n8nio/runners:1.121.0 USER root RUN cd /opt/runners/task-runner-javascript && pnpm add moment uuid RUN cd /opt/runners/task-runner-python && uv pip install numpy pandas COPY n8n-task-runners.json /etc/n8n-task-runners.json USER ``` -------------------------------- ### Prepare OpenShift Project and Permissions Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Create a new project and grant the necessary security context constraints. ```bash oc new-project $NAMESPACE ``` ```bash oc adm policy add-scc-to-user anyuid \ system:serviceaccount:$NAMESPACE:n8n ``` ```bash oc get rolebindings -n $NAMESPACE ``` -------------------------------- ### Retrieve Workflow Template JSON Structure Source: https://docs.n8n.io/build/ways-of-building-workflows/use-templates Example response structure for the GET /templates/workflows/{id} endpoint. ```json // GET /templates/workflows/{id} returns (wrapped): { "workflow": { "id": 123, "name": "...", "totalViews": 1000, // ... see full workflow item schema below "workflow": { // actual workflow definition "nodes": [...], "connections": {} ``` -------------------------------- ### Navigate to Directory and Prepare Update Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-digital-ocean Commands to change into the project directory and prepare for pulling the latest version. ```sh # Navigate to the directory containing your docker compose file cd # Pull latest version export N8N_INSTANCE_OWNER_MANAGED_BY_ENV=true export N8N_INSTANCE_OWNER_EMAIL= export N8N_INSTANCE_OWNER_FIRST_NAME= export N8N_INSTANCE_OWNER_LAST_NAME= export N8N_INSTANCE_OWNER_PASSWORD_HASH= # SSO using OIDC export N8N_SSO_MANAGED_BY_ENV=true export N8N_SSO_USER_ROLE_PROVISIONING=instance_role export N8N_SSO_OIDC_LOGIN_ENABLED=true export N8N_SSO_OIDC_CLIENT_ID= export N8N_SSO_OIDC_CLIENT_SECRET= export N8N_SSO_OIDC_DISCOVERY_ENDPOINT= # Security policy export N8N_SECURITY_POLICY_MANAGED_BY_ENV=true export N8N_MFA_ENFORCED_ENABLED=true export N8N_PERSONAL_SPACE_PUBLISHING_ENABLED=false export N8N_PERSONAL_SPACE_SHARING_ENABLED=false # Log streaming export N8N_LOG_STREAMING_MANAGED_BY_ENV=true export N8N_LOG_STREAMING_DESTINATIONS='[{"type":"webhook","url":"https://logs.example.com/n8n"}]' # MCP export N8N_MCP_MANAGED_BY_ENV=true export N8N_MCP_ACCESS_ENABLED=true # Community packages export N8N_COMMUNITY_PACKAGES_MANAGED_BY_ENV=true export N8N_COMMUNITY_PACKAGES='[{"name":"n8n-nodes-foo","version":"1.2.3"}]' ``` -------------------------------- ### GET /templates/collections/{id} Source: https://docs.n8n.io/build/ways-of-building-workflows/use-templates Get a specific template collection. ```APIDOC ## GET /templates/collections/{id} ### Description Get a specific template collection. ### Method GET ### Endpoint /templates/collections/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the collection. ``` -------------------------------- ### Create Database and User Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-google-cloud-run Create the database and user credentials for n8n. ```bash gcloud sql databases create n8n --instance=n8n-db ``` ```bash gcloud sql users create n8n-user \ --instance=n8n-db \ --password="change-this-password" ``` -------------------------------- ### GET /templates/collections/ Source: https://docs.n8n.io/build/ways-of-building-workflows/use-templates Get a specific template collection. ```APIDOC ## GET /templates/collections/ ### Description Retrieve details for a specific template collection. ### Method GET ### Endpoint /templates/collections/ ``` -------------------------------- ### Verify Helm Installation Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Check that Helm is correctly installed and accessible. ```shell helm version ``` -------------------------------- ### Initialize n8n project directory Source: https://docs.n8n.io/llms-full.txt Commands to create and enter the directory for n8n configuration files. ```shell mkdir n8n-compose cd n8n-compose ``` -------------------------------- ### Install Helm Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Install the Helm package manager for deploying n8n. ```bash sudo snap install helm --classic ``` ```bash helm version ``` -------------------------------- ### Example Data from Customer Datastore Source: https://docs.n8n.io/llms-full.txt/1 Initial dataset generated by the Customer Datastore node. ```json [ { "id": "23423532", "name": "Jay Gatsby", "email": "gatsby@west-egg.com", "notes": "Keeps asking about a green light??", "country": "US", "created": "1925-04-10" }, { "id": "23423533", "name": "José Arcadio Buendía", "email": "jab@macondo.co", "notes": "Lots of people named after him. Very confusing", "country": "CO", "created": "1967-05-05" }, ... ] ``` -------------------------------- ### Install MinIO Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Deploy MinIO for S3-compatible object storage. ```bash helm install minio bitnami/minio \ --set auth.rootPassword=MinioStrongPassword123 \ --set global.compatibility.openshift.adaptSecurityContext=auto \ -n n8n ``` -------------------------------- ### NPM Installation Command Source: https://docs.n8n.io/deploy/host-n8n/configure-n8n/scaling/manage-execution-data The command to install n8n via npm. ```sh # npm ``` -------------------------------- ### Configure n8n environment variables Source: https://docs.n8n.io/llms-full.txt Example .env file content for defining domain, subdomain, timezone, and SSL email settings. ```shell # DOMAIN_NAME and SUBDOMAIN together determine where n8n will be reachable from # The top level domain to serve from DOMAIN_NAME=example.com # The subdomain to serve from SUBDOMAIN=n8n # The above example serve n8n at: https://n8n.example.com # Optional timezone to set which gets used by Cron and other scheduling nodes # New York is the default value if not set GENERIC_TIMEZONE=Europe/Berlin # The email address to use for the TLS/SSL certificate creation SSL_EMAIL=user@example.com ``` -------------------------------- ### Create and Configure User Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-digital-ocean Commands to create a new user and grant them administrative privileges on the server. ```bash adduser ``` ```bash usermod -aG sudo ``` -------------------------------- ### Install missing packages Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Command to install required system packages if missing. ```bash sudo apt install -y ``` -------------------------------- ### Install and verify NetworkManager Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Ensure NetworkManager is installed and active for DNS management. ```bash sudo apt install -y network-manager ``` ```bash nmcli networking ``` -------------------------------- ### Configure and Login to OpenShift Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-openshift-local-crc Set up the environment variables and authenticate with the OpenShift cluster. ```shell eval $(crc oc-env) export NAMESPACE=n8n-YYYYMMDD # use the date from your original deployment oc login -u kubeadmin -p https://api.crc.testing:6443 ``` -------------------------------- ### Deploy Resources Source: https://docs.n8n.io/deploy/host-n8n/install-options/use-a-cloud-provider/deploy-to-aws Apply Kubernetes configurations to the cluster. ```bash kubectl apply -f . ``` ```bash kubectl apply -f namespace.yaml ``` -------------------------------- ### Configure External Logging Service Source: https://docs.n8n.io/administer/observe-and-log/stream-logs-to-external-systems Example configuration for setting up an external logging service, including authorization headers and circuit breaker settings. ```json "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer s3cret" } ], }, "circuitBreaker": { "maxFailures": 5, "failureWindow": 60000 } }, { "type": "sentry", "label": "Sentry prod", "subscribedEvents": ["n8n.workflow"], "dsn": "https://public@sentry.example.com/1" } ```