With SMB/CIFS, you can mount your Storage Box into the local file system of a client device (e.g. your local computer). After everything is set up, you can access your Storage Box data via the local file system of your own device.
Before you follow this how-to guide, open the overview of your Storage Box in Hetzner Console to check if SMB support is enabled. If not, select the action "Change settings" and enable SMB support. After you activate SMB, it can take a few minutes before you can access your Storage Box via SMB. If you want to connect from outside the Hetzner network (e.g. from your local computer), also enable "External Reachability" in the same "Change settings" dialog. See Creating a Storage Box.
General information:
- Connections using SMB may not be automatically encrypted. However, some Windows versions use encryption by default.
- If you use a FritzBox Router from AVM, you need to deactivate the NetBIOS filter for SMB/CIFS to work. Please check the AVM knowledge base for more information. (FritzBox documentation)
-
Prepare the access details
To mount the Storage Box into the local file system, you have to provide the address that points at the directory of your user. Provide the domain in the following format:
-
Main user
The share name is
backupuXXXXX.your-storagebox.de/backup -
Sub account
The share name is your username
uXXXXX-subX.your-storagebox.de/uXXXXX-subX
-
-
Mount the Storage Box
The next steps are different depending on the operating system of your device. Click on one of the options below to view the respective steps.
-
Install CIFS
If CIFS is not installed yet, install it now. In Debian-based distributions, the command is provided via the package
cifs-utils:apt-get install cifs-utils -
Create a mount point
You can mount the Storage Box on any directory. However, you should mount your Storage Box on an empty directory. If you mount your Storage Box on a directory with data, it is not possible to access this data until the Storage Box is unmounted again. To avoid issues like this, you can just create a new directory, for example in
/mnt:mkdir /mnt/my-storage-box -
Manually mount the Storage Box directory
For this session, you will have to mount the file system manually. If you add the file system and its mount point to the
fstabfile, the system will automatically mount your file system at every reboot. This step is optional and will be explained below.Use this command to mount the file system of the Storage Box on the new directory:
Replace
uXXXXX,password, the address, and/mnt/my-storage-boxwith your own information. The share name isbackupfor the main account, or the sub-account's username for a sub-account (see step 1). Passing the password withpass=exposes it in your shell history and process list; to avoid this, omitpass=(you will be prompted for it) or use a credentials file as shown in thefstabstep below.mount.cifs -o seal,user=uXXXXX,pass=<password> //uXXXXX.your-storagebox.de/backup /mnt/my-storage-boxTo encrypt an SMB connection, you need the
sealoption. -
Test access
Navigate to the directory on which you just mounted the Storage Box. The directory should now contain all data of your Storage Box.
-
Add an entry in
fstabThe
fstabfile contains file systems and all related mounting options. All file systems that are listed in/etc/fstabare automatically mounted at a reboot.Edit
/etc/fstaband add the following line:Replace the address and
/mnt/my-storage-boxwith your own information.//uXXXXX.your-storagebox.de/backup /mnt/my-storage-box cifs iocharset=utf8,rw,seal,credentials=/etc/backup-credentials.txt,uid=<system-user>,gid=<system-group>,file_mode=0660,dir_mode=0770 0 0To encrypt an SMB connection, you need the
sealoption. -
Add an entry in
/etc/backup-credentials.txtTo automatically mount the Storage Box directory at reboot, the system needs your access details to the Storage Box. Add this line in
/etc/backup-credentials.txt:Replace
uXXXXXand<password>with your own information.username=uXXXXX password=<password>The file should have the following permissions:
chmod 0660 /etc/backup-credentials.txt -
Create a mount point
You can mount the Storage Box on any directory. However, you should mount your Storage Box on an empty directory. If you mount your Storage Box on a directory with data, it is not possible to access this data until the Storage Box is unmounted again. To avoid issues like this, you can just create a new directory, for example in
/mnt:mkdir /mnt/my-storage-box -
Add an entry in
fstabThe
fstabfile contains file systems and all related mounting options. All file systems that are listed in/etc/fstabare automatically mounted at a reboot.Edit
/etc/fstaband add the following line:Replace
uXXXXXandbackupwith your own username and share name.//uXXXXX/backup /mnt/my-storage-box smbfs rw,-N,-I=uXXXXX.your-storagebox.de,-U=uXXXXX 0 0 -
Add an entry in
/etc/nsmb.confTo automatically mount the Storage Box directory at reboot, the system needs your access details to the Storage Box. Add this line in
/etc/nsmb.conf:Replace
uXXXXXand<password>with your own information.[uXXXXX] charsets=UTF8:UTF8 [uXXXXX:<password>] password=$$crypt-stringCreate the crypt-string with
smbutil crypt. -
Open the Windows Explorer
In the Windows Explorer, navigate to "Map network drive":
-
Windows 10: On the left, click on This PC. And then at the top, click on Computer and then on Map network drive.
-
Windows 11: On the left, click on This PC. And then at the top, click on the three dots and then on Map network drive.
-
-
Connect the network drive
A new window should have popped up.
-
Select a network drive letter of your choice.
-
Enter your Storage Box address as folder, for example:
Replace
uXXXXXandbackupwith your own username and share name.\\uXXXXX.your-storagebox.de\backup -
Check the option "Reconnect at login", if you want to automatically establish a connection upon starting the system.
-
Click on Finish.
-
-
Provide login credentials
When you are asked for login information, you should enter the username and password you used for your Storage Box. Or as an alternative, you can save the login information in Windows.
-
Access data
The setup of your Storage Box as a network drive should now be finished and you should be able to find it as a separate drive under This PC (Windows 10/11).
Linux
FreeBSD
Windows
In Windows, you can connect your Storage Box as a network drive with its own drive letter.
-
Known Issues
-
Error with files larger than 4 GB
If there are errors when copying files that are 4 GB or larger, then it can help to deactivate caching. To do so, you need to mount the Storage Box with the extra parameter
-o cache=none.
-
You should now be able to access your Storage Box data via the local file system on your device.