Ladderback
Ladderback runs rustic backups as a service on each machine you back up, with a web UI built in. In the web UI you make plans: what to back up, into which repository, how often, and how long to keep its snapshots. Ladderback runs them on their schedule, catches up on a run the machine slept through, and shows each backup’s progress and result. You restore a file or a folder from the same web UI.
This guide is in two parts. Using Ladderback is for everyone: install it, then do everything else in the web UI.
- Install: the recommended way for each system, each on a page that installs, updates and removes Ladderback; starting it, and where it keeps your files.
- Getting started: from a fresh install to a first scheduled backup, and a test restore that proves it works.
Advanced is for people at home in a terminal, and for those who already use rustic. It links to the technical design for how each part works.
- Other ways to install: what the install script does, the release’s archive by hand, cargo-binstall and building from source.
- Docker image: running Ladderback in a container, which isn’t supported yet, and what it can’t do there.
- Running as a service: running Ladderback in a terminal, the service, updating without interrupting a backup, and what macOS’s keychain and code signing ask.
- Plans in config.toml: the configuration file, a whole example plan, and importing a rustic profile.
- Moving a repository’s password out of config.toml: the system keyring, a password file or an environment variable.
- Sign-in and remote access: setting an admin password,
--listenand--allowed-host, and TLS behind a reverse proxy. - API tokens and AI agents: which permissions to give a program or an AI agent, and what AI agents may do without a token.
The README has what Ladderback does today and what comes next.
Install Ladderback
Ladderback runs on each computer it backs up. Each system has one recommended way to install it, and its page says how to install, update and remove Ladderback that way:
- Debian, Ubuntu, Raspberry Pi OS and Fedora: Debian 12 or newer, Ubuntu 22.04 or newer, 64-bit Raspberry Pi OS and Fedora install the release’s
.debor.rpmpackage. - Other Linux: any other 64-bit Linux uses the install script, which downloads the release and checks it.
- macOS: the install script builds the release on your Mac, signed with your own certificate so that macOS keeps its permissions from one update to the next.
Linux means 64-bit (x86_64 or aarch64) with glibc 2.35 or newer: 32-bit ARM and musl distributions such as Alpine aren’t supported, and neither is Windows. A hub for several computers isn’t in a release yet. Once Ladderback is installed and started, Getting started takes you to a first backup in the web UI. Other ways to install, such as the release’s archive by hand or a build from source, and the Docker image, which isn’t a supported way to run Ladderback yet, are in the Advanced part.
Start Ladderback
Run this as yourself, not under sudo:
ladderback install-service
It runs Ladderback in the background from each login on, and starts it now. Open http://127.0.0.1:9898 in your browser for the web UI, and go on with Getting started.
On Linux, a user’s services stop when the user logs out: unless yours may already keep running, the command says to run loginctl enable-linger, which lets them. Running as a service has the details, how to stop it, and how to give it a proxy.
Where Ladderback keeps your files
Apart from the program itself, Ladderback keeps everything in your home folder:
- Settings (repositories, plans and notifications):
~/.config/ladderbackon Linux,~/Library/Application Support/ladderbackon macOS. - Data (the operation history, the admin password and this machine’s ID):
~/.local/share/ladderbackon Linux,~/Library/Application Support/ladderbackon macOS. - Cache, which holds nothing Ladderback needs:
~/.cache/ladderbackon Linux,~/Library/Caches/ladderbackon macOS.
On Linux, the settings folder appears once you first save a setting. On macOS the service logs to ~/Library/Logs/ladderback.log.
What removing leaves behind
Each system’s page says how to remove Ladderback: stop its service with ladderback remove-service, then remove the program. That leaves your files in place, so that installing Ladderback again picks up where you left off, and so that removing a program never costs you a backup:
- Your backups. Each repository, with every snapshot in it, stays where it is. Ladderback never deletes a repository, and the
rusticprogram still opens it with its password. - Ladderback’s folders, in the table above.
- Passwords in the keyring. A repository’s password, or a notification’s token, that you kept in the system keyring (the keychain on macOS) stays there, under the name
ladderback. - Linger, on Linux. If you ran
loginctl enable-lingerfor Ladderback alone,loginctl disable-lingerundoes it. - A proxy you gave the service. On Linux, delete
~/.config/systemd/user/ladderback.service.d, which holds it. On macOS,launchctl unsetenveach variable, and remove the launch agent of your own that sets them at each login (Running as a service).
Before you delete anything more, keep each repository’s password somewhere safe if you want its backups: without the password nobody can read a repository, and the settings folder or the keyring may be the only place it is. Then, to remove Ladderback’s own files too:
# Linux:
rm -rf ~/.config/ladderback ~/.local/share/ladderback ~/.cache/ladderback
# macOS:
rm -rf ~/Library/Application\ Support/ladderback ~/Library/Caches/ladderback ~/Library/Logs/ladderback.log
Windows and WSL2
Windows isn’t supported. Ladderback runs inside WSL2 as a Linux install, for files inside WSL, installed as the page for that Linux says. It isn’t a way to back up Windows: WSL stops when idle, so scheduled backups don’t run unless something keeps it running, and files under /mnt/c are read without shadow copies or Windows metadata (ACLs, attributes, alternate data streams), so open files may fail and a restore to Windows loses that metadata. ladderback install-service needs systemd, which WSL starts when /etc/wsl.conf has systemd=true under [boot], as Ubuntu from wsl --install already does. Ladderback hasn’t been tried in WSL2 on a real machine yet (#528).
Sections that moved
Links from older releases lead here.
macOS: Full Disk Access
Granting Full Disk Access is on Install on macOS.
By hand
Building Ladderback from source by hand, and the tools the build needs, is in the Advanced part: Other ways to install, By hand.
Docker image (not supported yet)
The Docker image, which isn’t yet a supported way to install and run Ladderback, has a page of its own in the Advanced part: Docker image.
Install on Debian, Ubuntu, Raspberry Pi OS or Fedora
On Debian 12 or newer, Ubuntu 22.04 or newer, 64-bit Raspberry Pi OS and Fedora, install the release’s .deb or .rpm package: your package manager then knows the program, and removes it with its usual command.
Download, check and install
From 0.5.0, each release has a .deb for Debian and Ubuntu and an .rpm for Fedora, for x86_64 and aarch64, with their checksums in a SHA256SUMS file. Download the package for your computer, check it, and install it; VERSION is the release’s, such as 0.5.0:
VERSION=0.5.0
base="https://github.com/nledford/Ladderback/releases/download/v$VERSION"
# Debian, Ubuntu, Raspberry Pi OS (amd64 or arm64):
deb="ladderback_${VERSION}_$(dpkg --print-architecture).deb"
curl -fL -O "$base/$deb" -O "$base/SHA256SUMS"
sha256sum -c --ignore-missing SHA256SUMS
sudo apt install "./$deb"
# Fedora (x86_64 or aarch64):
rpm="ladderback-${VERSION}-1.$(uname -m).rpm"
curl -fL -O "$base/$rpm" -O "$base/SHA256SUMS"
sha256sum -c --ignore-missing SHA256SUMS
sudo dnf install "./$rpm"
sha256sum must print …: OK; anything else, such as FAILED, means the download is damaged or isn’t the release’s, so don’t install it. The packages are not signed, so the checksum is the check, and dnf warns that it skipped its OpenPGP checks. The ./ matters to apt, which otherwise looks for a package of that name in its repositories. On 32-bit Raspberry Pi OS dpkg --print-architecture says armhf, the download fails with a 404, and there is no package for it. On Atomic Fedora (Bazzite) a package needs rpm-ostree layering: use the install script there.
The package puts ladderback at /usr/bin/ladderback and starts nothing: start Ladderback next. If Ladderback is already installed another way, move that install to the package instead.
Updating
There is no apt or dnf repository yet, so apt upgrade and dnf upgrade don’t see a new release. When the web UI’s header says a new version is available, or the releases page lists one, run the commands above again with the new VERSION: the package manager replaces the version you have. Then run ladderback install-service again, which restarts Ladderback on the new release.
Removing
Stop Ladderback and remove its service first, as yourself, since removing the package doesn’t stop a service you installed for your own user. Then remove the package:
ladderback remove-service
# Debian, Ubuntu, Raspberry Pi OS:
sudo apt remove ladderback
# Fedora:
sudo dnf remove ladderback
Your settings, history and backups stay where they are, and so does anything in your home folder, which no package touches: What removing leaves behind lists it, and how to delete it too.
Install on other Linux
On any other 64-bit Linux with glibc 2.35 or newer, such as Arch Linux, openSUSE or Atomic Fedora (Bazzite), the install script installs Ladderback. One command downloads the newest release, checks it against the release’s checksums, and installs ladderback into ~/.cargo/bin, asking nothing:
curl -fsSL https://raw.githubusercontent.com/nledford/Ladderback/main/scripts/install.sh | bash
When it finishes, the script names the version it installed and what to run next. If it says to open a new terminal, or that your PATH doesn’t lead to ladderback, do that first, putting ~/.cargo/bin on your PATH, or the next command isn’t found. If it says that nothing answers for a Secret Service, Ladderback can’t read passwords from the system keyring until you start one, such as GNOME Keyring or KWallet; Getting started keeps a repository’s password in the configuration file on Linux, which needs none.
Then start Ladderback.
The install script in detail, in the Advanced part, says how to read the script before it runs, what it checks, and its options, such as --from-source, which builds the release on your computer instead of downloading it. Where the release has no download for your system, the script builds from source by itself, which needs build tools the same page lists. To download and check the release’s archive yourself, see Download a release.
Updating
Run the same command again: it installs the newest release over the one you have. Then run ladderback install-service again, which restarts Ladderback on the new release. The web UI’s header says when a new version is available.
Removing
Stop Ladderback and remove its service, then the program:
ladderback remove-service
rm ~/.cargo/bin/ladderback
If the script built Ladderback from source, it also left the source in ~/.local/share/ladderback/source, inside Ladderback’s data folder, and the build tools it installed: Rust, through rustup, and just and trunk in ~/.cargo/bin. Remove those only if nothing else uses them: rustup self uninstall removes Rust and the whole ~/.cargo folder, with any other program installed there.
Your settings, history and backups stay where they are: What removing leaves behind lists them, and how to delete them too.
Install on macOS
On macOS the install script builds the newest release on your Mac, since releases have no download for macOS yet, and signs it with a certificate you make once, so that macOS keeps its permissions from one update to the next. The build takes a while.
Signing your build
Sign the build with a certificate from your own keychain, so that macOS sees every update as the same program and keeps its Full Disk Access and Photos permissions. No Apple Developer account is needed. Make the certificate once:
- In Keychain Access, choose Keychain Access → Certificate Assistant → Create a Certificate. Give it a name, such as
Ladderback Code Signing, set Identity Type to Self Signed Root and Certificate Type to Code Signing, and create it. It goes into your login keychain. - Open the new certificate, expand Trust, and set Code Signing to Always Trust.
- Check that macOS lists it as valid:
security find-identity -v -p codesigningnames it.
Run the install script
The script asks once before it installs the build tools it can install by itself: Rust, through rustup, and just and trunk. A C compiler, git and Node.js 26 or newer it never installs: it names the missing ones with the command that installs them, and stops without changing anything. Name your certificate in the command:
curl -fsSL https://raw.githubusercontent.com/nledford/Ladderback/main/scripts/install.sh | LADDERBACK_SIGN_IDENTITY="Ladderback Code Signing" bash
The first signing asks whether codesign may use the key: choose Always Allow, and later installs don’t ask. Without LADDERBACK_SIGN_IDENTITY the build is signed ad hoc, and after every update macOS drops its Full Disk Access, without a word, and asks again for Photos: until you grant Full Disk Access again, backups can’t read the folders they protect. Running as a service has what signing changes and what to do when it fails, and The install script in detail how to read the script before it runs, and its options.
When it finishes, the script says what to run next. If it says to open a new terminal, or that your PATH doesn’t lead to ladderback, do that first, or the next command isn’t found. Then grant Full Disk Access, below, and start Ladderback.
Full Disk Access and Photos
macOS lets a program read your Documents, Desktop, Photos and other protected folders only with your permission. Grant the installed ladderback Full Disk Access by hand, in System Settings → Privacy & Security → Full Disk Access, so that it can back them up: press +, then in the file dialog press ⌘⇧G and type ~/.cargo/bin/ladderback, where the install script puts it. A signed build keeps the permission through updates; an unsigned one loses it with each update, so then grant it again after each one.
The first time a backup reads your Photos library, macOS may ask whether ladderback may use Photos. Allow it. Left unanswered while nobody is at the Mac, the question leaves that backup without those files; declined, macOS doesn’t ask again, and later backups leave them out until you turn ladderback on in System Settings → Privacy & Security → Photos.
From macOS 27.3, System Settings may offer to grant access to some folders only, or to ask each time. Grant access to the whole disk: Ladderback backs up on a schedule, when nobody is there to answer, and how it fares with the other kinds hasn’t been tested yet (#940). With some folders only, its start page may say that Full Disk Access is missing even while backups of those folders succeed.
Updating
Run the same command again, with LADDERBACK_SIGN_IDENTITY again, then run ladderback install-service again, which restarts Ladderback on the new release. The web UI’s header says when a new version is available.
A repository whose password is in the keychain needs one more answer after an update: run ladderback check-keyring in a terminal. Before each read it says which keychain item it reads; macOS may then ask whether ladderback may use that item, in a window that can open behind your other windows. Choose Always Allow. The command waits 5 minutes for your answer. Do it before the next scheduled backup, which otherwise fails while the question waits for an answer. Running as a service says why.
Removing
Stop Ladderback and remove its service, then the program:
ladderback remove-service
rm ~/.cargo/bin/ladderback
The build leaves more behind, each of which you can remove once nothing else needs it:
- the source the script built from, in
~/.local/share/ladderback/source; - the build tools it installed:
rustup self uninstallremoves Rust and the whole~/.cargofolder, just and trunk with it, and any other program installed there; ladderback’s entry under Full Disk Access in System Settings: select it and press −;- the signing certificate, in Keychain Access, if you make no more builds with it.
Your settings, history and backups stay where they are: What removing leaves behind lists them, and how to delete them too.
Getting started
This page takes you from a fresh install to a first backup that runs on its own, and then proves the backup works by restoring a file from it. Everything happens in the web UI. Set aside about ten minutes, plus the time the first backup takes.
You need:
- Ladderback installed and started, and its web UI open in your browser at
http://127.0.0.1:9898; - a folder to keep the backups in, the repository: here a folder on this computer, ideally on another disk, such as an external drive;
- on macOS, Full Disk Access granted to Ladderback, so that it can read every folder you back up.
The links at the top of every page lead to the pages this guide names: Operations, Plans, Snapshots, Repositories and Settings.
1. Create a repository
A repository holds the backups, encrypted with a password you choose. Open the Repositories page and fill in Test, connect or create a repository:
- Name: a short name for it, in lower-case letters, digits and hyphens, such as
external-drive. Your plans use this name. - Location: the full path of the folder, such as
/Volumes/Backup/ladderbackfor an external drive on a Mac or/media/demo/backup/ladderbackon Linux. Leave Hot storage (optional) empty. - Password: the repository’s password. Without it nobody can read the backups, Ladderback and you included, so keep a copy somewhere safe, such as your password manager.
- Where to keep the password: on a Mac, In the system keyring. On Linux, In the configuration file: once started as a service, Ladderback runs before you log in, and can’t read the keyring until you do, so a backup due before then would fail. The Repositories page marks such a password Kept in the configuration file. A password can live in other places too.
- Press Create the repository. The page says The repository was created. and lists the repository.
A repository you create here is maintained from this machine: this machine forgets and prunes its old snapshots, as step 5 shows. If the folder already holds a repository, from rustic or from Ladderback on another computer, press Connect the repository instead. Turn on Maintain this repository from this machine only when no other machine maintains it. Left off, this machine backs up into the repository but never forgets, prunes or checks it, and its Snapshots page says so; Maintain from this machine there turns it on later.
2. Add a plan
A plan says what to back up, into which repository, when, and which backups to keep. Open the Plans page and press Add a plan. The New plan form asks:
- Name: the plan’s name, such as
documents. It labels the plan’s backups and can’t be changed once the plan is saved. - Repository: the name of the repository from step 1. The form fills in the first repository; check it is the one you want.
- What to back up: in Folders to back up, the full path of each folder, one a line, such as
/Users/demo/Documentson a Mac or/home/demo/Documentson Linux. The other fields leave things out: in Leave out folders holding,CACHEDIR.TAGskips the caches that mark themselves with that file. - When to back up: a Cron schedule of five fields: minute, hour, day of the month, month and day of the week, where
*means every one.0 * * * *backs up every hour on the hour, and0 3 * * *each night at 3:00. Left empty, the plan runs only when you start it. - Which snapshots to keep: each backup is a snapshot. Keep one a day for
7, Keep one a week for4and Keep one a month for12keep the newest snapshot of each of the last 7 days, 4 weeks and 12 months. Leave the fields you don’t need empty.
Leave Commands to run empty, and press Save the plan. The page says The plan documents is saved. and lists the plan, with its Next run.
3. Run it now
Open the Operations page and press Start backup of documents. The page lists the backup as it runs, then its Status, Succeeded, and its Result: the snapshot’s short ID, such as 7fddec8d, how many files it read and how much it added to the repository. The first backup reads everything; later ones add only what changed, and are much quicker.
The Operations page is the history: every backup, restore and maintenance run, newest first. A backup that fails says why here.
4. Check the next scheduled run
The start page, behind the Ladderback link at the top, and the Plans page list each plan with its Next run: with 0 * * * *, the next full hour. Ladderback backs up at that time without you, as long as it is running. A run the computer slept through runs once it wakes.
5. Restore a file
A backup you have never restored from is only a promise, so restore one file now:
- Open the Snapshots page and press Snapshots of external-drive, your repository’s name. It lists the snapshots under Plan documents, newest first.
- Choose the snapshot’s ID. Its page shows Folders and files, the tree of what it holds, from the top of the disk:
Userson a Mac,homeon Linux. Open the folders down to a file, and select it. - Press Restore followed by the file’s name. In the dialog, keep Where to restore at Into a new folder, type the snapshot’s short ID the dialog shows into Snapshot ID, or press Copy the ID and paste it, and press Restore.
- The page says Restore of the file finished. Its files are in a new folder inside
ladderback-restorein your home folder, named after the computer, the snapshot and the time. Open the file there and compare it with the original.
A restore into a new folder never touches the original files, and no restore deletes a file. Delete the restored copy once you have checked it.
The same Snapshots page has the repository’s maintenance. Forget snapshots shows which snapshots your plan’s keep policy would remove, and removes nothing until you confirm. Forgetting frees no disk space by itself: Prune unused data does, by marking the data no snapshot uses any more, which a later prune deletes after the wait it names.
6. Turn sign-in on
Until it has an admin password, Ladderback asks nobody to sign in: anyone using this computer can open it, and the start page says so. Open Settings, then its Admin password tab. Type a password of at least 8 characters into New password and New password again, and press Set the admin password. The page says Admin password set. Restart Ladderback to turn sign-in on.
Open the Restart Ladderback tab, press Restart Ladderback, then Restart. From then on the web UI asks for the password. Sign-in and remote access says more, including how to reach Ladderback from another computer.
Known limits
What the web UI can’t do yet:
- Forget and prune don’t run on a schedule yet. Your plan’s keep policy takes effect when you press Forget snapshots on the Snapshots page, and the space comes back when you press Prune unused data, then again after the wait it names. Until you do, the repository only grows.
- Restores into a new folder go into
ladderback-restorein your home folder. The web UI can’t choose another folder;restore-folderin the[agent]table ofconfig.tomlcan (technical design §6.1).
Other ways to install
Install names one recommended way for each system: the release’s .deb or .rpm package where there is one, and the install script elsewhere, since a package manager that knows the program can update and remove it (the design has the reasons). This page has the rest, for contributors, for installing the release’s archive by hand, and for people who already use cargo-binstall: what the install script does and its options, moving to the package, the archive by hand, cargo-binstall and a build by hand. The Docker image, which isn’t a supported way to run Ladderback yet, has a page of its own. Ladderback isn’t published to crates.io, and has no Homebrew tap until a macOS build can be signed and notarized (#344).
Decision 123 says why the packages aren’t signed, and what checks them instead.
The install script in detail
To read the script before it runs, download it, read it, then run it:
curl -fsSL https://raw.githubusercontent.com/nledford/Ladderback/main/scripts/install.sh -o install.sh
less install.sh
bash install.sh
On 64-bit Linux with glibc 2.35 or newer, the script downloads the newest release’s archive and SHA256SUMS, as Download a release does, checks the archive against it, and installs the binary into ~/.cargo/bin, where a build from source goes too, so an update either way replaces the same binary. It needs none of the build’s tools and asks nothing. An archive that doesn’t match its checksum stops it, naming the file, with nothing installed and nothing built instead; a download that stalls or fails stops it too, and it suggests --from-source. Where the release has no archive for the system (macOS, 32-bit or musl systems, a glibc older than 2.35, or a release whose archives aren’t attached yet, in the hour after it is published), or with --from-source, it builds from source and says why.
To build, it checks the tools the build needs, listed under By hand, and installs those that need no administrator rights (rustup, just and trunk) after asking you once. trunk comes from its prebuilt release, checked against the SHA-256 the script pins; only on a system trunk publishes no release for is it built from source, with one build job per 2 GB of free memory.
A download that stalls, finding no connection within 30 s or averaging under 1 KiB/s for 60 s, stops it, after three retries, with a message that says so; a slow one that still moves is left to finish.
Those that need them, a C compiler, git and Node.js 26 or newer, it never installs: it names the missing ones with the command that installs them and stops, and it never runs sudo.
It keeps Ladderback’s source in ~/.local/share/ladderback/source, checks out the newest release, and installs it with just install into ~/.cargo/bin. The command runs the script on main, and the script installs the newest release, not main (decision 79).
Options go after bash -s --:
--from-sourcebuilds from source on Linux too,--yesinstalls the missing tools without asking,--dir <folder>keeps the source elsewhere,- and what follows
--goes tojust install, sobash -s -- -- --root ~/.localinstalls into~/.local/bin; from the archive only--rootapplies.
--help lists them.
Moving an existing install to the package
If ladderback came from the archive, the install script or a build from source, it is in ~/.local/bin or ~/.cargo/bin, and the service names that path:
- remove that binary:
rm ~/.cargo/bin/ladderback(orcargo uninstall ladderback, orrm ~/.local/bin/ladderback), so the shell finds the package’s; - install the package as Install on Debian, Ubuntu, Raspberry Pi OS or Fedora says;
- run
ladderback install-serviceagain, so the unit names/usr/bin/ladderback, not the binary you removed.
Download a release (Linux)
Each release from 0.3.1 on has an archive for x86_64 and one for aarch64 Linux, each holding the ladderback binary with the web UI built in, and a SHA256SUMS file with their checksums. macOS has no archive until it can be signed and notarized (decision 71). Download the archive for your machine and the checksums, check the archive, and install the binary into ~/.local/bin:
target="$(uname -m)-unknown-linux-gnu"
base=https://github.com/nledford/Ladderback/releases/latest/download
curl -fL -O "$base/ladderback-$target.tar.xz" -O "$base/SHA256SUMS"
sha256sum -c --ignore-missing SHA256SUMS
tar -xJf "ladderback-$target.tar.xz"
mkdir -p ~/.local/bin && install -m 755 "ladderback-$target/ladderback" ~/.local/bin/
sha256sum must print ladderback-…tar.xz: OK; anything else means the download is damaged or isn’t the release’s, so don’t install it. On a Raspberry Pi, uname -m says aarch64 under 32-bit Raspberry Pi OS too, whose 64-bit kernel runs 32-bit programs, and the binary then doesn’t start: getconf LONG_BIT must print 64. ~/.local/bin must be on your PATH; if you built Ladderback from source before, cargo uninstall ladderback removes that one, so the shell doesn’t find the old binary first. To update, run the same commands again, which replace the binary, then ladderback install-service again if it runs as a service.
Releases after 0.3.1 list inside the binary the crates the daemon was built from, so cargo-audit can check an installed one against the security advisories published since, without its source: cargo audit bin "$(command -v ladderback)". The list leaves out the crates of the web UI built into it, and a binary you built from source has none; cargo audit in a checkout of the release’s tag checks both. An advisory the project has found doesn’t affect Ladderback is in the ignore list of deny.toml, with the reason.
cargo-binstall
For people who already use cargo-binstall, on 64-bit Linux:
cargo binstall --strategies crate-meta-data --git https://github.com/nledford/Ladderback ladderback
It reads the version in main’s Cargo.toml, downloads that release’s archive for your machine and installs ladderback into ~/.cargo/bin, as the install script does. It doesn’t check the archive against SHA256SUMS (#357); the install script and Download a release do. --strategies crate-meta-data keeps it to the release’s archive: where there is none (macOS, or a release whose archives aren’t attached yet), it would otherwise build with cargo install, which doesn’t build the web UI, so the binary it installs has none. To update, run the same command again.
By hand
You need:
- Rust, through rustup. In the checkout, rustup installs the exact Rust version
rust-toolchain.tomlpins, with thewasm32-unknown-unknowntarget, on the first build, so you build with the compiler CI tested (decision 78). Without rustup, use Rust 1.100.0 or newer, the MSRV, with that target, and take trunk and just from their prebuilt releases. - git and a C compiler: Xcode’s Command Line Tools on macOS,
gitandbuild-essentialor your distribution’s equivalents on Linux. - Node.js 26 or newer, with npm, ideally the newest 26 release: the web UI’s build runs Tailwind’s CLI, and
just install-restartis TypeScript, which Node runs as it is. Debian’s and Ubuntu’s own packages are older: take it from nodejs.org or NodeSource’s signed apt repository. - trunk, which builds the web UI, and just 1.40 or newer:
cargo +stable install --locked trunk just, or your package manager’s. trunk’s newest release can need a newer Rust than the one the checkout pins, hence+stable. Building trunk from source takes more memory than a small machine has (with cargo’s default jobs it ran a 4 GB Raspberry Pi out of memory), so prefer trunk’s prebuilt release, on Linux themuslarchive, which runs whatever the system’s glibc; where there is none for your system, bound the build to about one job per 2 GB of free memory with-j. trunk downloads thewasm-bindgenandwasm-optthe build needs.
On 64-bit ARM Linux with a glibc older than 2.38 (Debian 12, Ubuntu 22.04), the wasm-bindgen trunk downloads doesn’t run. There, between the git checkout and just install below, and again after each update, build the version the checkout pins, which trunk then finds on the PATH: cargo install --locked wasm-bindgen-cli --version "$(just _wasm-bindgen-version)".
Clone the repository, check out the newest release, and install it:
git clone https://github.com/nledford/Ladderback.git
cd Ladderback
# The newest release tag, leaving out release candidates (vX.Y.Z-rc.N).
git checkout "$(git tag --list 'v*' --sort=-v:refname | grep -v -- - | head -n 1)" && just install
just install builds the web UI, then ladderback with the UI built in, as the release archives are built (the dist profile, with thin LTO), and installs it with cargo install into ~/.cargo/bin. Arguments go to cargo install: just install --root ~/.local installs into ~/.local/bin. If just answers that there is no recipe install, that release predates it; run this instead, which builds with the release profile (older releases have no dist profile):
(cd crates/web && trunk build --release --no-default-features) && cargo install --locked --path . --no-default-features
On macOS, just install and just install-restart use the self-signed certificate named Ladderback Code Signing by default. Set LADDERBACK_SIGN_IDENTITY to another certificate name or SHA-1 hash when you need a different identity; Running as a service has what just install checks.
To update by hand, git fetch --tags, the same git checkout line, and just install. After the install script installed the archive, run just install --force: cargo won’t overwrite a binary it didn’t install. Releases up to 0.2.0 track the web UI’s stylesheet, which their build can rewrite: coming from one of them by hand, first put it back with git checkout -- crates/web/tw-out.css, or git refuses to check out the new release.
Docker image (not supported yet)
Each release after 0.5.0 publishes a Docker image for x86_64 and aarch64 Linux, as ghcr.io/nledford/ladderback and docker.io/nledford/ladderback: the same image, tagged with the release’s version. Only GitHub’s latest release also gets latest, so a pre-release never moves it; to try a pre-release, pull it by its version. For 0.5.0, or a build of your own, just image <version> <archive>... --tag ghcr.io/nledford/ladderback --load, in a checkout, builds it from a release archive, as a release does. Docker Hub limits how often you may pull without an account; GitHub’s registry doesn’t.
The image is there to try: it isn’t yet a supported way to install and run Ladderback, and the package or the install script is. Its container is a machine of its own, which backs up the folders mounted into it. From the MVP’s release it runs the hub too, and becomes the recommended way to run one on a machine whose only job is the hub; an installed machine becomes the hub in place instead, since moving its data into a container isn’t supported yet (decision 136). Until then it has no hub, and refuses serve --hub.
The image runs ladderback as user and group 10001 and listens on port 9898. It keeps its configuration in the volume at /var/lib/ladderback/config, its data (the operation history and the admin password among them) in the volume at /var/lib/ladderback/data, and its cache in /var/cache/ladderback. Turn sign-in on first: set-password asks twice for an admin password of at least 8 characters, without showing it, and keeps it in the data volume. With -i alone in place of -it, it reads one line from a pipe instead.
docker run --rm -it -v ladderback-data:/var/lib/ladderback/data ghcr.io/nledford/ladderback set-password
Then start the container, here on a computer that browsers reach as nas.example.com, backing up /srv/photos:
docker run --detach --name ladderback \
--hostname nas --init --restart unless-stopped --stop-timeout 75 \
--env TZ=Europe/Berlin --publish 9898:9898 \
-v ladderback-config:/var/lib/ladderback/config \
-v ladderback-data:/var/lib/ladderback/data \
-v ladderback-cache:/var/cache/ladderback \
-v /srv/photos:/srv/photos:ro \
ghcr.io/nledford/ladderback \
serve --listen 0.0.0.0:9898 --allowed-host nas.example.com --service-managed
The same container as a Compose file, with its port on loopback for a reverse proxy on the same computer, is examples/compose.yaml: turn sign-in on with docker compose run --rm ladderback set-password, then start it with docker compose up --detach.
What each part is for:
--allowed-hostnames the host name browsers reach Ladderback by. Listening beyond the container’s loopback, Ladderback refuses to start without one, so the image’s own command,serve --listen 0.0.0.0:9898, doesn’t start until you give it (Remote access). Over plain HTTP the password crosses the network unencrypted, so put a reverse proxy that adds TLS in front. With the proxy on the same machine, publish the port on loopback only,--publish 127.0.0.1:9898:9898: Docker’s own firewall rules pass by ufw and firewalld.--hostnamestays the same from one container to the next. Ladderback names the machine, and its snapshots’ host, by the container’s hostname, which Docker makes up anew for each container unless you give one.- Each folder to back up is mounted read-only, at the path it has on the host. The snapshots record the paths inside the container, so the same path keeps them meaningful to a restore and to
rustic. A restore into a mounted folder needs it mounted without:ro, and writes files as the container’s user, or with their original owners when it runs as root. --initruns a small init as process 1, which hands ondocker stop’s signal and reaps the processes hooks leave behind.--stop-timeout 75gives Ladderback the 65 seconds it may take to stop cleanly, where Docker kills it after 10; in Compose,stop_grace_period: 75s.--restart unless-stoppedstands in forinstall-service, which a container can’t use, and--service-managedlets Restart Ladderback in Settings restart it: Ladderback exits, and Docker starts it again.TZsets the time zone the schedules run in; without it, a container’s is UTC.- The cache volume is optional: it keeps the repositories’ cache from one container to the next.
The container’s user reads only what user 10001 or everyone may read. To back up a whole machine, run as root with --user 0: root reads every file mounted into the container, and the volumes need no change. To run as one of the host’s users instead, with --user <uid>:<gid>, keep the configuration, data and cache in folders on the host that this user owns, made as that user:
install -d -m 0700 ~/ladderback/config ~/ladderback/data ~/ladderback/cache
Mount them in place of the volumes, as in -v ~/ladderback/data:/var/lib/ladderback/data, and give the same --user, in every docker run, set-password’s included. A named volume won’t do: while it is empty, each mount gives it back to user 10001, so a chown of one doesn’t last. Keep to one user, since the files root writes stay root’s.
A container has no keyring, so keep a repository’s password in a file, such as a Docker secret under /run/secrets, in an environment variable or behind a command (Secrets). A repository on a local path needs a volume or a folder on the host mounted at that path, as /srv/photos is above: one written anywhere else lives in the container and goes when the container is removed.
On macOS, Docker runs Linux in a virtual machine, so Ladderback there sees only the folders shared with it and gets no Full Disk Access, Photos library or keychain: use the install script. From the MVP’s release, the same image runs the hub with serve --hub --listen 0.0.0.0:9898 --allowed-host <name> in place of the command above; this guide will say how to pair machines with it then.
Updating and removing
To update, pull the image, remove the container and run the same docker run again, with the same mounts: the volumes keep the configuration, the history and the password, and the repositories mounted into it stay where they are.
To remove it, remove the container: docker rm --force ladderback. Its volumes stay, with the configuration, the history and the admin password. Once you have each repository’s password somewhere else, docker volume rm ladderback-config ladderback-data ladderback-cache deletes them too. The repositories, and the folders mounted into the container, stay where they are.
Running as a service
Install starts Ladderback with ladderback install-service. This page says what that service is, how it restarts and stops, how to run Ladderback in a terminal instead, how to give the service a proxy, and what macOS’s keychain and code signing ask of an update.
Running it in a terminal
ladderback serve runs Ladderback until you stop it, and prints the address it listens on, listening on http://127.0.0.1:9898; --listen picks another address or port (beyond loopback only with --allowed-host; Remote access has the details). Its configuration and data live in your platform’s config and data folders, which Install lists; LADDERBACK_CONFIG_DIR, LADDERBACK_DATA_DIR and LADDERBACK_CACHE_DIR move them, for a second ladderback serve beside the service (technical design §4.2, “Config”).
The service
To run it in the background instead, from each login on, run ladderback install-service as yourself, not under sudo. On Linux it writes a systemd user unit and has systemd start it; on macOS it writes a launchd agent, which logs to ~/Library/Logs/ladderback.log. The service runs ladderback serve --service-managed, so it listens on http://127.0.0.1:9898, and Settings can restart it. On Linux a user’s services stop when the user logs out, and unless you already linger the command says to run loginctl enable-linger to keep it running. A service that lingers starts before you log in, when it can’t read a password in the keyring yet, so the command says so too when a repository keeps its password there, and suggests a password file instead.
Restart Ladderback in Settings restarts the service, now or once the running operations finish, and the page reloads once it is back (systemd waits 10 seconds before it starts the service again). A service installed by an earlier version can’t be restarted from there: run ladderback install-service again first.
If the service stops without its service manager asking it to, after a crash or a kill from another program, the manager starts it again: systemd after 10 seconds, launchd within 10 seconds. So a kill doesn’t stop it, nor free its data folder for another ladderback serve. To stop it until your next login, run systemctl --user stop ladderback on Linux or launchctl bootout gui/$(id -u)/io.github.nledford.ladderback on macOS. A service installed by an earlier version stays stopped after another program’s kill: run ladderback install-service again.
Only one Ladderback at a time can use your data folder. If a ladderback serve you started in a terminal is still running when you install the service, install-service installs it all the same, and says which process holds the data folder: the service can’t start until that process stops, and its manager tries again every 10 seconds. Stop the one in the terminal (Ctrl-C), and the service takes over.
Behind a proxy
Ladderback reaches cloud repositories, notification services and the update check through the proxy the standard variables name, never your system’s proxy settings: HTTPS_PROXY, HTTP_PROXY and ALL_PROXY, with NO_PROXY for the hosts it reaches directly, in upper or lower case. Set HTTPS_PROXY rather than ALL_PROXY alone: rclone, which reaches some repositories, reads only the other three. ladderback serve in a terminal takes them from your shell. The service doesn’t: install-service writes nothing of your environment into the service file, so that no secret lands in it, and writes the file afresh each time it runs. On a machine that reaches the internet only through a proxy, give the variables to the service manager instead, in a place install-service leaves alone, as below.
Linux
Run systemctl --user edit ladderback. It opens an editor on an override file for the service: type the variables between the two comment lines at the top and save, then restart the service.
[Service]
Environment=HTTPS_PROXY=http://proxy.example.com:3128
Environment=HTTP_PROXY=http://proxy.example.com:3128
Environment=NO_PROXY=localhost,127.0.0.1,nas.example.com
systemctl --user restart ladderback
systemd keeps the override in ~/.config/systemd/user/ladderback.service.d/override.conf, and install-service leaves it there, so it outlasts updates; remove-service leaves it too. systemctl --user show -p Environment ladderback lists the variables the service starts with; the running process itself keeps its environment from being read under /proc, even by you. systemctl --user revert ladderback removes the override; restart the service after that too.
macOS
install-service writes the launchd agent’s file afresh each time, so a variable written into it lasts only until the next install-service. Set the variables in launchd instead, which hands them to every program it starts for you from then on, Ladderback included, then restart the service so it takes them:
launchctl setenv HTTPS_PROXY 'http://proxy.example.com:3128'
launchctl setenv HTTP_PROXY 'http://proxy.example.com:3128'
launchctl setenv NO_PROXY 'localhost,127.0.0.1,nas.example.com'
launchctl kickstart -k gui/$(id -u)/io.github.nledford.ladderback
kickstart -k stops a running backup; Restart Ladderback in Settings can wait for it instead. The variables outlast install-service, a restart from Settings and launchd starting the service again after a crash, but not logging out or restarting the Mac. launchctl getenv HTTPS_PROXY prints what launchd holds, and launchctl print gui/$(id -u)/io.github.nledford.ladderback lists the variables under inherited environment. launchctl unsetenv HTTPS_PROXY, then a restart, takes one away.
To set them at each login, add a launch agent of your own that sets them and restarts Ladderback, under a label of yours, such as ~/Library/LaunchAgents/local.proxy-environment.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.proxy-environment</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>-c</string>
<string>launchctl setenv HTTPS_PROXY 'http://proxy.example.com:3128'; launchctl setenv HTTP_PROXY 'http://proxy.example.com:3128'; launchctl setenv NO_PROXY 'localhost,127.0.0.1,nas.example.com'; launchctl kickstart -k gui/$(id -u)/io.github.nledford.ladderback</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/local.proxy-environment.plist runs it now, and launchd runs it at each login after that; install-service and remove-service don’t touch it. launchd starts it and Ladderback in no set order, so at a login Ladderback may start before the variables are set, and the restart then stops any backup it has begun. A proxy setting in Ladderback’s own configuration (#1420) is planned to do without both. To undo it, run launchctl bootout gui/$(id -u)/local.proxy-environment and delete the file.
A password in the proxy URL
A proxy that asks for a password takes it in the URL: http://name:password@proxy.example.com:3128. Percent-encode every character of the name and password but letters, digits and -._~ (@ as %40), and in the systemd override write each % as %%: systemd reads % as the start of a specifier, and otherwise drops the line, with only a line in its journal, or changes the password. Ladderback passes the URL as it is to its workers and the programs they start, such as rclone, and masks the password and the whole name:password, as written and decoded, wherever their output shows them, as it does a repository’s password (technical design §10.2, “A proxy URL with credentials embedded”). Unlike a repository’s password, it can’t come from the keyring or a file: Ladderback reads the URL from the environment as it is.
The password then lives as plain text where you put it, readable by you and every program running as you. On Linux that is the override file, which systemctl --user edit saves with mode 0644, readable by anyone who can reach its folder: before you first save one, run mkdir -p -m 700 ~/.config/systemd/user/ladderback.service.d, and again after a revert, which deletes the folder. On macOS it is in the environment of every program launchd starts for you until you log out, your apps and terminals included, in your launch agent’s file under ~/Library, which only you can open, and in your shell’s history. systemctl --user show -p Environment and launchctl getenv print it too: leave it out when you share their output.
Checking that it works
Once the service has restarted with the variables, test a cloud repository through it: on the Repositories page, fill in Test, connect or create a repository with the repository’s Location and password, and press Test the repository. The proxy’s own log shows the connection to the repository’s host; when the proxy refuses it, the test fails with a connection error. The update check isn’t a quick test: after a restart it asks a day after its last check, and never sooner than 5 minutes after the start.
Updating without interrupting a backup
After an update, run ladderback install-service again: it replaces the service and starts it on the new binary. From a checkout, just install-restart does both without interrupting a backup: it builds with just install (its other arguments go there) into a staging folder beside the installed ladderback, waits until the service’s operation log shows no operation running or queued (up to 2 hours; --wait <minutes> changes that, --now skips the wait), then moves the new binary into place, restarts the service at once, and checks that it runs a new process of that build. Until the restart the service’s binary stays in place, so a backup that starts during the wait can still read a keyring password. It doesn’t restart a service when it can’t tell whether it is busy, as when the service isn’t running, unless --now.
INSTALL_RESTART_ADDRESS=<host:port> names the address of a service whose file you edited to listen elsewhere than 127.0.0.1:9898. A hidden .ladderback-install- folder beside ladderback is one a run that was killed left behind: delete it. ladderback remove-service stops the service and removes its file. Decision 64 says what the service file holds.
macOS: signing and the keychain
Signing your build and Full Disk Access say what to do on macOS; this section says why, and what can go wrong. A build from source carries the linker’s ad-hoc signature, which changes with every build, so macOS sees each update as a new program, drops its Full Disk Access grant and asks again for Photos and the keychain (decision 71). Technical design §12 says what a prompt you decline or leave unanswered costs. Signed with your certificate under one fixed identifier, every build has the same signature to macOS, so its Full Disk Access and Photos grants carry over to the next update (tested on macOS 27.3, #281).
The keychain still asks once for each new build, signed or not, before it lets the build read a keyring entry: a self-signed certificate has no Apple Team ID, so “Always Allow” lets in only the build that was answered (#892, technical design §12). Left unanswered, the prompt fails the first scheduled backup, or notification, after an update. Any of these avoids that:
just install-restartreads each keyring entry once with the new program, a repository’s password and a notification channel’s address, token or password, in your terminal, before it restarts the service, so the keychain asks while you are there. Before each read the terminal says which entry it reads: look for the keychain’s question then, as it can open behind your other windows, and answer “Always Allow”. A single “Allow” is for that one read, and the service is asked again. At a terminal each read waits 5 minutes for your answer.- When an entry can’t be read,
just install-restartkeeps the new build and, at a terminal, offers one more check: answer the question, or fix the entry, then press Enter. If that check fails too, or there is no terminal, it stops before the restart; run it again once the entry can be read, or with--ignore-keyring-failureto restart all the same. After any other update, runladderback check-keyringyourself, which says and waits the same way. - Read the entry with Apple’s
securityprogram, which a new build of Ladderback doesn’t change:password-command = "security find-generic-password -s ladderback -a nas -w"for the entryladderback/nas. The keychain may ask once forsecurityitself, so run that command once in a terminal and answer “Always Allow”. - Keep the password in a
password-fileonly you can read (chmod 600).
just install and just install-restart use the self-signed certificate named Ladderback Code Signing by default. Override it with LADDERBACK_SIGN_IDENTITY when another certificate name or SHA-1 hash is needed:
LADDERBACK_SIGN_IDENTITY="Ladderback Code Signing" just install-restart
The install script passes the variable on to just install. It builds the newest release, and every release from 0.4.0 on signs its build; releases up to 0.3.1 sign nothing.
just install checks the name before it builds, and installs nothing when security lists no valid certificate of exactly that name, or lists more than one: then name one by the SHA-1 hash it shows, or, when it is one certificate kept in two keychains, delete a copy. After installing, it signs the binary with the certificate under the identifier io.github.nledford.ladderback and checks the signature. Only the name passes through; the key stays in your keychain.
Over SSH, or with the keychain locked, nobody can answer the first signing’s question whether codesign may use the key, so the signing fails. After just install, the new binary is installed by then, still with its ad-hoc signature (or, when the signature fails its check, with that signature), and the command says which. To sign the installed binary without building again, run node scripts/install-signing.ts sign in the checkout with the variable and the arguments you gave just install. just install-restart signs in its staging folder, so there a failed signing installs nothing and the service keeps running as it was: run it again once the keychain can answer. The first signed build is still new to macOS, so grant it Full Disk Access once more.
Plans in config.toml
Ladderback keeps its repositories and plans in one file, config.toml, in its config folder: ~/.config/ladderback on Linux, ~/Library/Application Support/ladderback on macOS ($XDG_CONFIG_HOME/ladderback on Linux when that is set to a full path, and $LADDERBACK_CONFIG_DIR on either when that is set). The Repositories and Plans pages write it for you, as Getting started shows, and keep its comments. You can write it by hand too: Ladderback reads the file again by itself, with no restart, and its start page lists each plan with its next run.
By hand, a plan takes keys the Plans page doesn’t offer yet, such as a schedule of every = "6h", tags, a time zone, retries, and a keep policy by length of time. A plan backs up to a repository by its name, so connect the repository on the Repositories page first, which writes its [repositories.<name>] table, then add a [[plans]] table after it.
This is a whole config.toml with one plan, which backs up a home folder every hour and leaves out caches and game libraries; on macOS, change /home/demo to /Users/demo in iglobs too:
schema = 1
# The repository, as the Repositories page wrote it, with its password moved
# out of this file (see the secrets guide). Yours may have more lines, such as its
# repository-id.
[repositories.nas]
repository = "rest:https://nas.example:8000/demo-laptop"
password-keyring = "ladderback/nas"
[[plans]]
id = "home" # the plan's name: lower-case letters, digits and hyphens
repository = "nas" # the name the repository was connected under
sources = ["/home/demo"] # absolute paths; on macOS, /Users/demo
schedule = { cron = "0 * * * *" } # on the hour, in this machine's time zone; or every = "6h"
# Skip every folder that holds one of these files, as many caches mark theirs.
exclude-if-present = ["CACHEDIR.TAG", ".nobackup"]
# rustic's globs, matched without regard to case; a leading "!" leaves out what matches.
iglobs = [
"!/home/demo/.cache",
"!/home/demo/.local/share/Steam", # Steam's games
"!/home/demo/.var/app/com.valvesoftware.Steam", # Steam from Flathub
"!/home/demo/Games", # Lutris, Heroic and the like
"!node_modules",
"!target",
]
# The keep policy: a snapshot an hour for a day, one a day for a week, one a
# week for a month, and one a month for a year.
[plans.retention]
keep-within-hourly = "1 day"
keep-within-daily = "7 days"
keep-within-weekly = "1 month"
keep-within-monthly = "1 year"
The keep policy takes effect when you press Forget snapshots on the Snapshots page, as Getting started says. Every key a plan takes, among them tags, a time zone, retries and hooks, is in technical design §6.1; the filter and keep-* keys are rustic’s own.
Importing a rustic profile
ladderback import-profile <profile.toml> adds a rustic profile’s repository and its snapshot entries, as plans, to the configuration. When the profile runs commands (hooks, a password-command, an rclone-command), the import lists each one in full and asks Import them? [y/N] before it writes anything, since Ladderback then runs them on its jobs. Read them, and answer y only if you know what each does. In a script there is nobody to ask, so pass --yes once you have read them; without it nothing is imported. A profile’s global hooks are imported only into an empty configuration: once you have a plan or a repository, add them to [hooks] yourself (technical design §6.2).
Moving a repository’s password out of config.toml
The Repositories page saves the password you type into config.toml, and the page and the log warn that it is there. To move it, keep it in one of these places, then replace the repository’s password = "…" line with the line that names it; a repository has exactly one:
-
The system keyring, on a desktop or laptop. Store the password under the service
ladderbackand the repository’s name; each command asks for it, so it stays out of your shell’s history:# macOS: the login keychain security add-generic-password -s ladderback -a nas -w # Linux: the Secret Service, such as oo7, GNOME Keyring or KWallet secret-tool store --label="Ladderback: nas" service ladderback username nasThen write
password-keyring = "ladderback/nas", the service and the name.On Linux the Secret Service starts with your desktop session: oo7 (
oo7-daemon) on Fedora 45, GNOME Keyring, or KDE’s KWallet, which hasn’t been tested with Ladderback. Where there is none, the install script’s closing notes say so. A service that keeps running while you are logged out (loginctl enable-linger) starts at boot, before you log in, and can’t read the keyring until you do, whichladderback install-servicepoints out. On a machine that backs up while you are logged out, use a password file instead.The service can also start a little after Ladderback at login. A run that starts on its own in those first moments — a scheduled run, or a catch-up for one the machine slept through — finds no keyring. In the first 2 minutes after Ladderback starts, it reads the keyring again every 10 seconds until the service answers, and Ladderback’s log says it is waiting.
A locked keyring is waited for too, by a scheduled backup, or a catch-up for one the machine slept through, whose plan has a next run to wait for. It asks only whether the keyring is locked and backs up the moment it is unlocked, which logging in usually does. It gives up when the plan’s next run is due, and then says the keyring is locked and how to unlock it. A scheduled or catch-up backup left queued when the daemon stopped waits the same way when the next start takes it up, as long as its plan still has a next run; you can cancel it while it waits.
Every other run fails at once when the keyring is locked, and its message says so: a retry, a queued retry, a backup whose plan has no next run, and a run or test you start yourself. An unlock prompt you dismissed isn’t asked again: that run fails at once too, even a scheduled one, and its message says the keyring is locked and how to unlock it, since dismissing the prompt leaves it locked. Saving a password in the keyring after you dismissed its prompt says the same.
On macOS, the keychain asks you in a prompt whether Ladderback may read the entry, the first time it does and again after you install a new build, even one you sign yourself (#892 says why). A run waits up to 60 seconds for the keyring to answer. When nobody answers the prompt in that time, such as for a scheduled run while you are away, the run fails, and its message says the keyring didn’t answer in time. Answer the prompt with Always Allow, then run the plan again.
After you install a new build, run
ladderback check-keyringin a terminal: it reads each keyring entry your configuration names once, so the prompt comes while you are there, and says which entries it could read, never what they hold.just install-restartruns it for you before it restarts the service. -
A password file that only you can read. Ladderback reads its first line, and warns when others can read it:
touch ~/.config/ladderback/nas.password && chmod 600 ~/.config/ladderback/nas.passwordWrite the password on its first line with an editor, then write
password-file = "/home/demo/.config/ladderback/nas.password": the path is absolute, since nothing expands~. A file that doesn’t answer within 60 seconds, such as one on a network share that stopped answering, fails the run, and its message says so. On macOS, keep the file in the config folder there, and quote the path, since it holds a space:touch "$HOME/Library/Application Support/ladderback/nas.password" && chmod 600 "$HOME/Library/Application Support/ladderback/nas.password" -
An environment variable:
password-env = "NAS_PASSWORD". The service doesn’t get your shell’s variables, so this suitsladderback servestarted by hand, or a container.
The copies of earlier versions of config.toml in the history folder beside it may still hold the password: delete those that do. Technical design §10.2 has every source, a password command among them.
Keep passwords and tokens out of every command line too: a password-command, an rclone-command, a post-create-command, a post-delete-command, a hook and a notification channel’s command. While a command runs, its whole line is visible to other users of the computer in the process list (ps on Linux; on macOS only root sees another user’s arguments). A password-command should print the password, never hold it, and an rclone remote’s password or token belongs in rclone’s own configuration file. Ladderback warns when an rclone-command gives a flag a credential, such as --pass=…, naming the flag and never the credential. A flag that names a command or a file, such as --password-command or --sftp-key-file, doesn’t bring the warning, and the warning never reads that command or file: it must hold no password either.
Sign-in and remote access
Sign-in
Sign-in is off until you set an admin password, with ladderback set-password or in Settings, under “Admin password”. Either way it turns sign-in on the next time Ladderback starts (for the service, use Restart Ladderback in Settings, or run ladderback install-service again), and Settings says so until then. With sign-in off, anyone with an account on the machine can use Ladderback, so set a password on a machine others use.
To change the password, use ladderback set-password again, or Settings, which asks for the current one. A new password signs out every browser, the one you changed it in included, and revokes every API token, so programs that use one need a new one.
How long signing in lasts is set in Settings, under “Signing in”. Stay signed in for goes from Until I close the browser to Until I sign out; it is 30 days until you change it, and a shorter choice also signs out the browsers that signed in longer ago. On the sign-in page, Keep me signed in on this device keeps that browser signed in however long it goes unused; without it, 12 hours unused sign it out. Use it only on a device no one else uses. Sign out everywhere signs out every browser, the one you use included, and leaves API tokens working. Signing in survives a restart of Ladderback.
Turning sign-in off and recovering a forgotten password happen only at the terminal, so nobody who reaches the web UI can do either: stop Ladderback, delete the file admin-password from its data folder, and start it again with sign-in off. Then set a new password if you want sign-in back.
Listening beyond loopback
ladderback serve --listen takes an address beyond loopback only with at least one --allowed-host, the name the browser reaches Ladderback by. With sign-in off it then listens too, as Backrest does, and warns at start and on every page that anyone who can reach that address can run and change backups: do that only on a network you trust.
It serves plain HTTP, so with sign-in on put a reverse proxy with TLS in front of it. Technical design §10.1 has the details.
A hub behind a reverse proxy
A hub reached through a reverse proxy must turn sign-in on, by setting an admin password (Sign-in). With sign-in off, a hub trusts a request that comes from its own computer and names it as the host. A proxy on that computer sends its requests from there, and some name 127.0.0.1 as their host, as nginx does by default, so a request from anywhere looks as if it came from the hub’s own computer. Anyone who can reach the proxy could then use Ladderback as you do, and make a pairing token with nothing but the hub key’s ID, which isn’t secret. With sign-in off, the hub’s Settings → Machines says so too. Hubs aren’t in a release yet (Install); decision 120 has the details.
API tokens and AI agents
An API token lets a program other than a browser use Ladderback while sign-in is on: an AI agent through ladderback mcp, a scheduler, a monitoring script. Each token has its own permissions, and it can do only what they allow. Give a program only what its job needs, and a token of its own, so you can revoke one without stopping the others.
Making a token
Tokens need sign-in on (see Sign-in and remote access). In Settings, under “API tokens”, give the token a label that says which program uses it, choose its permissions, and select Create the token. Ladderback shows the token once: copy it then, because it can’t show it again.
A program sends the token as Authorization: Bearer and the token’s text. For ladderback mcp --connect, save it in a file only you can read (chmod 600) and name it with --token-file, or save it as mcp-token in Ladderback’s configuration folder, where the server looks when no file is named.
The permissions
Each permission is No access or the one thing it allows:
| Permission | Allows |
|---|---|
| Backups | See plans, every repository, the list of snapshots, operations and their progress, and status. Not the files inside a snapshot, and not the log |
| Backup runs | Start a plan’s backup, cancel a backup, and test a saved repository |
| Previews | Ask what forgetting or pruning snapshots, checking a repository, adopting snapshots into another plan or importing a profile would do, without doing it |
| Configuration | Propose changes to plans, which you approve on the Pending changes page, and try a plan in a dry run |
| Snapshot contents | See the names of the files and folders inside snapshots, and those a warning or a failure names |
| Daemon log | Read Ladderback’s log, which can name your files and folders |
| Repository check | Nothing yet: it keeps a token you make today from starting the repository checks a later version adds |
A new token starts with Backups, Backup runs, Previews and Configuration. Snapshot contents and Daemon log stay off until you choose them: they show the names of your files, which a program, or the model behind an AI agent, then reads. No permission restores, downloads, deletes snapshots or approves a change: those stay yours, in the web UI.
Which permissions for which job
- An AI agent that tells you how your backups are doing: Backups. Through
ladderback mcpit can read status, plans, snapshots and operations, and nothing else. - An AI agent that finds a file in your snapshots: Backups and Snapshot contents. Snapshot contents opens the tools that list a snapshot’s folder and search snapshots for a name; Backups lets it find the repositories and snapshots to look in.
- An AI agent that helps you set up plans: the defaults. It proposes plans and tries them in a dry run, and you approve each change in the web UI.
- A scheduler that only starts backups: Backup runs alone. It starts a plan’s backup by the plan’s ID and reads nothing, so a leaked token tells nobody what you back up.
- A monitoring script: Backups, to read status and follow operations as they run. Add Daemon log only if it collects the log.
- Troubleshooting with an AI agent: Backups and Daemon log. It reads status, plans and operations to find what failed, and the log for what Ladderback recorded around it. Without Snapshot contents, a failure shows its code but not the file names in it. The log can name your files and folders, so turn Daemon log off again when you’re done.
- A read-only dashboard: Backups alone, the same as a monitoring script: a page that shows your plans, snapshots and status can’t start, change or propose anything, so a leaked token shows what you back up but changes none of it.
ladderback mcp offers an AI agent only the tools its permissions open, so an AI agent doesn’t try what it can’t do, and Ladderback refuses anything else it asks for all the same.
Changing what a token may do
Select Change permissions of token and the token’s label on its row, choose again, and save with the admin password. A program using the token gets the new permissions from its next request. A token can never change its own permissions, and setting a new admin password revokes every token.
Revoking a token
On the “API tokens” tab of Settings, select Revoke token and the token’s label on its row, then Revoke the token. A program using the token is refused from its next request with 401 api-token-invalid, and a live-updates stream it holds ends within a few seconds. The token can’t be brought back: to let the program in again, create a new token and give it to the program. Setting a new admin password revokes every token at once.
Stop the program or give it a new token: each refused request counts as a failed sign-in from its address, so it soon gets 429 sign-in-wait, and signing in from that address, in a browser too, has to wait as well.
When a program is refused
A program asking for something its permissions don’t open is refused with one of two codes. Over HTTP the answer is 403 Forbidden with the code and the permission it needs, such as {"code": "api-token-permission", "args": {"permission": {"type": "text", "value": "backups"}}}. Through ladderback mcp the tool call fails with the same code, then a sentence that says what to do.
api-token-permission: the program’s token lacks the permission named. On the “API tokens” tab of Settings, select Change permissions of token and the label on that token’s row, and add the permission. When it namessession, no token can do it: only a person signed in through a browser can. An AI agent without a token that tries to cancel anything but a backup gets this code too, namingsession.without-token-permission: an AI agent without a token asked for something the “AI agents” tab doesn’t allow. Turn the permission named on there, in Settings (it saves to the[without-token]table of the configuration file), or, after turning sign-in on, give the AI agent a token that has it. When it namessession, only a person using Ladderback in a browser can do it.
AI agents without a token
Settings has a tab of its own, “AI agents”, for what an AI agent may do through ladderback mcp without a token: in a session of its own (--headless), and when it connects while sign-in is off. It holds the same permissions, with the same defaults, so an AI agent without a token can’t look inside your snapshots until you allow Snapshot contents there. With sign-in on, saving a change takes the admin password. A --scratch session has a configuration of its own: it always starts from the defaults plus Snapshot contents and Daemon log, since its files and its log are made up.
With sign-in off, these permissions hold only ladderback mcp: any other program on the machine, or on your network if Ladderback listens there, can use Ladderback without asking. To limit every program, turn sign-in on and give each one a token.
Technical design §10.1 and §4.6 have the details.