2022-02-28
Ubiquiti Dream Machine Pro as a NAS
Last updated 2024-02-03
Since publishing this blog post I've sold my UDM-Pro. But starting with UniFi OS 3 samba can directly be installed without the need for any scripts or container. SSH into your UDM Pro and run:
sudo apt install samba
Original Post
The Ubiquiti Dream Machine Pro line of networking consoles offer a single 3.5" drive bay (with compatibility for 2.5" drives). Out of the box the drive can unfortunately only be used as Unifi Protect storage. Thankfully the UDM Pro runs it's services using containers, which means we can launch our own via podman, allowing the UDM Pro to be used as a small NAS using the SMB/CIFS server software samba.
Installation
-
SSH into your UDM Pro. If you haven't done this before you can follow this guide.
-
Enter the following command to install on_boot.d as well as the required CNI plugins and CNI bridge scipt:
curl -fsL "https://raw.githubusercontent.com/unifi-utilities/unifios-utilities/main/on-boot-script/remote_install.sh" | /bin/sh
-
Download the samba container script to your UDM Pro:
curl "https://raw.githubusercontent.com/thealpa/UDMPRO-samba/udmsamba-master/20-samba.sh" -o /mnt/data/on_boot.d/20-samba.sh
-
Optionally adjust any settings you want (I highly recommend changing the default credentials!):
vi /mnt/data/on_boot.d/20-samba.sh
If you're having trouble using the vi editor press i to edit content and then save the file by using Esc and typing :wq followed by return. -
Set permissions to executable:
chmod +x /mnt/data/on_boot.d/20-samba.sh
-
Run the script:
sh /mnt/data/on_boot.d/20-samba.sh
Usage
Connect to your new UDM Pro samba server using:
smb://<your_udm_ip>/Shared/
The default credentials are user
and password
. If you need more configuration options please refer to the dperson/samba docker image. Since a single HDD or SSD does not offer any redundancy, please make additional backups of any important data.
Installing a SATA drive automatically triggers an additional loud fan regardless of temperatures. This script can be used to adjust fan speeds inside the UDM Pro to one's personal preference.