Skip to main content

📦 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.

PyPI Python License: MIT Integration Tests GitHub


✨ 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-connection the password is never needed again. With only one saved connection, -i mybox is 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.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hsbt 0.2.6
File Size Uploaded
hsbt-0.2.6.tar.gz 61.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hsbt 0.2.6
File Interpreter ABI Platform
hsbt-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 103.8 kB

Release files / hsbt-0.2.6.tar.gz

Download URL hsbt-0.2.6.tar.gz
Size 61.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5d29d9edb8646e4f27dfe3f1e6496f7cfa05ea853f2ee93c4efead635501a9fd
BLAKE2b-256 checksum
How to use checksums
1d876dadc9d8da9b1d0080ff9f893aea785ff8ee30d0697ac5a1c0861badb72e
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.6-py3-none-any.whl

Download URL hsbt-0.2.6-py3-none-any.whl
Size 42.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18b17a03890665e5e85ac9d689d44fb021715dcdc6f043a145ee2297b2156ec1
BLAKE2b-256 checksum
How to use checksums
e3b69638f2f043aa4c3bb25cf4cf71c021866fd12a2a4a5700f429d8b0b328e2
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 history Release notifications | RSS feed

0.2.8

2 release files

This release

0.2.6 This release

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page