Skip to content

Command line

Three command line surfaces: the launcher for source installs, the on-premises binary for the portable bundle, and the update script for Docker deployments.

For a source install. plugboard below means node scripts/plugboard.mjs.

CommandDoes
plugboard setupCreate .env with generated JWT_SECRET, SECRETS_MASTER_KEY and other secrets
plugboard migrateApply pending database migrations
plugboard seedLoad the fictional demo data
plugboard startMigrate, then start the API and web
FlagEffect
--skip-migrateDo not run migrations
--no-buildSkip the build. Use in production, where it already happened
--workerAlso start the Redis-backed worker

A production service definition normally uses start --no-build, so a restart is fast and cannot fail on a compilation error.

Platform
WindowsPlugboard.cmd
macOS and Linux./plugboard.sh
Eitherpnpm setup, pnpm start
CommandDoes
pnpm installInstall dependencies
pnpm infra:upPostgreSQL, Redis and MinIO via Docker
pnpm db:migrateApply migrations
pnpm db:seedLoad demo data
pnpm devAPI on 4000, web on 3000, worker, all with hot reload

For the portable bundle. ./plugboard on macOS and Linux, plugboard.cmd on Windows.

CommandDoes
plugboard install-serviceRegister with the platform so it starts at boot
plugboard uninstall-serviceRemove the registration. Data is left alone
plugboard service-statusAsk the platform how it is doing
plugboard update --checkIs there a newer release? Change nothing
plugboard updateDownload and stage it now
Platform
WindowsDouble-click Start-Plugboard.cmd
macOS and Linux./start-plugboard.sh
FlagEffect
--user someoneThe account the Linux service runs as

Requires elevation: sudo on Linux and macOS, an elevated shell on Windows.

For Docker deployments. Also what we run on managed hosting.

Terminal window
./scripts/plugboard-update.sh 0.2.0
FormDoes
plugboard-update.sh <version>Update to that version, or roll back to it
plugboard-update.sh <sha256:digest>Update to a pinned digest
plugboard-update.sh <version> --dry-runCheck the stack and pull the image, changing nothing

The script prints the rollback command at the end of every successful run, so the way back is always in your scrollback.

See updating.

Terminal window
# Start
docker compose --env-file .env -f docker-compose.prod.yml up -d
# With an ingress profile
docker compose --env-file .env -f docker-compose.prod.yml --profile caddy up -d
docker compose --env-file .env -f docker-compose.prod.yml --profile tunnel up -d
# What is running
docker compose -f docker-compose.prod.yml ps
# Logs
docker compose -f docker-compose.prod.yml logs -f api
# A database shell
docker compose -f docker-compose.prod.yml exec postgres psql -U plugboard
# A manual dump
docker compose -f docker-compose.prod.yml exec postgres \
pg_dump -U plugboard -Fc plugboard > backups/manual.dump
# Stop, keeping data
docker compose -f docker-compose.prod.yml down
# Stop and delete the database volume. Destructive
docker compose -f docker-compose.prod.yml down -v
Terminal window
pnpm install
node scripts/package-bundle.mjs # uses your Node
node scripts/package-bundle.mjs --with-node --archive # embeds Node, makes an archive

The release workflow runs exactly this per operating system on every v* tag.

Terminal window
# Portable bundles, against the checksum beside the download
sha256sum -c plugboard-linux-x64.tar.gz.sha256
# Container images
cosign verify ghcr.io/samiossoftware/plugboard@sha256:1a2b3c... \
--certificate-identity-regexp '^https://github.com/samiossoftware/plugboard/' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
cosign download attestation ghcr.io/samiossoftware/plugboard@sha256:1a2b3c...
Terminal window
curl -s https://helpdesk.yourschool.org/api/health/version
curl -s https://helpdesk.yourschool.org/api/health/ready

Both answer without a tenant and without a database, so they still work when nothing else does.