📦 hsbt — Hetzner Storage Box Tool
One scriptable CLI (and typed Python library) for Hetzner Storage Boxes — from first SSH key deployment to permanent system mounts.
✨ Highlights
- 🔌 4 mount backends —
rclone(recommended · why),sshfs,CIFS/SMB,WebDAV over HTTPS - ♻️ 3 persistence styles — fstab · systemd automount · autofs
- 🔑 Password-free after setup — deploys an SSH key once, then it's key-only forever
- 🔄 One-way & bidirectional sync via rclone
- 📤 SCP transfer & remote commands out of the box
- 🐍 Importable Python library — every operation is typed and reusable
🚀 Quick start
pip install hsbt
# Save a connection (prompts for your password once to deploy an SSH key)
hsbt set-connection -i mybox -h u000001.your-storagebox.de -u u000001
# Mount it (default backend: rclone)
hsbt mount -i mybox --mount-point /mnt/mybox
# Make it survive reboots
sudo hsbt mount-perm -i mybox --mount-point /mnt/mybox
# Sync the whole box to a local directory
hsbt sync -i mybox --local-dir ~/backup/mybox
After the first
set-connectionthe password is never needed again. With only one saved connection,-i myboxis optional everywhere.
🧰 Commands
| Command | Does |
|---|---|
set-connection · list-connections · repair-connection · delete-connection |
Manage saved named connections |
mount · mount-perm · unmount |
Temporary and reboot-persistent mounts |
sync |
One-way or bidirectional sync via rclone |
upload · download · available-space |
File transfer & disk usage |
Run hsbt --help or hsbt <command> --help for every option.
📥 Installation
pip install hsbt # from PyPI
pdm add hsbt # or with PDM
System dependencies (Debian/Ubuntu — install only what you use):
apt install openssh-client sshpass # always needed
apt install rclone # --mount-tool rclone / webdav / sync
apt install sshfs # --mount-tool sshfs
apt install cifs-utils # --mount-tool cifs
apt install autofs # --mount-style autofs
Requires Python 3.14+. After install, hsbt is on your PATH.
💡 More examples
# Mount via HTTPS WebDAV (when SSH/SMB ports are blocked)
hsbt mount -i mybox --mount-point /mnt/mybox --mount-tool webdav --webdav-password secret
# On-demand mount, auto-disconnect after inactivity
sudo hsbt mount-perm -i mybox --mount-point /mnt/mybox --mount-style systemd-automount
# Bidirectional sync (keeps both sides in step)
hsbt sync -i mybox --local-dir ~/mybox-mirror --mode bisync
📚 Documentation
| Document | Audience |
|---|---|
| User Guide | Every command, option, and environment variable |
| Mount Backends | Choosing sshfs / rclone / CIFS / WebDAV, per-backend setup |
| Python API | Using hsbt as a library |
| Development Guide | Architecture, adding commands/backends, contributing |
| Testing Guide | Unit tests, integration tests, CI setup |
⚙️ How it works
hsbt stores named connections in a JSON config file (default ~/.config/hetzner_sbt_connections.json),
each holding a hostname, username, and SSH keypair path. The first set-connection prompts for your
password and deploys your public key via ssh-copy-id; from then on every operation is key-only and the
password is never stored.
📄 License
MIT © Tim Bleimehl
Metadata
Release files for hsbt 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hsbt-0.2.2.tar.gz | 56.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hsbt-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 94.5 kB
Release files / hsbt-0.2.2.tar.gz
| Download URL | hsbt-0.2.2.tar.gz |
|---|---|
| Size | 56.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d218d7857be7d475e66d31a9b616b8ce406bd5bbad7ef35f56627fc332681fdb
|
|
BLAKE2b-256 checksum How to use checksums |
af5a462137e24da8f1ab3900753dc7cca7dbfd7f882c5862b8b5a06ae2267a53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.29.0 CPython/3.14.7 Linux/6.17.0-1022-azure
|
Release files / hsbt-0.2.2-py3-none-any.whl
| Download URL | hsbt-0.2.2-py3-none-any.whl |
|---|---|
| Size | 38.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c5a4cec130de4e7486a85260582d1c8b7ccdeb09d10993832d1678274ad5363a
|
|
BLAKE2b-256 checksum How to use checksums |
bbdf0f8a3e076ed1f10e2b84854fec242eb124df4f76abc34bd3cde1a7caefd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.29.0 CPython/3.14.7 Linux/6.17.0-1022-azure
|