How to Set Up Samba Private Network File Share on Ubuntu VPS (Windows & Mac Remote Drive)
Contabo High-Performance Cloud VPS
Massive 4 vCPU cores, 8GB RAM, and 32TB monthly traffic. Ideal for Linux developers.
The Convenience of Remote Network File Sharing
Managing files through web interfaces or terminal SFTP clients is fine for occasional tasks, but for video editors, graphic designers, and office teams handling large raw assets, mounting remote storage directly as a native letter drive (e.g. Z: in Windows) provides seamless drag-and-drop productivity. Samba implements the standard SMB networking protocol on Linux servers.
Important ISP Security Requirement: WireGuard Tunneling
Most consumer Internet Service Providers (ISPs) block TCP port 445 to prevent WannaCry-style SMB malware propagation across the public Internet. Therefore, Samba should always be routed through your private WireGuard VPN tunnel (10.8.0.1) connecting your computer securely to your Contabo VPS.
Step 1: Installing and Configuring Samba on Ubuntu
sudo apt update && sudo apt install -y samba
# Create storage directory and assign ownership
sudo mkdir -p /srv/shares/storage
sudo chown -R $USER:$USER /srv/shares/storage
Configure the share in /etc/samba/smb.conf:
sudo nano /etc/samba/smb.conf
[CloudStorage]
comment = Private Cloud Network Drive
path = /srv/shares/storage
read only = no
browsable = yes
valid users = @smbgroup
create mask = 0660
directory mask = 0770
smb encrypt = mandatory
Step 2: Adding Samba User and Setting Passwords
sudo smbpasswd -a $USER
sudo systemctl restart smbd
On Windows Explorer, click Map Network Drive, enter \\10.8.0.1\CloudStorage, enter your Samba credentials, and enjoy instant access to your remote storage volume.
Editorial Verdict: Pros & Cons
What We Love (Pros)
- Access terabytes of remote cloud storage as if it were a physical external drive plugged into your PC
- Native drag-and-drop file support in Windows File Explorer and macOS Finder
- Enforce user permissions and strong SMB3 encryption over the wire
Drawbacks (Cons)
- Requires establishing an encrypted VPN tunnel (like WireGuard) because ISPs block port 445 on public Internet
Deploy Your Contabo Cloud Server
Includes 4 vCPU Cores, 8GB RAM, 50GB NVMe SSD, and 32TB Outbound Traffic.
Written by Marcus Sterling
DevOps & Cloud Engineer
Alex and the ServerCraft engineering lab run routine benchmarks on over 25 web hosting providers, maintaining strict objectivity and reproducibility.
Recommended Next Reads
Hostinger vs Contabo VPS (2026): Real Benchmark Test & In-Depth Comparison
A comprehensive, benchmark-driven comparison between Hostinger and Contabo VPS. We tested Geekbench CPU scores, NVMe I/O, network latency, and hPanel vs CLI.
Hostinger Review (2026): Is It Truly the Best Web Hosting for the Price?
We stress-tested Hostinger's Premium and Cloud Startup plans across 180 days. Read our honest review covering uptime, LiteSpeed speed tests, and renewal fees.