n8n is the fastest-growing open-source workflow automation platform — a self-hosted alternative to Zapier and Make.com that runs entirely on your own infrastructure. Deploying n8n on a Hong Kong VPS positions your automation engine at the crossroads of East and West internet infrastructure: low latency to mainland Chinese APIs (WeChat, Alipay, Baidu, TikTok), fast connections to global SaaS services, and full data sovereignty over your workflow data.
For Asia-Pacific businesses automating cross-border processes — order notifications from Chinese platforms, social media monitoring, payment reconciliation, AI-powered content workflows — a Hong Kong n8n server is a uniquely practical infrastructure choice.
Prerequisites
- A Hong Kong VPS with at least 2 vCPU and 2 GB RAM (4 GB recommended for AI-node workflows)
- Docker and docker-compose installed (see our Docker setup guide)
- A domain name with DNS pointing to your VPS
Step 1: Deploy n8n with Docker Compose
mkdir -p /home/deploy/n8n
cd /home/deploy/n8n
nano docker-compose.ymlversion: '3.8'
services:
n8n:
image: n8nio/n8n:latest
container_name: n8n
restart: unless-stopped
ports:
- "127.0.0.1:5678:5678" # Bind to localhost only — Nginx proxies externally
environment:
# Basic configuration
- N8N_HOST=n8n.yourdomain.com
- N8N_PORT=5678
- N8N_PROTOCOL=https
- WEBHOOK_URL=https://n8n.yourdomain.com/
# Security
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=${N8N_PASSWORD}
# Database — use PostgreSQL for production (more reliable than SQLite)
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=n8n
- DB_POSTGRESDB_USER=n8n
- DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
# Timezone for Asia
- GENERIC_TIMEZONE=Asia/Hong_Kong
- TZ=Asia/Hong_Kong
# Execution settings
- EXECUTIONS_PROCESS=main
- N8N_LOG_LEVEL=info
volumes:
- n8n_data:/home/node/.n8n
depends_on:
- postgres
postgres:
image: postgres:15-alpine
container_name: n8n_postgres
restart: unless-stopped
environment:
- POSTGRES_USER=n8n
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=n8n
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
n8n_data:
postgres_data:nano .envN8N_PASSWORD=choose_a_strong_password
POSTGRES_PASSWORD=choose_a_strong_db_passwordchmod 600 .env
docker compose up -d
docker compose logs -f n8nStep 2: Configure Nginx Reverse Proxy with SSL
nano /etc/nginx/sites-available/n8nserver {
listen 80;
server_name n8n.yourdomain.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name n8n.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/n8n.yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/n8n.yourdomain.com/privkey.pem;
# n8n requires WebSocket support for the editor
location / {
proxy_pass http://127.0.0.1:5678;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Longer timeouts for workflow execution
proxy_read_timeout 300s;
proxy_send_timeout 300s;
}
# Webhook endpoint — no authentication required (n8n handles auth internally)
location /webhook {
proxy_pass http://127.0.0.1:5678;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
client_max_body_size 50M;
}ln -s /etc/nginx/sites-available/n8n /etc/nginx/sites-enabled/
certbot --nginx -d n8n.yourdomain.com --email your@email.com --agree-tos --no-eff-email
nginx -t && systemctl reload nginxStep 3: Access and Initial Setup
Navigate to https://n8n.yourdomain.com and log in with the credentials from your .env file. On first access, n8n prompts you to create an owner account — complete this setup before sharing the URL.
Step 4: Asia-Pacific Workflow Examples
Example A: Telegram Bot with AI Response
n8n’s visual workflow for a Telegram bot that uses your self-hosted Ollama LLM:
- Telegram Trigger node — receives messages from your Telegram bot
- HTTP Request node — calls
https://ai.yourdomain.com/v1/chat/completionswith the message as prompt - Telegram node — sends the LLM response back to the user
This creates a fully self-hosted AI Telegram bot with zero per-message API costs and no data leaving your infrastructure.
Example B: WooCommerce Order → WeChat Notification
- Webhook node — receives WooCommerce order webhook
- IF node — filters for orders above a threshold value
- HTTP Request node — calls WeChat Work (企业微信) API to send notification
- MySQL node — logs order to your CRM database
Example C: Daily News Summary with AI
- Schedule Trigger — runs daily at 07:00 HKT
- RSS Feed Read node — fetches headlines from multiple sources
- Code node — concatenates headlines into a prompt
- HTTP Request node — sends to Ollama for Chinese-language summary
- Email Send node — delivers summary to distribution list
Step 5: Production Hardening
Enable n8n encryption for stored credentials
Add to your .env file:
N8N_ENCRYPTION_KEY=your_32_character_encryption_key_hereGenerate a key: openssl rand -hex 16
Set execution data pruning
# Add to .env — prevents database bloat from execution history
EXECUTIONS_DATA_PRUNE=true
EXECUTIONS_DATA_MAX_AGE=336 # Keep 14 days of execution historyRestrict editor access by IP
# In Nginx config, restrict the main editor to your IP
# But keep /webhook open for external integrations
location / {
allow YOUR_HOME_IP;
deny all;
proxy_pass http://127.0.0.1:5678;
# ... other proxy settings
}
location /webhook {
# Open to all — n8n handles webhook authentication
proxy_pass http://127.0.0.1:5678;
}Updating n8n
cd /home/deploy/n8n
docker compose pull n8n
docker compose up -d
docker compose logs -f n8nConclusion
Self-hosted n8n on a Hong Kong VPS is the most flexible and cost-effective automation platform for Asia-Pacific businesses — connecting Chinese platform APIs (WeChat, Alipay, Douyin) with global SaaS services, AI inference endpoints, and internal databases from a single visual workflow interface, with all data under your control.
Deploy your n8n automation server on Server.HK’s Hong Kong VPS plans — the CN2 GIA routing and NVMe SSD storage provide the reliable, low-latency foundation your automation workflows require.
Frequently Asked Questions
Is n8n free to self-host?
n8n’s community edition is free and open-source for self-hosting with no workflow or execution limits. The cloud-hosted n8n.io service has usage-based pricing. Self-hosting on a VPS gives you unlimited workflows and executions at the cost of the VPS itself — typically $10–20/month for a capable instance.
How much RAM does n8n need on a Hong Kong VPS?
n8n itself runs comfortably in 512 MB of RAM for light workloads. With PostgreSQL and for workflows that process large data sets or run AI inference calls, 2–4 GB of RAM provides comfortable headroom. The AI workflow nodes that call external LLM APIs are I/O-bound rather than RAM-bound — the RAM requirement is for n8n’s in-process data handling, not the AI model itself.
Can n8n connect to WeChat and Alipay APIs from a Hong Kong VPS?
Yes. WeChat Work API (企业微信), WeChat Pay API, and Alipay API are all accessible from a Hong Kong VPS with low latency. Use n8n’s HTTP Request node to call these APIs directly, or use community-contributed n8n nodes for WeChat and Alipay if available in the n8n Community Node registry.