Mount a Storage Server as a network drive: Linux and Windows
How to mount your Storage Server like a local disk: on Linux as the directory /storage, on Windows as the network drive storage. Includes a permanent mount and help with error messages.
Your Storage Server can be mounted on your server just like a local disk. On Linux it then appears as the directory /storage, on Windows as a network drive named storage. Programs, scripts and backup tools simply write to that path, and you no longer have to copy files back and forth by hand.
This guide walks you through both methods step by step: SMB (also known as CIFS or Samba) for Linux and Windows, and SSHFS as an encrypted alternative for Linux. It also covers mounting the storage permanently so that it is back after every reboot, and the error messages that come up most often in practice. The Linux commands apply to Debian 12 and 13, Ubuntu 22.04 and 24.04 as well as AlmaLinux and Rocky Linux 9. The Windows steps apply to Windows 10 and 11 and to Windows Server 2019 through 2025.
Before you start: credentials and access settings
You will find all the details in the customer panel under your Storage Server, in the "Connection Details" section: hostname, username and password. If no password is shown there, generate a new one with "Reset Password". Be aware, though, that this disconnects all existing connections, and servers that already have the storage mounted will need the new password afterwards.
On the same page, the "Access Settings" button opens the toggles for each type of access. Three of them matter for this guide:
- Samba / CIFS for the network drive on Windows and Linux (port 445).
- SSH / SFTP / SCP / rsync for SSHFS on Linux (port 23).
- External Reachability must be switched on, because your server accesses the storage over the internet.
On newly ordered Storage Servers, all three are already enabled. The examples in this article use the values below. Replace them with your own:
| Item | Example value |
|---|---|
| Hostname | u123456.storage.kernelhost.net |
| Username | u123456 |
| Share (SMB) | backup |
| SMB port | 445 |
| SSH, SFTP, rsync port | 23 |
The share is called backup on every Storage Server, so the full path is \\u123456.storage.kernelhost.net\backup on Windows and //u123456.storage.kernelhost.net/backup on Linux.
First, check whether your server can reach the storage on port 445 at all. On Linux:
timeout 5 bash -c '</dev/tcp/u123456.storage.kernelhost.net/445' && echo "Port 445 reachable"
On Windows, in PowerShell:
Test-NetConnection u123456.storage.kernelhost.net -Port 445
If the output shows TcpTestSucceeded : True, the way is clear. If no connection can be established, check the two toggles "Samba / CIFS" and "External Reachability", as well as any firewall on your server that filters outgoing connections. If port 445 is permanently blocked, use SSHFS on Linux instead, as described further down.
Linux: mount the storage at /storage (SMB)
1. Install cifs-utils
The SMB client comes with the cifs-utils package. On Debian and Ubuntu:
apt-get update
apt-get install -y cifs-utils
On AlmaLinux, Rocky Linux and RHEL:
dnf install -y cifs-utils
2. Create the mount point and the credentials file
Create the directory where the storage should appear, and a file for the credentials:
mkdir -p /storage
nano /etc/storage-credentials
Contents of the file:
username=u123456
password=YOUR_PASSWORD
After that, only root should be able to read the file:
chmod 600 /etc/storage-credentials
The reason for a separate file: the password then ends up neither in /etc/fstab, which every user can read, nor in your command history. Special characters in the password are not a problem in this file, and you do not need quotation marks.
3. Mount it manually once and test
mount -t cifs //u123456.storage.kernelhost.net/backup /storage -o credentials=/etc/storage-credentials,seal,iocharset=utf8,uid=0,gid=0,file_mode=0660,dir_mode=0770
The options in detail:
sealencrypts the connection with SMB 3. Since the data travels over the internet, you should never leave this option out.iocharset=utf8makes sure that accented letters and other special characters in file names come through correctly.uidandgiddetermine which local user and group own the files. If the web server needs to write there, for example, useuid=www-data,gid=www-data.file_modeanddir_modeset the permissions that Linux displays for files and directories. The storage itself does not keep any Linux permissions, so these values only apply on your server.
To check that everything works:
df -h /storage
touch /storage/testfile && ls -l /storage && rm /storage/testfile
df now shows the size of your Storage Server instead of the size of the local disk.
4. Mount permanently via /etc/fstab
To make the storage come back automatically after every reboot, add it to /etc/fstab. Unmount the test mount first:
umount /storage
nano /etc/fstab
Add this line at the end (as one single line):
//u123456.storage.kernelhost.net/backup /storage cifs credentials=/etc/storage-credentials,seal,iocharset=utf8,uid=0,gid=0,file_mode=0660,dir_mode=0770,_netdev,nofail,x-systemd.automount 0 0
The three additions at the end are important:
_netdevtells the system that this is a network drive, which can only be mounted once the network is up.nofailprevents your server from hanging at boot if the storage happens to be unreachable.x-systemd.automountmounts the storage only on the first access to/storage, and mounts it again automatically after an interruption.
Reload the configuration and mount:
systemctl daemon-reload
mount -a
ls /storage
If mount -a reports no error, the line is correct. After that you can safely test a reboot: thanks to nofail, the server boots even if something is wrong.
Linux alternative: SSHFS over port 23
SSHFS mounts the storage over SSH. That is worthwhile if port 445 is blocked in your setup or if you prefer working with an SSH key rather than a password. The connection is always encrypted. Set up either SMB or SSHFS on /storage, not both at the same time.
Install SSHFS on Debian and Ubuntu:
apt-get install -y sshfs
On AlmaLinux and Rocky Linux, the package is in the EPEL repository:
dnf install -y epel-release
dnf install -y fuse-sshfs
Generate a dedicated key and install it on the storage:
ssh-keygen -t ed25519 -f /root/.ssh/storage_ed25519 -N ""
cat /root/.ssh/storage_ed25519.pub | ssh -p 23 u123456@u123456.storage.kernelhost.net install-ssh-key
When you connect for the first time, confirm the storage's fingerprint with yes and enter the password once. The install-ssh-key command adds the key without overwriting existing keys. From then on, your server logs in without a password.
Mount it manually:
mkdir -p /storage
sshfs -p 23 -o IdentityFile=/root/.ssh/storage_ed25519,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 u123456@u123456.storage.kernelhost.net: /storage
The colon after the hostname stands for your home directory on the storage, which holds the same files you also see through the SMB share. For a permanent mount, this line goes into /etc/fstab:
u123456@u123456.storage.kernelhost.net: /storage fuse.sshfs port=23,IdentityFile=/root/.ssh/storage_ed25519,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,allow_other,_netdev,nofail,x-systemd.automount 0 0
allow_other also gives users other than root access, the web server for example. reconnect and the two ServerAlive values keep the connection stable when the network briefly hiccups. Then run systemctl daemon-reload and mount -a as above.
Windows: map the storage as the network drive "storage"
Using File Explorer
- Open File Explorer and select "This PC" on the left.
- Choose "Map network drive". On Windows 11 it sits in the menu behind the three dots, on Windows Server on the "Computer" tab.
- Select
S:as the drive and enter\\u123456.storage.kernelhost.net\backupas the folder. - Enable "Reconnect at sign-in" and "Connect using different credentials", then click "Finish".
- Enter
u123456as the username together with your password, and enable "Remember my credentials". - The drive first appears as "backup (\\u123456.storage.kernelhost.net) (S:)". Right-click it, choose "Rename" and enter
storage.
From now on, the storage is available under "This PC" as the drive storage and is reconnected automatically every time you sign in.
Using PowerShell or Command Prompt
Two commands get it done faster. The first stores the credentials in Windows Credential Manager and prompts you for the password, the second maps the drive persistently:
cmdkey /add:u123456.storage.kernelhost.net /user:u123456 /pass
net use S: \\u123456.storage.kernelhost.net\backup /persistent:yes
You assign the name storage in PowerShell:
(New-Object -ComObject Shell.Application).NameSpace('S:').Self.Name = 'storage'
Important: run these commands in a normal window, not in one opened with "Run as administrator". File Explorer does not see drives that were mapped in an elevated session, even though net use reports success.
Check and encrypt the connection
PowerShell shows which SMB version Windows negotiated and whether the connection is signed or encrypted:
Get-SmbConnection -ServerName u123456.storage.kernelhost.net | Format-List ServerName,ShareName,Dialect,Signed,Encrypted
Starting with Windows 11 24H2 and Windows Server 2025, you can require encryption for all outgoing SMB connections. Windows then only connects to servers that support SMB 3 with encryption, which your Storage Server does:
Set-SmbClientConfiguration -RequireEncryption $true -Confirm:$false
This setting applies to every SMB connection on the machine. If your server also uses other, older shares without encryption, you will no longer be able to reach them afterwards.
For services and scheduled tasks
A drive letter only applies within the logon session of the user who mapped it. Services, scheduled tasks and many backup programs therefore do not see S:. Use the full path \\u123456.storage.kernelhost.net\backup there instead, and store the credentials with cmdkey in the user account the task runs under.
Common errors and their causes
| Message | Cause | Solution |
|---|---|---|
mount error(13): Permission denied | Wrong username or password, or "Samba / CIFS" is switched off | Check the credentials file and the toggle, and update the file after a password reset |
mount error(115): Operation now in progress | Port 445 is not reachable, or "External Reachability" is switched off | Run the port test from above, check the toggle or use SSHFS |
mount error(112): Host is down | Client and storage cannot agree on a common SMB version | Add the option vers=3.0 to the mount options |
mount error(2): No such file or directory | Wrong share name | The share is always called backup |
bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program. | The cifs-utils package is missing | Install the package as described above |
| Transfers of files of 4 GB or more abort | Caching in the SMB client | Add the option cache=none to the mount options |
| System error 53 | The network path was not found, usually because port 445 is blocked | Run Test-NetConnection, check the toggles |
| System error 67 | The network name cannot be found | The path must end in \backup |
| System error 86 or 1326 | Wrong credentials | Delete them with cmdkey /delete:u123456.storage.kernelhost.net and add them again |
| System error 1219 | A connection with different credentials already exists | net use \\u123456.storage.kernelhost.net\backup /delete, then reconnect |
To disconnect, umount /storage is all it takes on Linux, and net use S: /delete on Windows. On Windows, you remove the stored credentials with cmdkey /delete:u123456.storage.kernelhost.net.
Network drive or backup tool?
A mounted drive is ideal when programs should write directly to a folder, for uploads, exports or archives, for example. For regular backups, tools such as rsync, BorgBackup or restic over SSH on port 23 are often the more robust choice: they only transfer changes, resume interrupted runs and, if you wish, encrypt the data on your server before it leaves. How to build a setup like that is covered in our article on a backup strategy for servers, and the guide to setting up a cron job helps with the schedule.
Tip: if you switch on "ZFS Snapshot Directory" in the Access Settings, the snapshots of your Storage Server appear as the read-only directory .zfs/snapshot. You can then restore individual files simply by copying them, without rolling back an entire snapshot.
Security in brief
- On Linux, always mount with
sealor use SSHFS, so that the data is transferred encrypted. - The credentials file
/etc/storage-credentialsbelongs to root and has the permissions600. - Switch off whatever you do not need in the Access Settings. If you only use SSHFS, "Samba / CIFS" can stay off.
- For SSHFS, use a separate key just for the storage, as shown above. How to secure SSH in general is explained in the article Securing SSH and setting up key login.
Frequently asked questions
What is the share on my Storage Server called?
Which ports does the Storage Server need?
Is the connection to the storage encrypted?
Why is the drive gone after a reboot?
Why is the drive not visible in File Explorer even though net use succeeded?
Can I mount the storage on several servers at the same time?
2026 KernelHost GmbH. All rights reserved. This guide is protected by copyright. Republishing it on other websites, in whole, in part or in edited form, is not permitted without our written consent. Quoting with a source credit and a link is expressly welcome.

