Railway

Deploy Multica

Self-hosted Multica with OpenCode and persistent PG Vector storage.

Deploy Multica

Just deployed

Just deployed

/app/data

Just deployed

/var/lib/postgresql

Deploy and Host Multica on Railway

Deploys Multica as three Railway services:

  • Backend — builds the Multica Go server and CLI. The runtime image includes OpenCode 1.18.23, Git, and persistent daemon/workspace state under /app/data.
  • Frontend — builds the Next.js web application from Dockerfile.web.
  • PG Vector — runs pgvector/pgvector:pg17 with persistent PostgreSQL storage.

The Backend volume is mounted at /app/data; the PG Vector volume is mounted at /var/lib/postgresql. After deployment, connect with railway ssh and run multica daemon start when you want to operate a daemon. OpenCode credentials and daemon state are stored on the Backend volume.

About Hosting

Railway hosts the Multica web application, API, daemon runtime, and PostgreSQL-compatible vector database as managed services. Public domains are provisioned automatically, while service-to-service traffic uses Railway's private network.

Why Deploy

This template provides a reproducible self-hosted Multica installation with persistent backend state, database storage, healthchecks, and an OpenCode-enabled backend image.

Common Use Cases

  • Run a private Multica workspace for engineering or operations teams.
  • Connect a manually started Multica daemon to the hosted Backend.
  • Keep uploads, OpenCode credentials, workspaces, and PostgreSQL data across redeployments.

Dependencies for Multica

Deployment Dependencies

  • A Railway account and a workspace with permission to create services and volumes.
  • Generated PostgreSQL, JWT, and VCS secret values during deployment.
  • OpenCode provider credentials configured after connecting to the Backend with railway ssh.

Required environment variables

Railway may ask for values that are intentionally not embedded in the template. Use generated values for passwords and secrets.

# PG Vector
POSTGRES_DB=multica
POSTGRES_USER=multica
POSTGRES_PASSWORD=

# Backend
ALLOW_SIGNUP=true
APP_ENV=production
CORS_ALLOWED_ORIGINS=https://${{Frontend.RAILWAY_PUBLIC_DOMAIN}}
DATABASE_URL=postgres://${{PG Vector.POSTGRES_USER}}:${{PG Vector.POSTGRES_PASSWORD}}@${{PG Vector.RAILWAY_PRIVATE_DOMAIN}}:5432/${{PG Vector.POSTGRES_DB}}?sslmode=disable
FRONTEND_ORIGIN=https://${{Frontend.RAILWAY_PUBLIC_DOMAIN}}
JWT_SECRET=
MULTICA_APP_URL=https://${{Frontend.RAILWAY_PUBLIC_DOMAIN}}
MULTICA_DAEMON_SERVER_URL=https://${{RAILWAY_PUBLIC_DOMAIN}}
MULTICA_DATABASE_CONNECT_TIMEOUT=5s
MULTICA_DATABASE_STARTUP_TIMEOUT=3m
MULTICA_OPENCODE_PATH=/usr/local/bin/opencode
MULTICA_PUBLIC_URL=https://${{RAILWAY_PUBLIC_DOMAIN}}
MULTICA_SERVER_URL=https://${{RAILWAY_PUBLIC_DOMAIN}}
MULTICA_VCS_INTEGRATION_ENABLED=true
MULTICA_VCS_SECRET_KEY=
PORT=8080

# Frontend
HOSTNAME=0.0.0.0
NODE_ENV=production
PORT=3000
RAILWAY_DOCKERFILE_PATH=/Dockerfile.web
REMOTE_API_URL=http://${{Backend.RAILWAY_PRIVATE_DOMAIN}}:8080

The template creates public service domains automatically. The Backend healthcheck is /healthz, and the Frontend healthcheck is /.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
116
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
3
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
64