Skip to main content

pfSentinel

CI GitHub Release License Python Views

Automated backup and monitoring tool for pfSense firewalls. Built for homelabs.

pfSentinel connects to your pfSense devices over SSH or HTTPS and backs up configuration files, RRD data, package configs, DHCP leases, certificates, logs, ZFS snapshots, and full filesystem archives. It includes change detection, a restore check, encryption at rest, a second copy off the PC, scheduled backups, and alerts by Telegram, Slack, email, desktop notification or the system log.

Project Status

pfSentinel 1.0.0 is the stable release. Before it came out, the release candidates ran from 2026-11-20 to 2026-11-28 on a homelab PC (Windows 11, pfSense 2.8.1), and every scheduled backup succeeded.

The project is now in maintenance mode. Security fixes, dependency updates and pfSense compatibility fixes keep coming. New features come at a slower pace; the roadmap lists what is planned. Versions follow Semantic Versioning, and only the latest release line gets fixes (Security Policy).

A Word From the Developer

I was looking for a feature-rich, modern pfSense backup tool and only found projects that were no longer maintained. Since pfSense backups are part of my own homelab backup infrastructure, I decided to build pfSentinel and share it with the pfSense community.

If you have a request or an idea, I'd love to hear it, please open a feature request. You can also reach me on LinkedIn or through my website.

Features

  • Full config backup via SSH (SFTP) or HTTPS with CSRF-aware login
  • Extended backup targets -- RRD graphs, package configs, DHCP leases, alias files, certificates, system logs
  • ZFS snapshots with incremental send (pfSense 2.5+)
  • Filesystem archives (tar.gz) as a non-ZFS fallback
  • Change detection -- every backup names the config sections that changed (firewall, users, ...), and risky changes raise an alert
  • SHA-256 verification for every backup file, and a restore check of each config backup (users, admin, interfaces, firewall rules, certificates)
  • Encryption at rest (optional) -- AES-256-GCM with a key in the OS keystore and a recovery key, or a passphrase, or the open age format; details
  • Second copy of the encrypted backups to a folder or SFTP, and (experimental) S3-compatible storage, Azure Blob Storage or WebDAV; details
  • Long-term retention -- daily backups, plus weekly and monthly ones kept longer
  • Run history -- pfs backup history lists every run with its result, failed runs included
  • Scheduled backups via Windows Task Scheduler, systemd user timers or cron
  • Alerts -- Telegram, Slack, email (any SMTP server), Windows toast or Linux desktop notification, Windows Event Log or syslog, and an optional daily digest; for a failed backup, a risky change, no recent backup, a failed restore check or a failed second copy; details
  • SSH key authentication -- no password required
  • Strict SSH host key checking -- confirm the pfSense key once (pfs device trust-key); a changed key is refused
  • Credential security -- passwords in the OS keyring (or an AES-256-GCM encrypted store on headless systems), never in config files
  • Self-update -- install new releases from GitHub; the binary's checksum and its signed build attestation are checked first
  • Cross-platform -- Windows and Linux (macOS best effort)
  • Reproducible CI -- lint, tests, security audit and build defined with Dagger, so the same pipeline runs on your machine and in GitHub Actions; hash-verified lockfiles and SHA-pinned Actions

Quick Start

Download a pre-built binary (no Python required):

Windows (pfs.exe) | Linux (pfs)

Or install from PyPI (Python 3.13+), same command on Linux and Windows:

pipx install pfsentinel

Plain pip install pfsentinel also works in a virtualenv or on Windows; on Ubuntu 23.04+ and Debian 12+ the system Python blocks it, so use pipx there.

Then:

pfs setup          # guided first-time wizard
pfs device add     # add your pfSense device
pfs backup run     # run your first backup

See the Installation Guide for all installation methods.

Documentation

Document Description
Online manual Every command, recipes, and a copy-paste version for AI assistants (pfs docs)
Installation Guide pip, pre-built binary, and from-source installation
Usage Guide CLI reference, configuration, scheduling, notifications
Extended Backups RRD, packages, DHCP, certs, logs, ZFS, archives
Encryption at Rest Modes, recovery key, file format, standalone decryption
Restore a Backup Open an encrypted backup and put a config back on pfSense
Alerts Email, daily digest, desktop notifications, Event Log
Second Copy Folder, SFTP, S3-compatible, Azure, WebDAV (experimental)
Container Docker image and Kubernetes CronJob (experimental)
Windows and Linux PC off, asleep or signed out; each feature on each system
Privacy Every network connection, and how to turn off the release check
Security Policy Vulnerability reporting, design decisions, credential storage
Contributing Development setup, code style, pull requests
Code of Conduct How we treat each other, and how to report a problem
CI with Dagger Run the CI pipeline locally
Roadmap What shipped in 1.0 and what is planned
Changelog Version history

What Gets Backed Up

Target Method Description
XML Config SSH / HTTPS Full pfSense configuration (config.xml)
RRD Data SSH Traffic and performance graphs
Package Configs SSH Installed package settings
DHCP Leases SSH Active DHCP lease table
Alias Files SSH URL tables and external alias files
Certificates SSH SSL/TLS certs from the filesystem
System Logs SSH Filter log, system log, custom log files
ZFS Snapshot SSH Full or incremental ZFS snapshot stream
Filesystem Archive SSH Tar archive of critical directories

Third-Party Credits

pfSentinel is built on these open-source libraries:

Library License Purpose
Typer MIT CLI framework
Rich MIT Terminal formatting
Pydantic MIT Data validation
Paramiko LGPL-2.1 SSH/SFTP connections
cryptography Apache-2.0 / BSD-3-Clause SSH key handling
Requests Apache-2.0 HTTP client
Packaging Apache-2.0 / BSD-2-Clause Version parsing

Paramiko is the only runtime dependency with a copyleft license (LGPL-2.1). When installed via pip, users can freely replace it. For binary releases, pfSentinel uses --onedir bundling so Paramiko remains replaceable. See docs/LICENSE_AUDIT.md for the full dependency license audit.

Contributing

Contributions are welcome! Please read the Contributing Guide before submitting a pull request.

If you find a bug or have a feature request, open an issue.

Support

pfSentinel is free and open source. If it saves you time or you'd like to support continued development, you can sponsor on GitHub or buy me a coffee. Thank you!

License

Apache 2.0

Metadata

Release files for pfsentinel 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pfsentinel 1.0.0
File Size Uploaded Provenance Actions
pfsentinel-1.0.0.tar.gz 638.2 kB With provenance Details for pfsentinel-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pfsentinel 1.0.0
File Interpreter ABI Platform Actions
pfsentinel-1.0.0-py3-none-any.whl Python 3 none any Details for pfsentinel-1.0.0-py3-none-any.whl

Total release size: 844.3 kB

Release files / pfsentinel-1.0.0.tar.gz

Download URL pfsentinel-1.0.0.tar.gz
Size 638.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3578cb6fc3f5e51ab8e12f404f58ea92a1455e9e28b6a481d9d0d8653fa0516b
BLAKE2b-256 checksum
How to use checksums
db5ec1f7fd77e39d1e78fea2fb462a8e20090795cde89c79d0a8ba744d6a44e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / pfsentinel-1.0.0-py3-none-any.whl

Download URL pfsentinel-1.0.0-py3-none-any.whl
Size 206.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65dc958c269679912e1c5d0f4b69b99d5d450b6c657183c29cd0b40bbe77d193
BLAKE2b-256 checksum
How to use checksums
2185b580e06ed8f6938b58c963d59b71ce3ab3e5bb22fbf46efa2143b6fe1f0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for pfsentinel 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pfsentinel-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page