OpenVibe.Live/Docs
Source on GitHub

Deploying OpenVibe.Live#

deploy/scripts/deploy.sh decides what a change needs and does the least disruptive thing.

sudo /opt/openvibe.live/deploy/scripts/deploy.sh              # deploy origin/main if it moved
sudo /opt/openvibe.live/deploy/scripts/deploy.sh --wait-idle  # hold a restart until nobody is live
sudo /opt/openvibe.live/deploy/scripts/deploy.sh --rollback   # release layout: previous release
DRY_RUN=1 /opt/openvibe.live/deploy/scripts/deploy.sh         # print the plan only

What each kind of change costs#

Files changedActionInterruption
docs/, public/ (JS, CSS, HTML, fragments, images)files switched in place; the running server re-reads documents and re-hashes assets within ~2 snone — no restart
README, tests, scriptsfiles switchednone
server/, vendor/, package.json dependenciesrestart, gated on GET /api/readynew HTTP connections queue on the systemd socket; established WebSocket, WHIP, WebRTC and RTMP sessions drop and reconnect
package-lock.jsonnpm ci before anything is interrupted (release layout: into the new release)as server
server/db/migrations.js, schema.sqlonline SQLite backup to data/backups/, then restartas server
deploy/systemd/units installed, daemon-reload, restartas server
deploy/nginx/not installed — the live nginx config is managed separately (see below); the script prints a noticenone

Socket activation (deploy/systemd/openvibe-live.socket) protects new HTTP connections during a restart. It does not keep existing WebSockets, RTMP publishers, WHIP sessions or mediasoup UDP flows. Clients reconnect with jittered backoff and show "OpenVibe is updating" / "Reconnected" (ovConnectionPill in public/js/app.js). Use --wait-idle when someone is streaming.

Layouts#

Legacy (current production): /opt/openvibe.live is a git checkout. Static-only changes no longer restart. A rollback resets the checkout but cannot restore previous node_modules.

Release layout (set up once with deploy/scripts/migrate-to-releases.sh, one restart):

/opt/openvibe.live/repo                 git clone used to create releases
/opt/openvibe.live/releases/<time>-<sha> worktree + its own node_modules + data -> ../../shared/data
/opt/openvibe.live/current              -> releases/<id>   (atomic rename)
/opt/openvibe.live/shared/data          live.db, analytics.db, uploads (never copied or reset)
/opt/openvibe.live/data                 -> shared/data     (old absolute DB_PATH values keep working)

test/deploy-sim.test.js runs the script against a simulated host (real git, fake systemctl) and checks each of these behaviours.

Assets and caching#

nginx#

deploy/nginx/openvibe.live.conf is what production runs; it was identical to /etc/nginx/sites-enabled/openvibe.live.conf on 2026-09-17. OpenVibe.Network's generator (server/deploy/nginx-generator.js) now carries the same WHIP/ingest hostnames, connection budgets, static cache, gzip and log format for Live, enforced by that repo's test/nginx-generator-live.test.js. Apply nginx changes by hand: copy the file, nginx -t, systemctl reload nginx.

Checks#

npm test                         # unit, security, migrations, deploy simulation, size budgets
BASE=http://127.0.0.1:3000 npm run test:browser   # needs a running server and Chrome
deploy/scripts/post-deploy-check.sh                # on the host after a deploy

This page is rendered from docs/deploy.md in the OpenVibe.Live repository. Found a mistake? Edit it there.