Railway

Deploy Velix API

Self-hosted multi-instance WhatsApp REST API for messaging & automation

Deploy Velix API

Just deployed

/data

Just deployed

/data

/var/lib/postgresql/data

Deploy and Host Velix API on Railway 🚀

Velix API is an open-source, self-hosted WhatsApp REST API solution that enables multi-instance WhatsApp management (Dokploy Docs).

What is Velix API?

Velix API is an open-source, self-hosted WhatsApp REST API solution designed for multi-instance WhatsApp management. It allows developers and businesses to programmatically send and receive messages, manage multiple phone numbers, listen to webhooks, and integrate with automation tools like n8n and Chatwoot without incurring per-message API fees.

About Hosting Velix API

Hosting and deploying Velix API involves running a lightweight Docker container image (GitHub Container Registry) connected to a PostgreSQL database for multi-instance metadata and a Redis instance for session caching, queues, and rate-limiting. A persistent storage volume mounted to /data is essential to preserve local WhatsApp session state files (/data/instances) and uploaded media (/data/media) across container restarts. Deploying Velix API requires setting key environment variables including DATABASE_URL, REDIS_URL, JWT_SECRET, and exposing HTTP port 8080. With modern PaaS platforms like Railway (Railway), developers can provision the app container, database, and Redis in a single unified project canvas without manually configuring VPS networks, SSL certificates, or server firewalls.

Common Use Cases

  • 📱 Multi-Instance WhatsApp Automation: Manage multiple WhatsApp Business accounts from a single backend API for customer support, marketing campaigns, and transactional messaging.
  • 🤖 Chatbot & AI Agent Integration: Connect WhatsApp directly to n8n workflows, Typebot, or custom AI agents to handle automated customer inquiries 24/7.
  • 💬 Omnichannel Customer Support: Integrate WhatsApp message streams with Chatwoot or custom CRM software to enable support teams to collaborate on customer conversations.

Dependencies for Velix API Hosting

  • 🐘 PostgreSQL: Stores persistent application metadata, instance configurations, and user authentication records.
  • Redis: Manages fast in-memory session caching, message queueing, and rate-limiting across instances.
  • 💾 Persistent Volume (/data): Retains WhatsApp session keys (/data/instances) and uploaded media (/data/media).

Deployment Dependencies

Implementation Details

The Railway template architecture provisions three linked services directly on the Railway project canvas:

1. Service: velix-api
  • Image: ghcr.io/paulolinder/velix-api:0.1.0
  • Volume Mount: /data
  • Environment Variables:
PORT=8080
HTTP_PORT=8080
APP_ENV=production
LOG_LEVEL=info
DATABASE_URL=${{Postgres.DATABASE_URL}}
REDIS_URL=${{Redis.REDIS_URL}}
JWT_SECRET=${{secret(64)}}
MEDIA_STORAGE_PATH=/data/media
ENGINE_STORE_PATH=/data/instances
ENGINE_AUTO_RECONNECT=true
ENGINE_MAX_INSTANCES=200
REGISTRATION_ENABLED=false
2. Service: Postgres
  • Image: ghcr.io/railwayapp-templates/postgres (Railway Postgres Template)
  • Volume Mount: /var/lib/postgresql/data
3. Service: Redis
  • Image: redis:8.2.1
  • Volume Mount: /data

⚖️ Comparison with Similar Platforms

WhatsApp API Solution Comparison

Feature / AspectVelix APIEvolution APIOfficial WhatsApp Cloud API
ArchitectureLightweight REST APIDual-Engine (Baileys + Cloud API)Meta Cloud Infrastructure
Cost / Pricing100% Free / Self-hosted100% Free / Self-hostedPaid per conversation (Meta pricing)
Multi-Instance SupportSupportedSupportedRequires WABA Business Accounts
Resource FootprintLow / EfficientModerate to HighManaged by Meta
Integrationsn8n, Chatwoot, WebhooksTypebot, Chatwoot, Dify, OpenAICustom Webhooks & Meta Partners
Setup ComplexitySimple & StraightforwardModerate to HighHigh (Meta Verification required)

Hosting Infrastructure Comparison

Feature / AspectRailway PaaSTraditional VPS (Dokploy / Coolify)
Deployment Method1-Click Railway CanvasDocker Compose / Manual Script
Infrastructure ManagementFully ManagedSelf-Managed (OS, Firewall, Backups)
SSL & NetworkingAutomatic HTTPS & Private Service MeshManual Reverse Proxy (Traefik / Caddy)
ScalingInstant Vertical & Horizontal ScalingManual VPS Resizing / Load Balancing
Maintenance BurdenZero maintenance requiredRequires ongoing OS & security patching

Why Deploy Velix API 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 Velix API 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.


Template Content

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
120
View Template
Evolution API with n8n
[Jul'26] WhatsApp automation platform using Evolution API, n8n & PostgreSQL

codestorm
60
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
868