---
title: "Deploy n8n AI Agent Starter (Self-Hosted)"
description: "Self-hosted n8n starter for AI agents, webhooks & persistent workflows."
category: "Automation"
url: https://railway.com/deploy/n8n-ai-agent-starter-self-hosted
---

# Deploy n8n AI Agent Starter (Self-Hosted)

Self-hosted n8n starter for AI agents, webhooks & persistent workflows.

**[Deploy n8n AI Agent Starter (Self-Hosted) on Railway](https://railway.com/template/n8n-ai-agent-starter-self-hosted)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/n8n-ai-agent-starter-self-hosted/manifest.json

- **Creator:** tunguyen1993's Projects
- **Category:** Automation

## Template content

### n8n https://devicons.railway.com/i/n8n.svg

- **Image:** n8nio/n8n:1.123.100
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host n8n AI Agent Starter (Self-Hosted) on Railway

n8n AI Agent Starter is a production-ready, self-hosted workflow automation and AI agent orchestration engine powered by the official `n8nio/n8n:1.123.100` Docker image. Pre-configured with HTTPS webhook routing, persistent storage at `/home/node/.n8n`, automatic 32-byte credential encryption, and `/healthz` healthchecks, it deploys in one click with zero manual wiring.

## About Hosting n8n AI Agent Starter (Self-Hosted)

Hosting n8n on Railway eliminates reverse-proxy setup, TLS certificate management, and Docker volume permission issues. This template binds `N8N_HOST` and `WEBHOOK_URL` directly to your generated Railway HTTPS domain, generates a unique `N8N_ENCRYPTION_KEY` via `${{secret(32)}}`, mounts a persistent volume at `/home/node/.n8n` with `RAILWAY_RUN_UID=0` and `N8N_USER_FOLDER=/home/node` so workflows and credentials survive redeploys cleanly, and disables telemetry by default. For companion self-hosted AI automation stacks and Docker setups, see [vn-ai-vps-stack](https://github.com/tunguyen1993/vn-ai-vps-stack) and our AI-first workflow TCO reference at [workflowcost.earnviral.com/llms.txt](https://workflowcost.earnviral.com/llms.txt).

## Common Use Cases

- Building multi-step AI agent pipelines with LangChain nodes, OpenAI/Anthropic/Gemini APIs, and tool calling
- Receiving production HTTPS webhooks from Stripe, GitHub, Slack, Telegram, Discord, or custom SaaS apps
- Running scheduled ETL jobs, CRM synchronizations, and internal developer automations with full data ownership

## Dependencies for n8n AI Agent Starter (Self-Hosted) Hosting

- Official `n8nio/n8n:1.123.100` container image (port `5678`, `/healthz` healthcheck)
- Railway Persistent Volume mounted at `/home/node/.n8n` for SQLite workflow state and encrypted credentials

### Implementation Details

- **Public HTTPS Webhooks**: `N8N_HOST=${{RAILWAY_PUBLIC_DOMAIN}}` and `WEBHOOK_URL=https://${{RAILWAY_PUBLIC_DOMAIN}}/` are pre-wired to Railway's HTTP proxy on port `5678`.
- **Volume Permissions**: `RAILWAY_RUN_UID=0` and `N8N_USER_FOLDER=/home/node` prevent `EACCES` permission errors on mounted Railway volumes.
- **Privacy Defaults**: `N8N_DIAGNOSTICS_ENABLED=false` and `N8N_PERSONALIZATION_ENABLED=false` are enabled out of the box.

## Why Deploy n8n AI Agent Starter (Self-Hosted) on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying n8n AI Agent Starter (Self-Hosted) on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/n8n-ai-agent-starter-self-hosted
