Skip to content

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:

ComponentCheck
Docker Enginedocker info
Docker Compose v2 (plugin)docker compose version
curlcurl --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:

bash
# Debian / Ubuntu
apt-get update
apt-get install -y curl ca-certificates

2. Installing Docker Engine and Compose v2 ​

The official Docker script installs Engine and the Compose plugin in one command:

bash
curl -fsSL https://get.docker.com | sh

Verify:

bash
docker info
docker compose version

The 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:

bash
usermod -aG docker "$USER"
# then a new SSH session / newgrp docker

Alternative: 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.

bash
curl -fsSL https://storage.unishift.ru/services/prod/install.sh | bash

install.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:

bash
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/unishift

The 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):

bash
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 bash

After installation the public address is changed like this (secrets in .env are untouched):

bash
ush platform update --public-host 203.0.113.10
ush platform update --public-host app.example.com --public-scheme https
Variable / flagPurposeDefault
INSTALL_DIR / --dirWhere to install/opt/unishift
BASE_URL / --base-urlWhere to download files from…/services/prod
REGISTRY / --registryImage registryleggnom
TAG / --tagImage taglatest
PUBLIC_HOST / --public-hostPublic IP/domain (for UI and WebSocket)localhost
PUBLIC_SCHEME / --public-schemehttp or httpshttp
WEB_BASE_URL / --web-base-urlWeb client URLderived from PUBLIC_* (see below)
CENTRIFUGO_WS_URL / --centrifugo-ws-urlWebSocket URL for the browserderived from PUBLIC_* (see below)
CENTRIFUGO_ALLOWED_ORIGINS / --centrifugo-allowed-originsFrontend origin (space-separated)derived from PUBLIC_* (see below)

How URLs are assembled when not set explicitly:

PUBLIC_SCHEMEWEB_BASE_URLCENTRIFUGO_WS_URL
http (default)http://HOST:18080ws://HOST:18100/connection/websocket
httpshttps://HOSTwss://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.

SecretPurpose
DB_PASSWORDPostgreSQL password
JWT_SECRETSigning of JWT and Centrifugo tokens
SESSION_SECRETSession signing
ENCRYPTION_KEYEncryption key for Env Manager and Notifications SMTP passwords (base64 of 32 bytes)
SERVICE_TOKENInter-service calls
CENTRIFUGO_API_KEYCentrifugo server HTTP API
SEARXNG_SECRETSearXNG secret
MINIO_ROOT_PASSWORDMinIO 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.

ServiceHost portEnv
Web client (unishift_client_web)18080CLIENT_PORT
Concierge SPA (unishift_concierge_web)18081CONCIERGE_WEB_PORT
Gateway18090GATEWAY_PORT
Auth18091AUTH_PORT
Spaces18092SPACES_PORT
Documents18093DOCUMENTS_PORT
Command Manager18094COMMAND_MANAGER_PORT
Scheduler18095SCHEDULER_PORT
Storage18096STORAGE_PORT
Env Manager18097ENV_MANAGER_PORT
Flow Manager18099FLOW_MANAGER_PORT
Centrifugo18100CENTRIFUGO_PORT
AI Router18101AI_ROUTER_PORT
Task Tracker18102TASK_TRACKER_PORT
Notifications18103NOTIFICATIONS_PORT
MCP Gateway18104MCP_GATEWAY_PORT
Data Tables18105DATA_TABLES_PORT
Concierge API18106CONCIERGE_PORT
Messaging18107MESSAGING_PORT
Collatio18108COLLATIO_PORT
Guard18110GUARD_PORT
Notebooks18111NOTEBOOKS_PORT
Content Extract18112CONTENT_EXTRACT_PORT
Proxy Manager (API / forward proxy)18114 / 18115PROXY_MANAGER_PORT / FORWARD_PROXY_PORT
Voice18116VOICE_PORT
SearXNG18088SEARXNG_PORT
Spark Grid18087SPARK_GRID_PORT
PostgreSQL15432POSTGRES_PORT
NATS (client / monitoring)14222 / 18222NATS_PORT / NATS_MONITOR_PORT
MinIO (API / console)19010 / 19011MINIO_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:

text
WebSocket connection to 'ws://localhost:18100/connection/websocket' failed

fix the public address and recreate the stack:

bash
ush platform update --public-host 203.0.113.10

Port 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:

env
LOG_LEVEL=info    # debug | info | warn | error | fatal | panic
LOG_FORMAT=json   # text | json

Management ​

The default directory is /opt/unishift (--dir if different):

bash
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 backup

Flag reference: ush platform --help.

Backup and restore ​

To snapshot databases and storage before updates or a migration:

bash
ush platform backup                         # saves to unishift-backup-<timestamp>.tar.gz

To move servers or roll data back:

bash
ush platform restore unishift-backup-*.tar.gz --yes

Stack 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:

bash
ush platform doctor

What is checked:

  • Docker: the docker binary, the docker compose v2 plugin and daemon permissions/access.
  • Host ports: all 28 standard platform ports — one variable per service in .env (including NATS_MONITOR_PORT and MINIO_CONSOLE_PORT; DATA_TABLES_PORT is 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 .env exists, 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 health status of postgres and minio, 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.

FileModel nameCapability
littlelamb-planner.gguflittlelamb-plannerplanner
littlelamb-diagram.gguflittlelamb-diagramdiagram
littlelamb-fill.gguflittlelamb-fillfill
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.

bash
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 list

The 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:

bash
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 ​

bash
ush platform update

The 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:

env
TAG=0.0.3
bash
ush platform up

Migrations ​

The installer runs them automatically. To run manually (for example after pulling images with new migrations):

bash
ush platform migrate

The 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:

bash
ush platform down --volumes     # DESTROYS volumes: DB, MinIO files, NATS data

After 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:

bash
ush platform doctor

The command shows the current health status of postgres and minio and lists failed services.

Permission denied on /docker-entrypoint-initdb.d ​

In postgres logs:

text
ls: cannot open directory '/docker-entrypoint-initdb.d/': Permission denied

and 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.

bash
chmod -R a+rX /opt/unishift/postgres /opt/unishift/centrifugo /opt/unishift/searxng
ush platform down --volumes
ush platform migrate
ush platform up

Healthcheck 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:

bash
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):

bash
ush platform down --volumes
ush platform update