Mount a Storage Server as a network drive: Linux and Windows

Published on 10 min read

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:

ItemExample value
Hostnameu123456.storage.kernelhost.net
Usernameu123456
Share (SMB)backup
SMB port445
SSH, SFTP, rsync port23

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:

  • seal encrypts the connection with SMB 3. Since the data travels over the internet, you should never leave this option out.
  • iocharset=utf8 makes sure that accented letters and other special characters in file names come through correctly.
  • uid and gid determine which local user and group own the files. If the web server needs to write there, for example, use uid=www-data,gid=www-data.
  • file_mode and dir_mode set 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:

  • _netdev tells the system that this is a network drive, which can only be mounted once the network is up.
  • nofail prevents your server from hanging at boot if the storage happens to be unreachable.
  • x-systemd.automount mounts 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

  1. Open File Explorer and select "This PC" on the left.
  2. Choose "Map network drive". On Windows 11 it sits in the menu behind the three dots, on Windows Server on the "Computer" tab.
  3. Select S: as the drive and enter \\u123456.storage.kernelhost.net\backup as the folder.
  4. Enable "Reconnect at sign-in" and "Connect using different credentials", then click "Finish".
  5. Enter u123456 as the username together with your password, and enable "Remember my credentials".
  6. 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

MessageCauseSolution
mount error(13): Permission deniedWrong username or password, or "Samba / CIFS" is switched offCheck the credentials file and the toggle, and update the file after a password reset
mount error(115): Operation now in progressPort 445 is not reachable, or "External Reachability" is switched offRun the port test from above, check the toggle or use SSHFS
mount error(112): Host is downClient and storage cannot agree on a common SMB versionAdd the option vers=3.0 to the mount options
mount error(2): No such file or directoryWrong share nameThe 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 missingInstall the package as described above
Transfers of files of 4 GB or more abortCaching in the SMB clientAdd the option cache=none to the mount options
System error 53The network path was not found, usually because port 445 is blockedRun Test-NetConnection, check the toggles
System error 67The network name cannot be foundThe path must end in \backup
System error 86 or 1326Wrong credentialsDelete them with cmdkey /delete:u123456.storage.kernelhost.net and add them again
System error 1219A connection with different credentials already existsnet 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 seal or use SSHFS, so that the data is transferred encrypted.
  • The credentials file /etc/storage-credentials belongs to root and has the permissions 600.
  • 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?
The SMB share is called backup on every Storage Server. On Windows the path is \\u123456.storage.kernelhost.net\backup, on Linux //u123456.storage.kernelhost.net/backup. Replace u123456 with your username from the Connection Details in the customer panel.
Which ports does the Storage Server need?
Port 445 for the network drive via SMB, and port 23 for SSH, SFTP, SCP, rsync, BorgBackup and SSHFS. In addition, External Reachability must be switched on in the Access Settings so that your server can reach the storage over the internet.
Is the connection to the storage encrypted?
SSHFS is always encrypted. For SMB on Linux, the mount option seal provides encryption with SMB 3. On Windows, Get-SmbConnection shows whether the connection is encrypted, and starting with Windows 11 24H2 and Windows Server 2025 you can enforce encryption with Set-SmbClientConfiguration -RequireEncryption.
Why is the drive gone after a reboot?
On Linux, the cause is usually a missing entry in /etc/fstab or a missing _netdev option, which makes the system wait for the network. On Windows, the Reconnect at sign-in option must be enabled when you map the drive, and the credentials must be stored, for example with cmdkey.
Why is the drive not visible in File Explorer even though net use succeeded?
You probably ran the commands in a window with administrator rights. Drives from an elevated session are invisible in the normal File Explorer. Map the drive again in a normal PowerShell or Command Prompt window.
Can I mount the storage on several servers at the same time?
Yes, several servers can access the same storage at the same time. Create a separate folder for each server so that two systems never write to the same files at once.

Storage Server Network drive SMB CIFS SSHFS Linux Windows Server Backup