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.5.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.5.0
File Size Uploaded Provenance Actions
host_guard-0.5.0.tar.gz 126.6 kB With provenance Details for host_guard-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 256.3 kB

Release files / host_guard-0.5.0.tar.gz

Download URL host_guard-0.5.0.tar.gz
Size 126.6 kB
Tags Source
SHA-256 checksum
How to use checksums
66b628cc8feda6765356849381ab72df77102cdfb34ef24de7faeb813f742352
BLAKE2b-256 checksum
How to use checksums
d60024ada3c22632a6a7ac5c473523e1a591ea51c0978cbd9020cb3f47a5846f
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 24, 2026.

Transparency log

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

Download URL host_guard-0.5.0-py3-none-any.whl
Size 129.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1dca6519386c4a309ccd271ef4d84959f134d099eb1cf384bfb773d5c5964bda
BLAKE2b-256 checksum
How to use checksums
12f6610135be666e1fbdb736190ca9724ff46cac0b3f2d17f117cd6cacf2b0d4
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 24, 2026.

Transparency log

Security for host-guard 0.5.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.5.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 24, 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