I’ve been running Proxmox Backup Server the official way for years and got bored, so I packaged it natively for NixOS: AWildLeon/nixos-pbs . No Debian container, no dpkg shims. Just a regular Nix derivation.
What it is
A proper rustPlatform.buildRustPackage derivation built from upstream Proxmox git sources, wrapped in a buildFHSEnv to satisfy PBS’s hardcoded Debian-style paths. Same pattern nixpkgs uses for Steam. The web UI assets are pulled from the official .deb archives and assembled at build time, with sections that don’t make sense on NixOS (APT updates, xterm.js shell, disk/ZFS/network management, reboot buttons) trimmed out.
On top of the package there’s a NixOS module (services.proxmox-backup-server) with declarative datastores, prune/verify/sync jobs, agenix-compatible TLS cert support, and PAM integration. Prebuilt binaries are on Cachix.
Current status
The package builds and I have two testers running it. The end goal is nixpkgs, but before filing a PR I want more eyes on it. I may have overlooked things, and some areas are explicitly untested:
General real-world backup/restore/sync/GC workloads
PAM / authentication beyond basic root@pam
Tape drives: pmt, pmtx, sg-tape-cmd are included but completely untested
If you’re willing to kick the tires on any of the above, please report back. There are tracking issues on the repo for each area.
Repo: GitHub - AWildLeon/nixos-pbs: Proxmox Backup Server on NixOS (Experimental) · GitHub
4 Likes
Thank you for sharing! You can get eyes on it as a Nixpkgs pull request. I can see it includes some tests; that’s great! Why not make a PR?
I don’t want to get this merged without more testing.
I’ll rebuild my two PBS systems when I have some time (and it’s not 35°C / 95°F in my computer room).
Backups are critical infrastructure, if they fail a lot can go wrong.
Better no package in nixpkgs than a broken one, hence no PR yet.
Since it modifies the UI slightly, I’ve also reached out to Proxmox via email.
I don’t want a Mozilla/Debian situation in nixpkgs: Mozilla threatened Debian with trademark action over their Firefox branding, which forced Debian to ship their browser as “Iceweasel” for years.
I’d rather get trademark clarity upfront than have nixpkgs suddenly forced to rename or pull the package.
My current list for a PR is:
Wait on Proxmox bec of the Trademark / Logo Usage.
Use it myself (in prod) (I’d never PR something i wouldnt use myself).
Someone has tested the Tape feature (or else i’d remove it in the UI; I dont like untested code…)
1 Like
It won’t get merged if the pull request is in draft state.
This sounds really interesting. Which apt package are you sourcing from?
According to the proxmox docs there’s “proxmox-backup-server” and “proxmox-backup”
As I understand it the “proxmox-backup-server” apt package installs the minimum requirements needed for pbs on to an existing debian kernel.
I don’t know anything about packaging things for nix but I’d imagine your using the “proxmox-backup-server”?
Im not using any APT Packages at all. Im building from source.
The only package i extract stuff from is the webui deb file.
And i modify some parts of the webui and backend to make it nixos compatible.
1 Like
I Created a PR to nixpkgs
master ← AWildLeon:proxmox-backup-server
opened 03:19PM - 18 Jul 26 UTC
> **Note:** the overview below was drafted with AI assistance (Claude Sonnet 5),… reviewed and edited by me before posting. See the `Assisted-by:` trailers on the individual commits for per-commit disclosure.
Adds a native NixOS packaging of [Proxmox Backup Server](https://pbs.proxmox.com/docs/) (PBS), a deduplicating backup server for VMs, containers, and hosts, running as a set of systemd services instead of inside a Debian container. The packaging flags this clearly in the web UI and in the bundled docs, and users are pointed at the nixpkgs issue tracker for problems.
Currently at 4.2.3. Upstream changelog: https://git.proxmox.com/?p=proxmox-backup.git;a=blob;f=debian/changelog
I have been running this myself on my own infrastructure for a while now, and a few other people have already tried it out successfully as well. I Think its stable enough to be in nixpkgs/nixos
## Why a NixOS module and not just a package
PBS hardcodes Debian-style filesystem paths at runtime (web assets under `/usr/share/javascript`, helper binaries under `/usr/lib/<multiarch>`, etc.), and upstream doesn't publish several of its own dependency crates to crates.io. This is split into three commits to keep that reasonably reviewable:
1. **`proxmox-backup-server-unwrapped`**: the raw Rust build. Vendors the handful of sibling git repos PBS depends on (via `fetchgit`, since they aren't on crates.io), re-routes them with a small patch, and lays binaries/assets out in the standard Nix layout. Not runnable directly. `passthru.updateScript` re-pins everything to the newest *released* `.deb` (upstream's repos carry no usable tags).
2. **`proxmox-backup-server`**: wraps the above in a `buildFHSEnv` so the hardcoded Debian paths resolve, making it actually runnable.
3. **`nixos/proxmox-backup-server`**: the module (`services.proxmox-backup-server`), which sets up the service user, state directories, PAM auth, systemd units for the API/proxy/daily-update services, and an optional custom TLS certificate. Also supports declaratively managing datastores and prune/verify/sync jobs, reconciled against `proxmox-backup-manager` on activation. Comes with a NixOS VM test that drives a full backup, restore, verify, and garbage-collect round-trip.
Tape backup support is compiled in but untested and likely broken on this port; flagged as such in the module's bundled docs.
## How this differs from stock PBS
Stock PBS assumes a Debian host with APT and a fixed FHS layout. Nothing in the Rust source itself is patched for behavior; the differences below come from build-time substitutions and from module-level integration choices.
**Service identity and paths**
- Service user/group is `proxmox-backup-server` instead of Debian's `backup` (patched in `pbs-buildcfg/src/lib.rs`, since it's a compile-time constant upstream). State lives at the usual paths (`/etc/proxmox-backup`, `/var/lib/proxmox-backup`, `/var/log/proxmox-backup`, `/var/cache/proxmox-backup`, `/run/proxmox-backup`), owned by that user/group.
- Daemons run as systemd services (`proxmox-backup.service`, `proxmox-backup-proxy.service`) launched inside a `buildFHSEnv` sandbox rather than natively on a Debian rootfs, since the binaries hardcode paths like `/usr/share/javascript/proxmox-backup` and `/usr/lib/<multiarch>/proxmox-backup`.
**Web UI, trimmed for an immutable host**
- Removed entirely: the Shell menu (xterm.js console into the host, nothing to attach to here), and Storage / Disks (would write systemd `.mount` units into `/etc/systemd/system`, a read-only nix-store path; the underlying API endpoints are still compiled in but non-functional).
- Removed: APT updates/repositories, network configuration, time configuration, and the reboot/shutdown buttons, none of which apply to a NixOS host managed declaratively.
- The dashboard's "repository status" row (always shows "No repository enabled" here, since there are no APT repos) is replaced with a static "Packaging: nixpkgs" row.
- The "no valid subscription" notices (shown in the UI when there's no active Proxmox subscription, which is expected here) get an appended note clarifying this is an unsupported NixOS port and to not contact Proxmox support.
- A compatibility shim restores the widget-toolkit logo image, since the current Debian widget-toolkit package no longer ships it but PBS's UI still references it by that path.
**Documentation**
- `/docs` serves a small custom landing page (generated from Markdown at build time) covering what's specific to this port; the full upstream manual is bundled unmodified underneath at `/docs/proxmox`. Contextual help links (`?` buttons) are repointed accordingly.
**Nix-specific additions**
These are NixOS module conveniences built on top of PBS's existing CLI/config surface, not modifications to PBS itself:
- `services.proxmox-backup-server.ensureDatastores` / `ensurePruneJobs` / `ensureVerifyJobs` / `ensureSyncJobs`: declarative datastore and job management. A `proxmox-backup-setup` oneshot service reconciles these against `proxmox-backup-manager` on every activation (creating them if missing, updating them to match), while anything created by hand in the GUI is left alone.
- `services.proxmox-backup-server.sslCertificate` / `sslCertificateKey`: installs a caller-supplied TLS certificate before the daemons start, instead of relying on PBS's self-signed fallback.
**Known gap**
- Tape backup (`proxmox-tape`, `pmt`, `pmtx`, `sg-tape-cmd`) is built and its UI is left in place, but has not been exercised on this port and is not expected to work as-is.
## Things done
- Built on platform:
- [X] x86_64-linux
- [X] aarch64-linux
- [ ] aarch64-darwin
- Tested, as applicable:
- [X] [NixOS tests] in [nixos/tests].
- [ ] [Package tests] at `passthru.tests`.
- [ ] Tests in [lib/tests] or [pkgs/test] for functions and "core" functionality.
- [ ] Ran `nixpkgs-review` on this PR. See [nixpkgs-review usage].
- [X] Tested basic functionality of all binary files, usually in `./result/bin/`.
- Nixpkgs Release Notes
- [ ] Package update: when the change is major or breaking.
- NixOS Release Notes
- [X] Module addition: when adding a new NixOS module.
- [ ] Module update: when the change is significant.
- [X] Fits [CONTRIBUTING.md], [pkgs/README.md], [maintainers/README.md] and other READMEs.
- [X] Follows the [automation/AI policy].
[NixOS tests]: https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests
[Package tests]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-tests
[nixpkgs-review usage]: https://github.com/Mic92/nixpkgs-review#usage
[CONTRIBUTING.md]: https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md
[automation/AI policy]: https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#automationai-policy
[lib/tests]: https://github.com/NixOS/nixpkgs/blob/master/lib/tests
[maintainers/README.md]: https://github.com/NixOS/nixpkgs/blob/master/maintainers/README.md
[nixos/tests]: https://github.com/NixOS/nixpkgs/blob/master/nixos/tests
[pkgs/README.md]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md
[pkgs/test]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/test