CLI tool for common tasks with a Hetzner Storage Box.
Project description
📦 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hsbt-0.2.1.tar.gz.
File metadata
- Download URL: hsbt-0.2.1.tar.gz
- Upload date:
- Size: 54.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.28.0 CPython/3.14.6 Linux/6.17.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebf23265fd1e665021844a72d75c5fa13a33b89742efaad23e4db81a7a6fa54e
|
|
| MD5 |
18a56e1adf5bf401a61dbbb4c1b95e1d
|
|
| BLAKE2b-256 |
ff559f0da5f4834a853e19dc78d0d329b26e574349175ea099e21047be60d1fd
|
File details
Details for the file hsbt-0.2.1-py3-none-any.whl.
File metadata
- Download URL: hsbt-0.2.1-py3-none-any.whl
- Upload date:
- Size: 37.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.28.0 CPython/3.14.6 Linux/6.17.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f26770a4bcbfd47e51e28d7fea0728d1fae6fbc1bac4120a7fde2ad4b2418b8
|
|
| MD5 |
049029390773c004dde8026c4af7d8e6
|
|
| BLAKE2b-256 |
f41469bedadd0efd23b8f6cdbbd88b4b45e6886a562a884b7bee55c00c4a36bf
|