📦 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.4
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.4.tar.gz | 60.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hsbt-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 101.5 kB
Release files / hsbt-0.2.4.tar.gz
| Download URL | hsbt-0.2.4.tar.gz |
|---|---|
| Size | 60.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa623728f415ea247d0e7974a495bb0e0bc0ecf8b1be92ee39c0f1e258c196d6
|
|
BLAKE2b-256 checksum How to use checksums |
a0013ff865df1442e75118a1fad928ba26050ec25280b3b0eabd18507d8ceb7b
|
| 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.4-py3-none-any.whl
| Download URL | hsbt-0.2.4-py3-none-any.whl |
|---|---|
| Size | 41.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68135db033eece4aa58414c7f94a460140fa1185311b8474417cbba3c83a6c7f
|
|
BLAKE2b-256 checksum How to use checksums |
01b0162e07063beae0e67e4315a411d6234adb590695778ef23dff80fe62de81
|
| 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
|