- Updated: January 18, 2026
- 6 min read
Liberty – Hardware‑Bound Secret Manager Replaces .env Files
Liberty Hardware‑Bound Secret Manager: The Secure .env Replacement for Modern DevOps

Answer: Liberty is a command‑line secret manager that encrypts your environment variables with AES‑256‑GCM using a key derived from the host’s hardware identifiers, effectively turning the traditional .env file into an offline, tamper‑proof vault that only the originating machine can decrypt.
Why Developers Need a Better Alternative to .env Files
Every developer has at least one story about a .env file accidentally committing API keys, database passwords, or third‑party tokens to a public repository. The fallout ranges from embarrassing PRs to costly security incidents. While tools like HashiCorp Vault or cloud‑provider secret stores solve the problem at scale, they often require network connectivity, additional infrastructure, and steep learning curves.
Liberty targets the sweet spot for small‑to‑medium teams, startups, and solo developers who want offline secret storage without sacrificing strong cryptography. By binding the encryption key to the machine’s CPU ID, disk serial number, and OS‑level machine ID, Liberty ensures that a stolen vault file is useless on any other device.
Liberty Tool Overview
Built as a lightweight Python‑based CLI, Liberty creates a hidden directory ~/.liberty/ that houses an encrypted vault named .liberty. The tool works entirely offline—no external servers, no SaaS accounts, and no recurring fees for the core functionality. It is released under the MIT license, making it free for individual developers and open to community contributions.
Key motivations behind Liberty include:
- Eliminate accidental secret leaks via Git.
- Provide a reproducible, hardware‑tied encryption model.
- Offer an audit trail for compliance‑oriented teams.
- Maintain a zero‑trust stance—no remote service ever sees your secrets.
How Hardware‑Bound Encryption Works
Liberty’s security model hinges on three steps:
- Hardware Fingerprint Generation: The CLI queries low‑level identifiers—CPU serial, motherboard UUID, and primary disk serial. These values are concatenated and hashed with SHA‑256 to produce a 256‑bit seed.
- Key Derivation: The seed feeds an HKDF (HMAC‑based Key Derivation Function) to generate a unique AES‑256‑GCM key for the host.
- Encryption & Decryption: Secrets are encrypted with AES‑256‑GCM, which provides both confidentiality and integrity. The resulting ciphertext, along with a nonce, is stored in the vault file.
Because the key is never persisted and is recreated on‑the‑fly from hardware data, moving the vault to a different machine renders it indecipherable. This approach mirrors the concept of Windows DPAPI but works cross‑platform (Linux, macOS, and Windows).
Key Features & Benefits
Liberty packs a surprising amount of functionality for a single‑file CLI:
- AES‑256‑GCM Encryption: Industry‑standard encryption with built‑in authentication tags.
- Offline‑First Design: No network calls, no cloud dependencies.
- Global Vault Access: The
~/.liberty/directory is automatically discovered from any project folder, simplifying workflow. - Audit Trail: Every
liberty addorliberty getoperation logs a timestamped entry to.liberty.log, aiding compliance audits. - Team Mode (Future Paid Tier): Planned features include secret sharing across authorized devices, role‑based access, and revocation.
- Zero‑Trust Architecture: Secrets never leave the host unless explicitly exported.
For developers already using the UBOS platform overview to spin up AI‑enhanced micro‑services, Liberty can serve as the underlying secret store, keeping your API keys safe while your bots talk to OpenAI or ElevenLabs.
Potential Concerns & Best Practices
While hardware‑bound encryption is powerful, it introduces a few operational considerations:
1. Hardware Changes & Lockout Risk
If you replace the CPU, swap the primary SSD, or migrate to a virtual machine, the derived key changes, and the vault becomes unreadable. To mitigate:
- Export a backup copy of the vault encrypted with a passphrase before hardware upgrades.
- Store the backup in a secure password manager (e.g., 1Password, Bitwarden).
- Leverage the upcoming UBOS partner program to integrate automated secret rotation pipelines.
2. Entropy of Hardware Identifiers
Critics argue that hardware IDs may not provide enough randomness. Liberty addresses this by combining multiple identifiers and applying SHA‑256, which yields a high‑entropy seed. Nevertheless, for ultra‑high‑security environments, consider pairing Liberty with a hardware security module (HSM) or TPM.
3. Secret Recovery
Because the vault is offline, accidental deletion can be catastrophic. Recommended practices include:
- Version‑control the encrypted vault (the file itself, not the plaintext).
- Automate daily backups to an immutable object store (e.g., AWS S3 Glacier).
- Document recovery steps in your devops security handbook.
Liberty vs. Traditional .env Files
| Aspect | .env Files | Liberty Secret Manager |
|---|---|---|
| Storage Model | Plain‑text in project root | Encrypted vault in ~/.liberty/ |
| Encryption | None (unless manually encrypted) | AES‑256‑GCM, hardware‑bound key |
| Portability | Copy‑paste across machines | Vault tied to original hardware; portable only with backup key |
| Auditability | No built‑in logging | Automatic operation logs for compliance |
| Runtime Overhead | Zero (plain‑text load) | Negligible; decryption occurs once per process start |
For teams already leveraging the Enterprise AI platform by UBOS, Liberty offers a seamless, code‑first way to keep credentials out of source control while still enabling rapid prototyping.
Get Started with Liberty Today
Ready to retire your risky .env files? Follow these quick steps:
- Install the CLI via
pip install liberty-cli. - Run
liberty initto create your encrypted vault. - Add secrets with
liberty add DATABASE_URL postgres://user:pass@host/db. - Reference secrets in your code using
liberty get DATABASE_URLor load them automatically with the provided Python wrapper.
Need a hands‑on demo? Check out the UBOS templates for quick start, which include a pre‑configured Flask app that reads secrets from Liberty. If you’re a startup looking for a full‑stack AI solution, explore UBOS for startups to combine secret management with AI‑driven workflows.
For SMBs, the UBOS solutions for SMBs bundle Liberty with the Web app editor on UBOS and the Workflow automation studio, letting you automate secret rotation without writing a single line of code.
Explore pricing options on the UBOS pricing plans to see how the free tier already includes Liberty, while premium tiers unlock team sharing and advanced audit dashboards.
Looking for inspiration? Browse the UBOS portfolio examples where companies have integrated Liberty with AI agents, such as the ChatGPT and Telegram integration or the OpenAI ChatGPT integration. These real‑world use cases demonstrate how a secure secret store can power conversational AI without exposing credentials.
Community Discussion
The Liberty project sparked a lively conversation on Hacker News, where developers debated lockout scenarios, entropy concerns, and the future of team‑based secret sharing. Read the full thread for deeper insights:
Hacker News discussion on Liberty secret manager
“Security isn’t a feature; it’s a foundation. Liberty gives developers that foundation without adding friction.”
Whether you’re a solo coder, a DevOps engineer, or a security‑first startup, adopting a hardware‑bound secret manager like Liberty can dramatically reduce the risk of credential leakage while keeping your workflow lean. Pair it with the broader UBOS ecosystem, and you’ll have a modern, AI‑ready stack that respects both speed and safety.
Andrii Bidochko
CTO UBOS
Andrii Bidochko is an AI entrepreneur and researcher focused on AI agents, reinforcement learning, and autonomous systems. He writes about the technologies shaping the future of machine intelligence, from frontier models and agent architectures to real-world AI applications.