LOOHIVE Vault-over-Tor: Hardened HashiCorp Vault Secrets via Stealth Onion Services
706
Vault-over-Tor is an open-source project maintained by the LOOHIVE Infrastructure Team that orchestrates HashiCorp Vault for the darknet. It is designed for organizations and individuals who need to manage highly sensitive credentials across distributed networks without the cost or complexity of traditional VPNs, leased lines, or public-facing load balancers.
By utilizing the community Tor Onion Sidecar, this suite exposes the Vault API exclusively through a Version 3 Onion Service.
When you launch the container, the automated entrypoint automatically establishes your secure circuit and generates your unique fallback identity. You will see this banner in your docker logs:
๐ง
Starting Tor to establish Hidden Service circuit...
โณ Waiting for .onion address generation...
***************************************************
๐ VAULT-OVER-TOR IS ACTIVE
๐ PUBLIC ONION: http://v2c3...f4g5.onion
๐ SECURE ONION: https://v2c3...f4g5.onion
๐ ACCESS YOUR SECRETS SECURELY AT THESE URLS
***************************************************
2026-01-16 12:00:00 INFO supervisord started with pid 1
| Feature | Standard Vault | Vault-over-Tor |
|---|---|---|
| Network Access | Public IP / VPN required | Hidden Service (.onion) only |
| Firewall Setup | Port 8200 must be open | Zero open ports (Inbound) |
| Metadata | ISP sees traffic destination | Traffic destination is masked |
| NAT Traversal | Requires Port Forwarding | Works behind CGNAT & Firewalls |
| Identity | IP Address / DNS | Secret 56-character cryptographic ID |
Simply add this to your docker-compose.yml to get started. By default, it exposes Vault on port 80 of the host for easy access.
services:
vault-service:
image: loohive/vault-over-tor:latest
container_name: vault-service
ports:
# Use VAULT_PORT env to change the host port (Default: 80)
- "${VAULT_PORT:-80}:8200"
volumes:
- ./data:/vault/file
- ./keys:/var/lib/tor/hidden_service
cap_add:
- IPC_LOCK
restart: always
Manage secrets for clusters running on AWS, Azure, and a private home lab simultaneously. All workers connect to the central Vault via the .onion address, ensuring a unified security policy regardless of the hosting provider.
Deploy field devices (Raspberry Pis, industrial sensors) that need to rotate their own API keys. Since these devices often live behind cellular (LTE) networks with no public IP, Vault-over-Tor provides the only reliable way to fetch secrets remotely.
Even if your primary corporate VPN is compromised or taken down, your Vault remains accessible via the Tor network, providing a "break-glass" emergency access to critical infrastructure passwords.
You don't need a browser to use this. You can interact with your secret store programmatically from anywhere in the world using this Python snippet.
test-connection.py (Remote Secret Fetcher)import requests
import urllib3
# Suppress warnings for self-signed certificates
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
# CONFIGURATION
# Use the HTTPS URL for maximum security (Internal SSL Termination)
ONION_URL = "https://your_secret_address.onion/v1/secret/data/test"
ROOT_TOKEN = "your_vault_root_token"
# PROXY CONFIG (Must have Tor running locally, e.g., 'loohive/tor:latest')
proxies = {
'http': 'socks5h://127.0.0.1:9050',
'https': 'socks5h://127.0.0.1:9050'
}
def get_secret():
headers = {"X-Vault-Token": ROOT_TOKEN}
try:
# verify=False is required for the self-signed certificate generated by the container
response = requests.get(ONION_URL, headers=headers, proxies=proxies, verify=False)
data = response.json()
print(f"โ
Success! Secret retrieved: {data['data']['data']}")
except Exception as e:
print(f"โ Connection failed: {e}")
if __name__ == "__main__":
get_secret()
IPC_LOCK enabled to prevent memory from being swapped to disk (security best practice)../data directory using AES-GCM-256 encryption.When deploying Vault-over-Tor in a production environment, ensure you follow these steps:
.onion is encrypted, but always use vault operator seal if you suspect the physical host is compromised../keys directory (the Onion ID) on a separate encrypted volume if possible.Developed by the LOOHIVE Infrastructure Team.
HashiCorp Vault is a trademark of HashiCorp, Inc. Tor is a trademark of The Tor Project, Inc. This project is a community-driven implementation and is not an official product of either organization.
Content type
Image
Digest
sha256:0edce561dโฆ
Size
202.1 MB
Last updated
7 months ago
docker pull loohive/vault-over-tor