Deploy Nacos
Nacos 3.3 service discovery and config center with MySQL, auth on
Just deployed
/home/nacos/data
MySQL
Just deployed
/var/lib/mysql
Deploy and Host Nacos on Railway
Nacos is Alibaba's open-source platform for service discovery, dynamic configuration and service management, now also an AI agent and MCP registry. Microservices register with it and read their configuration from it, and you manage namespaces, configs, services and users in its web console.
About Hosting Nacos
This template runs Nacos 3.3.0 in standalone mode with Railway MySQL as its store. On every start, a small script applies the MySQL schema that ships with the image, waits for the database, and on the first boot creates the nacos admin from a generated password, so nobody can claim the console before you. Token signing key and server identity are generated per deploy. Nacos's embedded Raft data (persistent service instances) lives on a volume. The console is served on the public domain; clients use port 8848 and gRPC 9848 over the private network. Nacos needs about 1 GB of RAM.
Common Use Cases
- Service registry for Spring Cloud Alibaba, Dubbo, Go or Python microservices
- Central, versioned configuration with live push to running applications
- Registry for MCP servers, AI agents and prompts
Dependencies for Nacos Hosting
- Nacos server, built from the template's GitHub repo (official image pinned by digest)
- MySQL (Railway's MySQL service) for configs, users and history
Deployment Dependencies
Implementation Details
Services:
- Nacos: console on the public domain, health check
/v3/console/health/readiness, volume on/home/nacos/data. - MySQL: Railway MySQL with a volume; holds every config, namespace, user and role.
After deploy: open the public URL and sign in as nacos with the NACOS_ADMIN_PASSWORD value from the Nacos service's Variables tab. Point clients inside the project at ${{Nacos.RAILWAY_PRIVATE_DOMAIN}}:8848 with a user you create in the console.
Memory: Nacos uses about 600 MB at idle, so give the service at least 1 GB. It does not run within the 0.5 GB per-service limit of Railway's Free plan. To give it more memory, raise the service's RAM and set NACOS_JVM_XMX (default 256m).
Updates: the Nacos service builds from aalfath/nacos-railway-template. When we bump the pinned version, Railway shows you an "update available" notice and you choose when to apply it; read the repo's CHANGELOG.md first.
Why Deploy Nacos 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 Nacos 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
MySQL
mysql:8