Deploy n8n on Azure App Service (Portal Guide)
This guide walks you through what n8n is, why it’s so popular, and then the click-through Azure Portal steps to deploy it cleanly on Azure App Service for Linux (Web App for Containers). The recipe below is the “known-good” baseline we used successfully, including the exact App Settings and Health Check path that make App Service happy.
What is n8n?
n8n is an open-source workflow automation platform. Think of it as a visual way to connect APIs, databases, and services together—like LEGO for integrations.
- Visual workflow builder (drag-drop nodes)
- Massive integration surface (HTTP, DBs, clouds, apps)
- Self-hostable (no vendor lock-in), extensible, and scriptable
- Great for low-code automation, but friendly to developers too
Why is n8n popular?
- Open source & vendor-neutral — run it where you want.
- Low-code UX — business users can compose automations; devs can extend.
- Cost-effective — keep control of infra, cost, and privacy.
- Dev-friendly — add custom nodes, call APIs, integrate with CI/CD.
Why run n8n on Azure App Service?
Azure App Service is a PaaS that gives you:
- Easy container hosting (bring a public Docker image, set a port)
- Scale & reliability (scale up/out without re-architecting)
- Built-in monitoring/security (App Insights, access restrictions, TLS)
- CI/CD support and managed platform updates
In short: you focus on n8n; Azure handles the undifferentiated heavy lifting.
Slide-style outline
- What is n8n? — Open-source automation with a visual builder and tons of integrations.
- Why is n8n popular? — Open, flexible, low-code + dev-friendly. Great for demos & production.
- Why Azure? — Scalable, secure, integrated monitoring, easy CI/CD, full container control.
- Deployment Overview — Create RG → Create App Service (Linux/Container) → Set container image → Configure port/env → Health check → Start.
- Environment Variables — Key vars to make Azure reverse proxy and n8n happy.
- Networking & Monitoring — Optional VNet integration; enable App Insights.
- Recap — Pull image, set app port 5678, env vars, health check, restart → done.
Architecture at a glance
This diagram shows how a user’s HTTPS request reaches an n8n container running on Azure App Service (Linux), and which platform components and settings make it work reliably.
What you’re seeing
-
User Browser → Azure Front End
The Azure Front End terminates TLS and routes traffic to your container. -
App Service Plan (Linux)
Hosts two containers: -
Kudu sidecar (8181) for SSH, log streaming, and management.
-
n8n container listening on 0.0.0.0:5678 to serve the editor/API.
-
Routing & Health
-
Requests are forwarded to the n8n container on port 5678.
-
A health probe targets /healthz to keep the site warm and enable SSH.
Key takeaways (match these in your config)
- Tell App Service the app port:
WEBSITES_PORT=5678, PORT=5678 - Bind n8n to IPv4 inside the container:
N8N_LISTEN_ADDRESS=0.0.0.0 - Set a health check path:
Monitoring → Health check → /healthz - Platform hygiene:
Always On = On (B1+), Startup Command = empty,
WEBSITES_ENABLE_APP_SERVICE_STORAGE=true
Public URL variables (add after first successful boot)
- N8N_PROTOCOL=https
- N8N_HOST=your-app.azurewebsites.net
- WEBHOOK_URL=https://your-app.azurewebsites.net/
If you see timeouts, first confirm App port = 5678 in Container settings and the two app settings WEBSITES_PORT + PORT are set to 5678, then re-check the health path.
Prerequisites
- An Azure subscription with permission to create resource groups and App Service resources
- A publicly accessible Docker image: n8nio/n8n (we’ll pin a version)
- Basic familiarity with Azure Portal
Step-by-Step (Azure Portal)
This is the exact flow that worked end-to-end. We keep the config minimal first so the platform’s startup probe passes, then add optional variables.
0) Create a Resource Group
- Azure Portal → Resource groups → + Create
- Resource group name: n8n-rg (or your choice)
- Region: choose a region near your users
- Review + create → Create
1) Create the App Service (Linux, Container)
- Azure Portal → Create a resource → App Service
- Project details
- Subscription: select your sub
- Resource Group: select the RG you just created
- Instance details
- Name: e.g., n8n-portal-demo → your default URL will look like
https://n8n-portal-demo.azurewebsites.net
(Some regions append -01 automatically; use whatever Azure shows.) - Publish: Container
- Operating System: Linux
- Name: e.g., n8n-portal-demo → your default URL will look like
- Plan
- Create new App Service plan (Linux)
- SKU: B1 or higher (enables Always On)
2) Container (image) settings
- Image source: Other container registries
- Registry: Public
- Server URL: https://index.docker.io
- Image and tag: n8nio/n8n:1.108.2 (pin a known version; avoid latest initially)
- App port: 5678 ← critical
Save and continue to create the Web App.
3) Minimal App Settings to boot successfully
App Service → Configuration → Application settings → + New setting
Add exactly these (keep others out for now to reduce variables):
Name | Value | Why |
---|---|---|
WEBSITES_PORT | 5678 | Tells front end which port the container listens on |
PORT | 5678 | Some stamps honor PORT ; harmless to set both |
WEBSITES_ENABLE_APP_SERVICE_STORAGE | true | Enables persistent storage area for App Service |
WEBSITES_CONTAINER_START_TIME_LIMIT | 1200 | Gives the startup probe more time on first boot |
N8N_LISTEN_ADDRESS | 0.0.0.0 | Ensures IPv4 bind that App Service can reach |
Save the settings.
4) Health Check (recommended)
- Monitoring → Health check
- Path: /healthz
- Save
n8n exposes /healthz and returns 200; this helps the startup probe pass quickly.
5) General Settings
- Settings → Configuration → General settings
- Always On: On (B1 or higher)
- Startup Command: (empty) — the official n8nio/n8n image starts itself
- HTTPS Only: On (recommended)
6) Full recycle
- Click Stop (wait ~20–30 seconds) → Start the app
(Stop/Start forces re-creation and re-probing; Restart sometimes isn’t enough.)
7) Test the default URL
- Open: https://your-app-name.azurewebsites.net (If your region adds -01, your app host will be ...azurewebsites.net with that suffix; use the exact URL shown in the Overview or logs.)
If it’s reachable, congrats — the container is live and the platform probes are passing. Now add the optional “public URL” variables.
Add n8n “public URL” variables (after it’s reachable)
Back to Configuration → Application settings and add:
Name | Value |
---|---|
N8N_PORT | 5678 |
N8N_PROTOCOL | https |
N8N_HOST | <your-app>.azurewebsites.net |
WEBHOOK_URL | https://<your-app>.azurewebsites.net/ |
Save → Restart.
If you add these too early and hit a redirect/host check during probe, the app can flap. That’s why we start minimal, then add them.
Recommended production hardening
Add these as needed:
Name | Suggested Value | Why |
---|---|---|
N8N_ENCRYPTION_KEY | a long random string (32+ chars) | Encrypts credentials on disk |
N8N_BASIC_AUTH_ACTIVE | true | Basic auth for the editor |
N8N_BASIC_AUTH_USER | <user> | |
N8N_BASIC_AUTH_PASSWORD | <strong-password> | |
DB_SQLITE_POOL_SIZE | 1 | Satisfies deprecation warning for SQLite |
N8N_RUNNERS_ENABLED | true | Enables task runners (forward-compat) |
N8N_EDITOR_BASE_URL | https://<your-app>.azurewebsites.net/ | Explicit editor base URL |
Using PostgreSQL instead of SQLite (prod)
Provision Azure Database for PostgreSQL – Flexible Server, then set:
DB_TYPE=postgresdb
DB_POSTGRESDB_HOST=<host>
DB_POSTGRESDB_PORT=5432
DB_POSTGRESDB_DATABASE=<db>
DB_POSTGRESDB_USER=<user>
DB_POSTGRESDB_PASSWORD=<password>
DB_POSTGRESDB_SCHEMA=public
DB_POSTGRESDB_SSL=true
Keep WEBSITES_ENABLE_APP_SERVICE_STORAGE=true even with Postgres so n8n can persist local files it needs.
How to find your URL
- App Service Overview page shows the default URL.
- Logs may also echo it (e.g., Editor is now accessible via: https://app...azurewebsites.net).
- Some Azure regions append -01 in the hostname automatically—use the exact host Azure gives you.
Verify & Logs
- Log stream: App Service → Logs → Log stream to watch container output.
- SSH: App Service → SSH (works once the startup probe passes).
- Inside the container you can check:
ss -ltnp | grep 5678
curl -I http://127.0.0.1:5678/
curl -I http://127.0.0.1:5678/healthz
Troubleshooting (common gotchas)
-
Site times out
Ensure App port = 5678 (Container settings) and App Settings includeWEBSITES_PORT=5678
andPORT=5678
. Start with the minimal settings list; addN8N_HOST/PROTOCOL
only after it’s reachable. -
SSH session closes immediately
The startup probe is failing and the site keeps recycling. Trim to minimal settings, pin the image tag (e.g., `n8nio/n8n:1.108.2), set Health check to /healthz, then Stop/Start. -
“InvalidTemplateDeployment / SubscriptionIsOverQuotaForSku”
Your region/SKU quota is 0. Pick a different region or SKU, or request a quota increase (App Service vCPU) for that region. -
Using latest tag
New latest builds may change behavior. Pin a version while you validate. -
Access Restrictions
If enabled, ensure a rule allows public access to the site during testing.
Recap
- n8n is an open-source automation powerhouse with a visual builder and endless integrations.
- Azure App Service gives you a simple, scalable, secure home for the n8n container.
- The key to a painless deployment is: App port 5678, WEBSITES_PORT/PORT = 5678, N8N_LISTEN_ADDRESS=0.0.0.0, and a Health check at /healthz.
- Start minimal so the platform stabilizes, then layer on the public URL and security vars.
Happy automating! 🚀
Call to Action
Choosing the right platform depends on your organization’s goals and constraints. For ongoing tips and deep dives on cloud computing, subscribe to our newsletter. Prefer video? Follow our series on cloud comparisons.
Ready to deploy n8n on Azure—or set up your broader cloud foundation? Contact us and we’ll help you plan, secure, and ship with confidence.