Install the CLI
Install walwarden-cli before you need to run a restore. Node 20+ and pg_restore 16+ are required.
The walwarden CLI (walwarden-cli on npm, bin: walwarden) is the tool that performs restores on your machine. It pulls bytes from S3, verifies the manifest checksum, and pipes the dump to pg_restore. Install it before you need it.
System requirements
- Node.js 20 or later. Check with
node --version. pg_restoreon your PATH, matching the major version of your source database. Check withpg_restore --version. A version mismatch is the most common restore failure; see Troubleshooting.
One-time install (global)
npm install -g walwarden-cli
Verify:
walwarden --version
Run without installing (npx)
The dashboard's one-liner uses npx so you do not need a prior install:
WALWARDEN_TOKEN=<token> npx --yes walwarden-cli restore \
--manifest <sha256> \
--target '<your-target-dsn>' \
--mode new_database
npx --yes downloads the latest published version on first run and caches it. If you prefer a pinned version, install globally with a version specifier:
npm install -g walwarden-cli@0.0.1
Matching pg_restore to your source database
pg_restore must be the same major version as the Postgres server that produced the dump. Mismatched versions produce the error:
pg_restore: error: aborting because of server version mismatch
How to get the right version:
macOS — use Homebrew:
brew install postgresql@16
# Then add /opt/homebrew/opt/postgresql@16/bin to PATH
Debian / Ubuntu:
apt-get install postgresql-client-16
Other Linux — use the official PGDG apt or yum repositories at postgresql.org/download.
To check which version the source database is running, look at the "Server version" line on the walwarden dashboard database detail page, or run:
SELECT version();
against the source database directly.
AWS credentials for restore
The CLI does not need AWS_* environment variables. The presigned S3 URL embedded in the restore token gives the CLI direct, time-limited read access to your specific backup artifact. No AWS configuration is required on the restore machine.