Skip to content

Deployment & releases ​

Linux host networking for discovery ​

The default Compose deployment keeps bridge networking. For LAN discovery on Linux, add the host-network override with Docker Compose 2.24 or newer:

sh
docker compose -f compose.production.yaml -f compose.host.yaml up -d

For a local source build, use compose.yaml instead of compose.production.yaml and add --build. Keep using the same Compose project and data volume when changing networking.

Host networking removes the port mapping and binds the application directly to DASHBOARD_PORT (3000 by default). Keep APP_ORIGIN aligned with the browser address. The host firewall must allow the dashboard TCP port and printer announcements on UDP 1990/2021, including multicast group 239.255.255.250. No additional container capabilities are required.

This override is intended for native Linux Docker. Docker Desktop, routed VLANs, guest Wi-Fi, and access-point isolation can prevent announcements from reaching the backend. Run Bun directly on a host on the printer LAN or configure an explicit network relay if multicast is unavailable. Publishing a UDP port through a Docker bridge alone does not guarantee discovery.

The existing bridge deployment remains supported; configure the printer IP manually when needed. Discovery failure does not erase a saved profile.

GitHub setup ​

The repository is Ripwords/BambuDeck. Its GitHub Actions workflows validate changes, publish Docker images, and deploy documentation to https://ripwords.github.io/BambuDeck/.

In Settings → Secrets and variables → Actions, create:

SecretValue
DOCKERHUB_USERNAMEDocker Hub account with push access to ripwords/bambudeck.
DOCKERHUB_TOKENDocker Hub access token with permission to push that repository.

Create the public ripwords/bambudeck repository on Docker Hub. Enter credentials directly into GitHub's secret fields; do not commit them or paste them into issue discussions.

In Settings → Pages, choose GitHub Actions as the build source. Pages deploys the documentation; it does not host the dashboard server or connect to printers. BambuDeck itself runs on your Docker host.

Workflows ​

TriggerResult
Pull request or push to mainValidate Conventional Commits, formatting, linting, typecheck, and build the app and documentation. No automated tests.
Push to mainPublish documentation through GitHub Pages.
Push a stable vX.Y.Z tagPublish AMD64/ARM64 Docker images with version tags and latest.
Push a prerelease version tagPublish a versioned preview image without replacing latest.
Manually run Docker publishingPublish the development edge image.

After publishing a version tag, the workflow creates a GitHub Release with a version-pinned compose.production.yaml and SHA256SUMS. Download those assets when you want a deployment file tied to that release.

Docker builds use Buildx and a shared build cache. Credentials are supplied through GitHub Actions secrets. Review the workflow run before deploying a newly published tag.

Publish a release ​

Commit changes with Conventional Commit messages and merge into main. Husky validates formatting, linting, and commit messages locally; CI validates commit messages and PR titles.

sh
git switch main
git pull --ff-only
bun run release --dry-run
bun run release --minor

The release command checks the working tree, verifies local main matches origin/main, runs format/lint/type/build checks, and uses changelogen to update CHANGELOG.md and the package version. It then creates a release commit and annotated tag and pushes both atomically. Use --patch, --minor, or --major; these are literal increments, including before version 1.0. GitHub Actions creates release notes from the matching changelog section after publishing the image.

Use the next version for subsequent releases. Stable tags publish the exact version plus moving minor, major, and latest tags. Pin deployments to an exact version for predictable upgrades. Prerelease tags such as v0.2.0-rc.1 remain opt-in.

If publishing fails, fix the underlying configuration and rerun the failed workflow. Avoid reusing an already published release tag for changed code.

Upgrade and rollback ​

Back up your data first. Set the desired tag in .env:

dotenv
BAMBUDECK_VERSION=0.1.0

Then pull and recreate the service:

sh
docker compose -f compose.production.yaml pull
docker compose -f compose.production.yaml up -d
docker compose -f compose.production.yaml ps
docker compose -f compose.production.yaml logs --tail=100 dashboard

Open the dashboard and confirm your printer connection. These commands preserve the named data volume.

To roll back, change BAMBUDECK_VERSION to the previous version and repeat the commands. If a release changed the storage format, restore its matching pre-upgrade backup as well; older images may not understand newer data.

latest follows stable releases. edge follows manually published development builds and is intended for preview use.

Backup and restore ​

Back up all of /data, including bambudeck.sqlite, any SQLite sidecar files, and secret.key. If you supply APP_ENCRYPTION_KEY, preserve that value separately. Keep backups private.

For a consistent copy, stop the service briefly:

sh
mkdir -p backup
docker compose -f compose.production.yaml stop dashboard
docker compose -f compose.production.yaml cp dashboard:/data/. ./backup/
docker compose -f compose.production.yaml start dashboard

Use a fresh backup directory for each backup. If copying fails, restart the stopped service and resolve the error before relying on that backup.

To restore onto a fresh deployment with an empty data volume:

sh
docker compose -f compose.production.yaml create dashboard
docker compose -f compose.production.yaml cp ./backup/. dashboard:/data/
docker compose -f compose.production.yaml run --rm --user 0 --entrypoint chown dashboard -R 1000:1000 /data
docker compose -f compose.production.yaml up -d

Restore the original external encryption key before starting if you used one. Do not mix files from different backups or copy a backup over a running database.

Validate locally ​

sh
bun install --frozen-lockfile
bun run typecheck
bun run build
bun run docs:build
docker compose build
docker compose up -d
docker compose ps

The runtime image includes Bun and FFmpeg, runs as a nonroot user, and exposes a healthcheck at /api/health. Successful builds and healthchecks do not establish real printer compatibility; see Verification.