My current NAS system was based on the U-NAS system. U-NAS 4.0.6 is based on Debian 9. When I add the 2.5Gbe Pcie adapter, I found it is not supported by it. So I am going to install a new system with this setup.

Here is the list of what I need for the NAS system.

  • Everything on it is restricted in the LAN
  • File sharing with Windows Users
  • FTP server
  • NFS service
  • BT service
  • Emby server

Install Ubuntu

Pulled out four hard drives, fresh install of Ubuntu 22.04 lts, minimal installation, ssh server only.

Add an initial user for future use.

Testing speed with iperf3, can reach 2.33Gbits/sec

Install Cockpit

It is mainly used for mounting hard disks and can be easily managed.

sudo apt install cockpit

The web portal is
The IP address of this NAS is

cockpit storage

After the hard disk is inserted, it looks like this.

All four hard drives are in xfs format.

source mount size
/dev/n1/smallone /mnt/nas1 1.5T
/dev/n2/pt /mnt/nas2 4T
/dev/n3/4tb /mnt/nas3 4T
/dev/n4/8tb /mnt/nas4 8T

Install Webmin

This is the server administration panel I’m used to using. It should be installed as well. Later I will use it to manage a lot of things.

nas ubuntu 22.04

Home  Directory

In Webmin’s System / Users and Groups, add new users, each family member gets one individual account, all under the user home directory /mnt/nas2/homes/.

The following I need three file services, SAMBA, FTP, NFS, and also BT, Emby.

FTP server proftpd

sudo apt install proftpd

On Webmin panel, add the user serverbackup, whose homedir is /mnt/mas4/vpsbackup

After starting the FTP service, I can connect to NAS from VPS which on DigitalOcean or any other VPS provider, but I can’t transfer data.

In Webmin/ Servers/ ProFTPD Server/, Networking Options page, modify the PASV port range 55536 – 55663

proftpd PASV prots

Then, in the Firewall/NAT/PortForward of the soft route opnSense, add a new rule. There is already  a rule to forward from 65514 of the Wan port to port 21 of FTP.

opnsense port forwardAfter that, I tested the scripts from VPS hemlock backups and only changed the directory name of the backup file in

SAMBA service

sudo apt install samba

Add sharing to the Webmin control panel.  Servers / Samba Windows file Sharing

First, convert users, (because Unix user passwords are encrypted) and re-enter the password in samba users.

The first step is to set up the sharing for the home directory. As a WINS server, and always show Homes home directory.

samba windows networking options

Add two shares:

Add two SAMBA sharing

You need to pay attention to the settings here for permissions and allowed users.

samba share temp

Temp sharing, allow reading and writing for every user.

Albums sharing, allow read-only. The albums folder is to store all pictures taken on Cameras, Smartphones.

NFS service

sudo apt install nfs-kernel-server

Find it in the Webmin panel under Networking / NFS Exports.

Add the new NFSv4 export


nfs exportsDo not check the read-only box for permission settings.

It is used to back up all VMs from the PVE system to this folder. NFS is much faster than SAMBA sharing.

BT service

First, I need to install the program or transmission.

sudo apt install transmission-daemon

Then, install Transmission Web Control. Its official site is
Use the following command to install it.


When trying to access this panel, there is a 403 Error,

Do the following to fix it.

sudo service transmission-daemon stop

Edit two files, /etc/transmission-daemon/settings.json , and /var/lib/transmission-daemon/.config/transmission-daemon/settings.json

"rpc-whitelist-enabled": false,



The password should be replaced with sha1 encrypted content, do not miss the brackets.

sudo service transmission-daemon start

The download home directory is /mnt/nas2/Downloads/

and is divided into Movies, TV, Others.

EMBY server

Go to the official website to download and install the latest version.

  • ownload emby-server-deb_4.7.11.0_amd64.deb
  • dpkg -i emby-server-deb_4.7.11.0_amd64.deb
  • Open a web browser to http://localhost:8096

Visit the panel at

Add the media directory.

nas emby


Up to now, the system meet all my needs for now.

The SAMBA sharing is simply file sharing in my home LAN network. Every Windows PC used by my daughters and son can access it.

NFS sharing is provided for access from Linux servers in the LAN.

I can use BT to download files. EMBY server is used to watch Movies on LG TV and Browser.

To backup all my VPS running outside of my house, I setup a script to backup them and transfer back to home bay schedule.

David Yin

David is a blogger, geek, and web developer — founder of If you like his post, you can say thank you here

Leave a Reply

Your email address will not be published. Required fields are marked *