Pre-release. bakelite is unreleased and still under active testing — docs and behaviour may change without notice.

Install & deploy

bakelite ships as a single fully-static Linux binary (~9 MB, no runtime dependencies) for amd64 and arm64, distributed as a signed apt repository and a .deb/.tar.gz per release. Linux is the only supported platform; elsewhere, build from source.

Quick install

curl -fsSL https://bakelite.duggan.ie/install.sh | sudo sh

On Debian/Ubuntu this adds the signed apt repository and installs the package; on other Linux it installs the static binary tarball. Either way you get the binary, an example config at /etc/bakelite/bakelite.toml, and a systemd unit (installed but not enabled — you finish configuring it below). Run bakelite --version and you should get a version line back. On anything other than Linux the script stops with an "unsupported platform" error.

Track bleeding-edge builds of main instead of stable releases:

curl -fsSL https://bakelite.duggan.ie/install.sh | BAKELITE_CHANNEL=dev sudo -E sh

To uninstall: curl -fsSL https://bakelite.duggan.ie/uninstall.sh | sudo sh.

Guided setup

When you run the installer on a terminal it offers to launch the setup wizard right away — or run it yourself any time:

sudo bakelite init

bakelite init walks you through picking a recipe, writes a validated config, optionally generates an at-rest encryption key and a chmod 600 credentials file, sets the systemd unit's ReadWritePaths= for you (the one thing that otherwise trips people up), and finishes by running doctor to confirm it all works. It's safe to re-run; every step is confirmed and nothing is overwritten without asking.

For CI or unattended installs there's a non-interactive path — scaffold a recipe's starter config without prompting (the installer also never prompts when piped or when BAKELITE_NONINTERACTIVE=1 is set):

sudo bakelite init --recipe s3 --yes      # writes /etc/bakelite/bakelite.toml to edit

The Recipes page lists the available scenarios. Prefer to wire everything up by hand? See Configure & run by hand under Advanced.

Start the daemon

Once bakelite init has written the config and set the unit's ReadWritePaths=, enable the daemon:

sudo systemctl enable --now bakelite
journalctl -u bakelite -f          # watch it bootstrap + back up

One daemon covers every database on the host: it replicates each one as its owner, so apps running as different users need no extra setup. To set the unit up by hand or understand what it does, see Operations → The daemon.

Recommended next: enable the scheduled verification & liveness timers (shipped disabled) so you're paged when a backup stops or goes stale, and a real restore is exercised on a schedule — see Operations → Scheduled verification and liveness.

Verify

bakelite status --config /etc/bakelite/bakelite.toml          # what the daemon is doing now
bakelite list   --config /etc/bakelite/bakelite.toml          # configured databases
bakelite list   --config /etc/bakelite/bakelite.toml --db app # that database's restore points

A healthy daemon is silent — it wakes only when the WAL changes. bakelite status is the quickest health check and flags a daemon that has died or gone stale.

Advanced

The one-line installer and bakelite init cover the happy path. These are the non-default routes: adding the repo by hand, an air-gapped tarball, wiring up the config without the wizard, and building from source.

apt repository (manual)

If you'd rather add the repo yourself instead of piping a script:

curl -fsSL https://bakelite.duggan.ie/gpg | sudo gpg --dearmor -o /usr/share/keyrings/bakelite.gpg
echo "deb [signed-by=/usr/share/keyrings/bakelite.gpg] https://bakelite.duggan.ie/apt stable main" \
  | sudo tee /etc/apt/sources.list.d/bakelite.list
sudo apt-get update && sudo apt-get install bakelite

Pin an exact version with sudo apt-get install bakelite=0.1.0. Use the dev suite in the source line for bleeding-edge builds.

Tarball / GitHub Releases

Every release publishes .deb and .tar.gz for amd64 and arm64 to bakelite.duggan.ie/releases/ (e.g. bakelite-<ver>-linux-amd64.tar.gz) — handy for air-gapped installs or baking into a container image of your own (no image is published). A copy is attached to the GitHub Release for provenance, but the public download source is R2.

Configure & run by hand

bakelite init automates all of this. To wire it up without the wizard, point bakelite at your databases and a backend, then add credentials:

sudoedit /etc/bakelite/bakelite.toml        # set each [[database]].path + the backend
# S3 creds. The apt/.deb package ships the example at the path below; the static
# tarball doesn't — just create /etc/bakelite/bakelite.env yourself.
sudo cp /usr/share/bakelite/bakelite.env.example /etc/bakelite/bakelite.env
sudo chmod 600 /etc/bakelite/bakelite.env   # (skip for file backends)

bakelite reads /etc/bakelite/bakelite.env itself at startup (not just under systemd), so the same file covers the daemon and interactive CLI use — see Environment variables for the full set and load order, and Configuration for every option.

Then set the unit's ReadWritePaths= and enable it. Operations → The daemon walks through it and the enable --now step.

Build from source

For contributors or an unsupported target, build the static binary yourself (needs Docker) and install it manually:

./scripts/build-linux.sh
# -> target/x86_64-unknown-linux-musl/release/bakelite  (static, stripped, ~9 MB)
scp target/x86_64-unknown-linux-musl/release/bakelite USER@HOST:/tmp/bakelite
ssh USER@HOST 'sudo install -m 0755 /tmp/bakelite /usr/local/bin/bakelite && bakelite --version'

Then create /etc/bakelite/{bakelite.toml,bakelite.env} and install dist/bakelite.service as in Configure & run by hand above. Deployment templates live in dist/.

Other platforms (macOS, the BSDs) are unsupported. cargo build --release -p bakelite may work there, but nothing is tested and there's no service integration.