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.4.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.4.0
File Size Uploaded Provenance Actions
host_guard-0.4.0.tar.gz 85.5 kB With provenance Details for host_guard-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 172.6 kB

Release files / host_guard-0.4.0.tar.gz

Download URL host_guard-0.4.0.tar.gz
Size 85.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4bee7506e96fe3d34a165e3cfd9bcbdd308749c3e608fd72717e4089bc6d2b15
BLAKE2b-256 checksum
How to use checksums
481baa92a5015fe5c8e60271616e8cc13fa94833a23df7589f0167363d6c7ed0
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.4.0-py3-none-any.whl

Download URL host_guard-0.4.0-py3-none-any.whl
Size 87.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d4d3286ee0a089f63067f5d3bdc5675032337e5f23a3e3a1df1516191d1b4ba
BLAKE2b-256 checksum
How to use checksums
7e95490dfc7766d4363aecf304eba812520048d6001cb2c7a29dd5d432ccf21d
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.4.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.4.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