Skip to content

Deployment and operations

Use a stable release, Node.js 22+, and MySQL for production. Pin the target version and keep its configuration and upgrade records for future maintenance.

终端窗口
cp .env.example .env
# Set BAILING_ENV=production, a random BAILING_TOKEN, MySQL, and model configuration
npm ci
npm run db:init
npm run admin:create -- admin
npm start

The public installer deploys the current stable distribution:

终端窗口
curl -fsSL https://www.bailinghub.com/install.sh | sh
Area Requirement
Environment Inject secrets from environment variables or a secret manager
Database Run every pending migration; never edit an applied migration
Administrator Bootstrap only an empty admin table; rotate initial credentials
Health Use /health; use /version to verify application and contract versions
Audit retention BAILING_AUDIT_RETENTION_DAYS=0 means no automatic deletion
Rate limits Use the MySQL-backed ledger for consistent multi-instance semantics
Callbacks Trace delivery failures and retain polling by job_id
Diagnostics Export one redacted job trace, not a full database or live secrets
  1. Read the target release notes and compatibility guide;
  2. back up the database and deployment configuration;
  3. run pending migrations and verify the migration ledger;
  4. verify /health, /version, console login, and a harmless task;
  5. resume traffic and observe queues, errors, and tool calls.

When upgrading from v0.8.0 to v0.9.0, apply pending migrations 063 and 064 through npm run db:init. Earlier versions also need preceding migrations. The migrator uses the ledger to run unapplied files; service startup does not migrate automatically.

See the fixed v0.9.0 Operations guide and Compatibility guide.