Determine available Storage Box disk space

Last change on 2026-09-18 • Created on 2020-05-18 • ID: ST-BEF75

You can see the amount of available disk space you have on Hetzner Console. The amount you see there is updated approximately every 10 minutes.

Via SFTP

To determine in a script how much available disk space you have, use the program "sftp" in Linux-based systems:

echo "df"     | sftp uXXXXX@uXXXXX.your-storagebox.de
echo "df -h"  | sftp uXXXXX@uXXXXX.your-storagebox.de
echo "df -hi" | sftp uXXXXX@uXXXXX.your-storagebox.de

Via SSH

As an alternative, you can also use the extended SSH service to see the disk usage:

ssh -p23 uXXXXX@uXXXXX.your-storagebox.de df -h
Filesystem      Size    Used   Avail Capacity  Mounted on
uXXXXX          100G     17M    100G     0%    /home

You can use the argument -m to get the output in megabytes:

ssh -p23 uXXXXX@uXXXXX.your-storagebox.de df -m
Filesystem   1M-blocks Used  Avail Capacity  Mounted on
uXXXXX          102400    0 102399     0%    /home

Via LFTP

Under certain circumstances, lftp can return incorrect values; therefore it is better to use the variant with sftp. Below is the variant with lftp:

# apt-get install lftp
# echo du -hs .  \
| lftp -u uXXXXX,<password> uXXXXX.your-storagebox.de

Note: Passing the password on the command line exposes it in your shell history and process list. Prefer the SFTP or SSH variants above, which do not require the password inline.

Hetzner API

In order to always get a reliable value, we recommend that you use Hetzner Console to display the amount of occupied memory space. You can also do this automatically via our Hetzner API.

Table of Contents