MicroticaMicrotica

n8n Workflow Automation

Deploy the open-source n8n workflow automation tool on your own AWS account with Microtica, and run a production-ready, self-hosted setup in minutes.

n8n is a free and open-source workflow automation tool that lets teams automate tasks across different services.

Microtica offers a ready-to-use n8n template as part of the Free templates pack. Deploy n8n on the demo Kubernetes cluster to get started. When you're ready, self-host n8n on your own AWS account and set up a production-ready solution in minutes.

One-click deploy

Click Deploy with Microtica below and follow the template steps to deploy an n8n application on your AWS account.

Deploy with Microtica

Built-in environment variables

These built-in environment variables are provided in the n8n runtime.

NameDescriptionRequired
DatabasePasswordPassword for the PostgreSQL database.Yes

Custom environment variables

To simplify the initial setup, this template sets a default configuration for the n8n application. To customize the configuration with custom variables like N8N_SMTP_HOST or N8N_SMTP_PASS (see the full list of environment variables), use one of two approaches.

Configure environment variables from the Microtica console

To configure an environment variable from the Microtica console, first define it in the schema.json file. The input properties you define here become available in the Microtica console. This approach gives you consistent configuration for the application and strong validation rules.

schema.json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "schema://microtica/schema.json",
  "title": "Application schema",
  "type": "object",
  "properties": {
      "inputs": {
          "type": "object",
          "properties": {
              "N8N_SMTP_HOST": {
                  "type": "string",
                  "default": "smtp.sendgrid.net",
                  "description": "SMTP server host name address. Use an empty string to disable all mail sending from the server. The default value for this variable is an empty string"
              },
              "N8N_SMTP_PASS": {
                  "type": "string",
                  "sensitive": true,
                  "description": "SMTP server password (encrypted)"
              }
          },
          "required": []
      }
  },
  "additionalProperties": false
}

Mark sensitive parameters, such as N8N_SMTP_PASS, as sensitive in the schema.json file. This encrypts them for better protection.

Next, to inject the environment variable into the application container runtime, reference the variable using the {{ENV_VAR_NAME}} syntax.

kube.config
# ...

apiVersion: apps/v1
kind: Deployment
metadata:
namespace: "{{MIC_NAMESPACE}}"
name: "{{MIC_NAME}}"
labels:
  app: "{{MIC_NAME}}"
  microticaService: "{{MIC_NAME}}"
spec:
replicas: 1
template:
  spec:
    containers:
      - name: "{{MIC_NAME}}"
        image: "{{MIC_IMAGE}}"
        env:
          # Reference the environment variable.
          # During deployment the placeholder will be replaced with the configured value.
          - name: N8N_SMTP_HOST
            value: "{{N8N_SMTP_HOST}}"
          # ...
          # Reference the sensitive environment variable.
          - name: N8N_SMTP_PASS 
            valueFrom:
              secretKeyRef:
                name: {{MIC_SECRET_NAME}}
                key: N8N_SMTP_PASS

# ...

Configure environment variables directly in the Kubernetes spec

To configure an environment variable directly in the Kubernetes spec, update the kube.config file.

As in the previous example, provide the environment variable value directly in the spec.

kube.config
# ...

apiVersion: apps/v1
kind: Deployment
metadata:
namespace: "{{MIC_NAMESPACE}}"
name: "{{MIC_NAME}}"
labels:
  app: "{{MIC_NAME}}"
  microticaService: "{{MIC_NAME}}"
spec:
replicas: 1
template:
  spec:
    containers:
      - name: "{{MIC_NAME}}"
        image: "{{MIC_NAME}}"
        env:
          # Provide the environment variable value directly in the spec.
          - name: N8N_SMTP_HOST
            value: "smtp.sendgrid.net"
          # ...

# ...

Estimated AWS cost

The AWS cost depends on the configuration of the n8n infrastructure. Here is the cost breakdown, assuming the resources run all the time:

  • EKS Cluster — $70/month
  • Application Load Balancer — $17/month
  • 2 x t3.large EC2 instances — $60/month

Total cost per month with this minimal configuration is approximately $150/month.

Optimize AWS cost

To save costs while using n8n in a non-production environment, run it from Monday to Friday, 8 hours per day. This schedule can cut your cloud expenses by at least 65%.

In the Resources or Cost Dashboard, create a Saving Schedule to apply these cost-saving measures.

Saving Schedule configuration in the Microtica Cost Dashboard

Next steps

On this page