Skip to main content

host-guard

Hardening, monitoring, encrypted backups with restore tests, and mail alerts for one Linux server (Ubuntu 22.04 to 26.04, Debian 12 and 13): a cloud instance, a VPS or bare metal. Python standard library and systemd timers, nothing else to run.

This package is the installer. It installs host-guard on the server, records every file it changes, and can roll back or remove it again.

Install

System Python refuses pip install on current Ubuntu and Debian (PEP 668), so use pipx:

sudo apt install -y pipx
sudo PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install host-guard
sudo host-guard install --mail-to you@example.com --profile examples/profiles/plain-vps.conf

The installer asks for the Gmail app password that sends the mail (not shown as you type).

Upgrade, roll back, remove

sudo PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx upgrade host-guard
sudo host-guard upgrade              # uses the options given at install
sudo host-guard rollback             # undo the last install, exactly
sudo host-guard rollback --to 0.3.0
sudo host-guard uninstall            # keeps settings, secrets and backups
sudo host-guard status
sudo host-guard history

Everything lives in /opt/host-guard: one folder per release (three kept) and a manifest per install, with a copy of every file it replaced. A rollback restores a file only while it still holds what host-guard wrote; a file you changed since is kept and reported. SSH and fail2ban settings are checked before they apply.

Docs, profiles and the source: https://github.com/855princekumar/host-guard

Metadata

Release files for host-guard 0.3.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 host-guard 0.3.0
File Size Uploaded Provenance Actions
host_guard-0.3.0.tar.gz 81.1 kB With provenance Details for host_guard-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for host-guard 0.3.0
File Interpreter ABI Platform Actions
host_guard-0.3.0-py3-none-any.whl Python 3 none any Details for host_guard-0.3.0-py3-none-any.whl

Total release size: 163.2 kB

Release files / host_guard-0.3.0.tar.gz

Download URL host_guard-0.3.0.tar.gz
Size 81.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ee4e50dfa54dda4d756c8577244030d37f521a171adc24b356c3e6620f99f2cc
BLAKE2b-256 checksum
How to use checksums
167495fcd19effd80b35f1edda2403ea9f0339bb759582ad15e0065a662e5862
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 19, 2026.

Transparency log

Release files / host_guard-0.3.0-py3-none-any.whl

Download URL host_guard-0.3.0-py3-none-any.whl
Size 82.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
555404a6b39b2a065f5cd4770f2e03db87f9c9fa08600238a1236097739d64e7
BLAKE2b-256 checksum
How to use checksums
5bd72ddfdead1c13578804ec855853cf9a8be0b6adc26971a75f6c27db0bb84d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 19, 2026.

Transparency log

Security for host-guard 0.3.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 host_guard-0.3.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 19, 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