Installing the services
Deploying the Unishift Platform prod stack from ready-made images. The ush CLI downloads the configuration from storage.unishift.ru, generates all secrets itself, runs migrations and brings the services up.
Requirements
The server must have:
| Component | Check |
|---|---|
| Docker Engine | docker info |
| Docker Compose v2 (plugin) | docker compose version |
| curl | curl --version (only for the install.sh bootstrap) |
The user running the installation must have access to the docker daemon (be in the docker group or run as root).
The installer checks for Docker itself and stops with a clear error if something is missing (for example: docker is required but was not found in PATH). A clean VPS does not have Docker yet — prepare the server first.
How much hardware you need
CPU, RAM and disk requirements for a given number of users, and placement schemes for single and multi-node setups, are described in the platform docs (sizing and reference architectures).
Preparing a clean VPS
The guide targets a fresh Linux server (Ubuntu / Debian and similar). You need root or sudo rights.
1. Basic utilities
curl is usually already there. If not:
# Debian / Ubuntu
apt-get update
apt-get install -y curl ca-certificates2. Installing Docker Engine and Compose v2
The official Docker script installs Engine and the Compose plugin in one command:
curl -fsSL https://get.docker.com | shVerify:
docker info
docker compose versionThe daemon must answer without errors. If docker exists but docker info complains about permissions — either work as root, or add your user to the group and log in again:
usermod -aG docker "$USER"
# then a new SSH session / newgrp dockerAlternative: distribution repository packages
Instead of get.docker.com you can install packages manually following the official guide for your distribution. You need at least docker-ce, docker-ce-cli, containerd.io and docker-compose-plugin (the docker compose command, not the separate docker-compose v1).
After verifying Docker, continue with the quick install below.
Quick install
One command installs the ush CLI (if absent) and deploys the stack: files, secrets, migrations, containers.
curl -fsSL https://storage.unishift.ru/services/prod/install.sh | bashinstall.sh is only a bootstrap. The stack is then managed by ush platform; bash scripts are not placed into the installation directory.
On a clean VPS without Docker the command fails — do the server preparation first.
If ush is already in PATH:
ush platform install
ush platform install --public-host 203.0.113.10
ush platform install --public-host app.example.com --public-scheme https
ush platform install --dir /srv/unishiftThe default directory is /opt/unishift. It holds docker-compose.yaml, configs (postgres/, centrifugo/, searxng/) and the generated .env.
The same parameters can be passed as bash variables during bootstrap (not in the curl part):
curl -fsSL https://storage.unishift.ru/services/prod/install.sh \
| PUBLIC_HOST=203.0.113.10 bash
curl -fsSL https://storage.unishift.ru/services/prod/install.sh \
| PUBLIC_HOST=app.example.com PUBLIC_SCHEME=https bash
curl -fsSL https://storage.unishift.ru/services/prod/install.sh \
| INSTALL_DIR=/srv/unishift bashAfter installation the public address is changed like this (secrets in .env are untouched):
ush platform update --public-host 203.0.113.10
ush platform update --public-host app.example.com --public-scheme https| Variable / flag | Purpose | Default |
|---|---|---|
INSTALL_DIR / --dir | Where to install | /opt/unishift |
BASE_URL / --base-url | Where to download files from | …/services/prod |
REGISTRY / --registry | Image registry | leggnom |
TAG / --tag | Image tag | latest |
PUBLIC_HOST / --public-host | Public IP/domain (for UI and WebSocket) | localhost |
PUBLIC_SCHEME / --public-scheme | http or https | http |
WEB_BASE_URL / --web-base-url | Web client URL | derived from PUBLIC_* (see below) |
CENTRIFUGO_WS_URL / --centrifugo-ws-url | WebSocket URL for the browser | derived from PUBLIC_* (see below) |
CENTRIFUGO_ALLOWED_ORIGINS / --centrifugo-allowed-origins | Frontend origin (space-separated) | derived from PUBLIC_* (see below) |
How URLs are assembled when not set explicitly:
PUBLIC_SCHEME | WEB_BASE_URL | CENTRIFUGO_WS_URL |
|---|---|---|
http (default) | http://HOST:18080 | ws://HOST:18100/connection/websocket |
https | https://HOST | wss://HOST/connection/websocket |
For https the installer assumes a reverse proxy on 443 (UI and Centrifugo on the same host). If the ports differ — set WEB_BASE_URL, CENTRIFUGO_WS_URL and CENTRIFUGO_ALLOWED_ORIGINS explicitly.
What gets deployed
The full set of platform modules plus infrastructure. Monitoring (Prometheus and exporters) is not part of prod — it exists only in the dev stack (devops/dev).
Modules (25): client, concierge_web, gateway, auth, spaces, documents, task-tracker, notifications, messaging, collatio, concierge, mcp-gateway, command-manager, scheduler, storage, env-manager, flow-manager, spark-grid, ai-router, guard, notebooks, content-extract, nats-bridge, proxy-manager, voice — 23 Go services and two web fronts.
Data Tables, Dashboards and Data Catalog are not yet in the prod services.yaml catalog (they work in the dev stack devops/dev).
Infrastructure: postgres, nats, minio (+ a one-time minio-init job), centrifugo, searxng.
LLM inference is not part of the stack: the address and model name are set by a provider in AI Router — see Local models.
The stack runs under the project name unishift-prod — network, volumes and containers are isolated from other environments on the same machine.
Secrets
The installer generates them once and writes them to INSTALL_DIR/.env with 600 permissions. Re-running the installer does not touch them.
| Secret | Purpose |
|---|---|
DB_PASSWORD | PostgreSQL password |
JWT_SECRET | Signing of JWT and Centrifugo tokens |
SESSION_SECRET | Session signing |
ENCRYPTION_KEY | Encryption key for Env Manager and Notifications SMTP passwords (base64 of 32 bytes) |
SERVICE_TOKEN | Inter-service calls |
CENTRIFUGO_API_KEY | Centrifugo server HTTP API |
SEARXNG_SECRET | SearXNG secret |
MINIO_ROOT_PASSWORD | MinIO password |
Back up the .env
Losing ENCRYPTION_KEY makes unreadable every value stored in Env Manager. Changing DB_PASSWORD on an already initialized DB breaks data access. Copy INSTALL_DIR/.env to a safe place after installation.
Ports
Published in the 1xxxx range to avoid clashing with other environments.
| Service | Host port | Env |
|---|---|---|
Web client (unishift_client_web) | 18080 | CLIENT_PORT |
Concierge SPA (unishift_concierge_web) | 18081 | CONCIERGE_WEB_PORT |
| Gateway | 18090 | GATEWAY_PORT |
| Auth | 18091 | AUTH_PORT |
| Spaces | 18092 | SPACES_PORT |
| Documents | 18093 | DOCUMENTS_PORT |
| Command Manager | 18094 | COMMAND_MANAGER_PORT |
| Scheduler | 18095 | SCHEDULER_PORT |
| Storage | 18096 | STORAGE_PORT |
| Env Manager | 18097 | ENV_MANAGER_PORT |
| Flow Manager | 18099 | FLOW_MANAGER_PORT |
| Centrifugo | 18100 | CENTRIFUGO_PORT |
| AI Router | 18101 | AI_ROUTER_PORT |
| Task Tracker | 18102 | TASK_TRACKER_PORT |
| Notifications | 18103 | NOTIFICATIONS_PORT |
| MCP Gateway | 18104 | MCP_GATEWAY_PORT |
| Data Tables | 18105 | DATA_TABLES_PORT |
| Concierge API | 18106 | CONCIERGE_PORT |
| Messaging | 18107 | MESSAGING_PORT |
| Collatio | 18108 | COLLATIO_PORT |
| Guard | 18110 | GUARD_PORT |
| Notebooks | 18111 | NOTEBOOKS_PORT |
| Content Extract | 18112 | CONTENT_EXTRACT_PORT |
| Proxy Manager (API / forward proxy) | 18114 / 18115 | PROXY_MANAGER_PORT / FORWARD_PROXY_PORT |
| Voice | 18116 | VOICE_PORT |
| SearXNG | 18088 | SEARXNG_PORT |
| Spark Grid | 18087 | SPARK_GRID_PORT |
| PostgreSQL | 15432 | POSTGRES_PORT |
| NATS (client / monitoring) | 14222 / 18222 | NATS_PORT / NATS_MONITOR_PORT |
| MinIO (API / console) | 19010 / 19011 | MINIO_PORT / MINIO_CONSOLE_PORT |
The env name of the web client port is CLIENT_PORT (not CLIENT_WEB): the image is unishift_client_web, the host-port variable is CLIENT_PORT.
The Data Tables row (18105) is a reserved .env variable: the service is not yet in the prod catalog, the port is not occupied.
The Guard NER sidecar is not part of the prod stack and is not published outward: inside the docker network it listens on 8111 (same as Notebooks, but those are different containers — no conflict). When running manually outside compose, publish any free host port.
WebSocket and remote access
The browser connects to Centrifugo directly at the address from CENTRIFUGO_WS_URL (the gateway serves it in /api/v1/services). A value of ws://localhost:18100/... only works when the UI is open on the same machine where the stack runs.
If the browser console shows:
WebSocket connection to 'ws://localhost:18100/connection/websocket' failedfix the public address and recreate the stack:
ush platform update --public-host 203.0.113.10Port 18100 must be open on the firewall (or Centrifugo must sit behind a reverse proxy with wss://). CENTRIFUGO_ALLOWED_ORIGINS must match the page Origin (scheme + host + port of the UI).
Separately: the interactive terminal and ush connect go through wss://HOST/proxy/command-manager/... (not Centrifugo). On the reverse proxy for location / (or /proxy/) you need proxy_http_version 1.1, Upgrade/Connection and a long proxy_read_timeout — otherwise the handshake returns 400 Bad Request and the UI reports "Agent is offline". An example is in the reference architecture docs.
Logging
Prod defaults to LOG_LEVEL=error and LOG_FORMAT=text — only errors reach the logs, as plain text (not JSON). For debugging raise the level in .env:
LOG_LEVEL=info # debug | info | warn | error | fatal | panic
LOG_FORMAT=json # text | jsonManagement
The default directory is /opt/unishift (--dir if different):
ush platform update # files from storage + migrate + up -d
ush platform update --public-host <IP>
ush platform upgrade # refresh images of installed services
ush platform services # table: direction, status, image
ush platform ps # service status
ush platform logs -f # logs in real time
ush platform logs -f auth # logs of a single service
ush platform config show # .env with masked secrets
ush platform enable guard # enable a service (+ dependencies)
ush platform down # stop the stack (volumes survive)
ush platform up # bring it back up
ush platform migrate # migrations and the MinIO bucket only
ush platform doctor # self-diagnostics: Docker, ports, secrets, DB
ush platform backup # full backup of Postgres, MinIO and .env
ush platform restore <archive> --yes # restore from a backupFlag reference: ush platform --help.
Backup and restore
To snapshot databases and storage before updates or a migration:
ush platform backup # saves to unishift-backup-<timestamp>.tar.gzTo move servers or roll data back:
ush platform restore unishift-backup-*.tar.gz --yesStack self-diagnostics (doctor)
The most common causes of a failed ush platform install are a broken Docker daemon, port conflicts with services already running on the server, a damaged .env with empty secrets, or database initialization failures.
The diagnostic tool checks all of these points:
ush platform doctorWhat is checked:
- Docker: the
dockerbinary, thedocker compose v2plugin and daemon permissions/access. - Host ports: all 28 standard platform ports — one variable per service in
.env(includingNATS_MONITOR_PORTandMINIO_CONSOLE_PORT;DATA_TABLES_PORTis reserved). If a port is taken by a foreign process (nginx, system postgres, etc.), the command prints the exact port name and variable. If the port is taken by a container of the current Unishift stack, the status counts as valid (PASS). - Secrets: when
.envexists, all 8 mandatory generated secrets are checked for being non-empty (DB_PASSWORD,JWT_SECRET,SESSION_SECRET,ENCRYPTION_KEY,SERVICE_TOKEN,CENTRIFUGO_API_KEY,SEARXNG_SECRET,MINIO_ROOT_PASSWORD), and drift of the remaining keys is reported. - DB and containers: the
healthstatus ofpostgresandminio, plus any crashed or failed services.
ush platform install runs the Docker and port checks automatically in preflight mode before downloading images and configs.
Local models
The prod stack contains no Ollama and no llama.cpp. The address and model name are set only by a provider: Settings → AI Router → Model providers (/settings/ai-router/providers).
Ready GGUF files: storage.unishift.ru/models.
| File | Model name | Capability |
|---|---|---|
littlelamb-planner.gguf | littlelamb-planner | planner |
littlelamb-diagram.gguf | littlelamb-diagram | diagram |
littlelamb-fill.gguf | littlelamb-fill | fill |
littlelamb.gguf | — | original checkpoint, not imported at runtime |
Download the file to a machine where Ollama already runs and import it there. The platform does not start this process.
curl -fL -o littlelamb-planner.gguf \
https://storage.unishift.ru/models/littlelamb-planner.gguf
printf 'FROM %s\n' "$PWD/littlelamb-planner.gguf" > Modelfile
ollama create littlelamb-planner -f Modelfile
ollama listThe same for littlelamb-diagram.gguf and littlelamb-fill.gguf: the model name equals the file name without .gguf.
One provider per capability: vendor ollama, empty key, base URL — the address of this Ollama (native API, no /v1 suffix), model field — the name from ollama list. Chat is a separate record with the chat capability and the same base URL.
If the base URL is on a private network, that is fine for vendor ollama. For vendor openai pointed at the same address you need ALLOW_PRIVATE_PROVIDER_URLS=true (already enabled in prod-compose) and a base URL with the /v1 suffix.
There is no decision model in this catalog. If a readout is needed, llama.cpp runs separately from the stack. Provider: capability decision, vendor llamacpp, base URL of that server, empty key. If decision tokens in the GGUF are marked as CONTROL, runtime/models/patch_gguf.py patches them before the run: only metadata of 256 tokens changes, weights are untouched, re-running is safe.
An installed stack without ush
On installations where /opt/unishift contains update.sh / migrate.sh:
curl -fsSL https://storage.unishift.ru/cli/install.sh | bash
ush platform update --public-host <IP>The old scripts in the directory can be removed — the CLI does not call them.
Updating
ush platform updateThe command downloads the current docker-compose.yaml and configs, runs migrations and does docker compose up -d. Service images are tagged latest with pull_policy: always — up pulls the fresh build. Infrastructure (postgres, nats, minio, centrifugo) is pinned to specific versions and is not re-downloaded.
Pin a version
To fix services to a specific version instead of latest, set TAG in .env and restart:
TAG=0.0.3ush platform upMigrations
The installer runs them automatically. To run manually (for example after pulling images with new migrations):
ush platform migrateThe command starts postgres and minio, creates the bucket and runs the migrations of the 19 services with a database (auth, spaces, documents, command-manager, scheduler, storage, env-manager, flow-manager, spark-grid, ai-router, task-tracker, notifications, mcp-gateway, messaging, collatio, concierge, guard, notebooks, proxy-manager) one by one. Each run goes through a one-off container that cleans up after itself.
Reinstall from scratch
Data volumes survive down. To delete the data too:
ush platform down --volumes # DESTROYS volumes: DB, MinIO files, NATS dataAfter that the next up makes PostgreSQL run the init scripts again and create empty databases — you will need another ush platform migrate.
If migrations fail with postgres is unhealthy
Run self-diagnostics first:
ush platform doctorThe command shows the current health status of postgres and minio and lists failed services.
Permission denied on /docker-entrypoint-initdb.d
In postgres logs:
ls: cannot open directory '/docker-entrypoint-initdb.d/': Permission deniedand status Restarting (2). On a VPS with umask 077, the postgres/init directory is created as 700 root:root, while the process inside the container runs as uid 999 and cannot read it.
chmod -R a+rX /opt/unishift/postgres /opt/unishift/centrifugo /opt/unishift/searxng
ush platform down --volumes
ush platform migrate
ush platform upHealthcheck does not make it on first start
On a cold start Postgres creates a dozen databases (init scripts). If the healthcheck is too short, the container is marked unhealthy and *-migrate fails with dependency failed to start.
Diagnostics:
ush platform ps
ush platform logs --tail 80 postgres
docker inspect "$(cd /opt/unishift && docker compose ps -q postgres)" --format '{{json .State.Health}}'Recovery (the .env with secrets survives, only volumes are destroyed):
ush platform down --volumes
ush platform update