Setting Up and Optimizing a Terramaster NAS
- 2024-12-21
- 🖥️ Hardware
- NAS Hardware Terramaster
0. Motivation
After purchasing the Terramaster F2-424 NAS, I decided to document my setup process. This guide serves as both a personal reference in case I need to reinstall and a practical guide for others who might be setting up a similar NAS configuration.
1. About the hardware
For anyone considering a NAS, here’s a summary of my experience and the choices I made for my setup.
1.1. The NAS
Previously, I had a Synology D115J, but its CPU wasn’t quite powerful enough for my needs. I wanted a NAS capable of running multiple Docker containers, which required a more robust processor. After researching Synology and QNAP models, I found that their budget options were often limited by outdated CPUs.
That’s when I came across the Terramaster NAS lineup. Although I initially had reservations about Terramaster’s Operating System (TOS), reviews suggested that it was straightforward to replace TOS with options like Unraid or TrueNAS if needed. Ultimately, I decided on a 2-bay NAS for simplicity, choosing fewer but larger disks for storage capacity. The Terramaster F2-424 offered the best balance of power and flexibility for my setup.
1.2. The Hard Drives
When selecting drives, I prioritized models rated for 24/7 operation, essential for NAS use. Initially, I purchased Seagate Exos X18 3.5 16TB drives because they were cost-effective. However, the noise level turned out to be too disruptive, especially with the NAS housed in a cabinet near my living room. Fortunately, I was able to exchange them for Seagate IronWolf Pro 3.5 NAS 16TB drives (at an additional 90€ per drive). Although pricier, the IronWolf Pro drives are significantly quieter and better suited to my setup.
1.3. The UPS
To protect the NAS from potential power outages, I opted for a UPS with a USB connection, enabling automatic shutdown of the NAS during an outage. I chose the Master Power (UPS 650 VA - 360W) as a budget-friendly option, which is ideal for low-power devices like my NAS. This UPS provides just enough backup power to safely handle brief outages and help prevent data loss.
2. Initial Setup
For a detailed installation guide, you may want to consult the Terramaster Quickguide. Here, I’ll highlight the steps that were most relevant for my setup.
2.1. Locating the NAS
To begin, you’ll need to locate the NAS on your network. With a Terramaster NAS, simply navigate to tnas.local. After a few clicks, you should see the NAS IP displayed. If that doesn’t work, you can use a network analysis app, such as Fing, to find the NAS IP.
2.2. Install Terramaster OS (TOS)
My goal was to install TOS on the SSD, allowing the HDDs to go into sleep mode when not in use, which reduces wear and noise.
To install TOS on the SSD:
- Choose a custom configuration during the setup process.
- Select all the SSDs you want to use for the installation.
- Proceed with the Online Install option.
This process will partition each selected SSD to install the OS. While the installation completes, it’s a good time to review your network setup for optimal connectivity.
3. Network Configuration
Many users opt to use a secondary router rather than the one provided by their Internet Service Provider (ISP). ISP-provided routers often have limited features and performance. However, adding a secondary router can introduce double NAT, which can cause connectivity issues. You can learn more about double NAT and its effects in this guide.
To resolve double NAT, you have two main options:
- Set the ISP router to bridge mode.
- Create a DMZ on the ISP router for the secondary router.
Since I couldn’t enable bridge mode on my ISP router, I opted for the DMZ setup. Below are the steps that worked for me.
Note: These steps may vary depending on your router models and network configuration. Refer to your router’s manual for model-specific instructions.
3.1. Reserve an IP for you secondary router
To set up a DMZ, the first step is to assign a static IP to your secondary router:
- Locate the MAC address of your secondary router.
- Access your ISP router’s configuration page.
- In the DHCP settings, create a DHCP binding for the secondary router, preferably using its current IP for simplicity.
3.2. DMZ
Once the IP is reserved, follow these steps to set up the DMZ:
- Go to the ISP router’s configuration page.
- Locate the DMZ settings.
- Enable the DMZ and assign it to the static IP of your secondary router.
4. Handling storage
Once TOS installation is complete, you can create your superuser account. Afterward, you’re ready to configure storage on the NAS.
You can use letters, numbers, and special characters in your passwords, with a maximum length of 64 characters.
4.1. Creating a storage pool
The first step is to choose a RAID configuration. Here are some general recommendations:
- TRAID: Suitable if you have disks of different sizes, as it minimizes wasted space. It’s also beneficial if you plan to add more disks in the future since TRAID doesn’t require volume recreation.
- Standard RAID (0, 1, 5, or 6): Ideal if you have disks of the same size and don’t plan on adding more disks. Standard RAID setups are compatible with other operating systems and can be easier to recover in case of failures.
For storage formats, you can choose between EXT4
and BTRFS
. While both have advantages, I opted for EXT4
, as it is often regarded as more stable. For a more detailed comparison, refer to BTRFS vs EXT4 | Terramaster forum.
HDDs will be noisy during storage pool creation (RAID synchronization). Noise will decrease once synchronization completes and during regular usage.
4.2. Hyper Cache
You can use one of the two M.2 SSD slots for caching. This can enhance read
, write
, or balanced
performance, depending on your NAS’s primary tasks.
4.3. Options for adding data
The NAS model I chose has two 2.5 Gbps Ethernet ports, which typically support file transfer speeds around 250–280 MB/s. Alternatively, you can use USB 3.1 Gen 1 with an external SSD, potentially achieving speeds between 300–400 MB/s. However, the Ethernet option is generally more efficient, as using an external SSD requires first copying data to the SSD, then transferring it to the NAS.
Note that your transfer speeds may be limited by the RAID configuration and the specific hard drives in use. For example, with the Seagate IronWolf Pro HDDs I installed, speeds top out at around 250 MB/s due to HDD limitations.
For optimal performance, I recommend transferring data over Ethernet rather than using an external USB drive.
5. Connecting locally (SSH)
When setting up applications, it can be very useful to access the NAS via a terminal (ssh
), allowing direct command-line interaction.
Only enable SSH if you are comfortable using it and aware of the security implications.
To enable SSH on your NAS:
- Open the
Control Panel
. - Go to
Network Services
and selectTerminal & SNMP
. - Enable SSH access with your username and password.
- For security, set a custom SSH port (default is
9222
).
After enabling SSH, you can connect to the NAS from a terminal with:
ssh [username]@[ip] -p [port]
Replace:
[username]
with the first user you created.[ip]
with your NAS IP address.[port]
with the SSH port you specified.
To minimize security risks, disable SSH
once setup is complete and you no longer need terminal access.
6. Installing Apps
The App Center
on your TerraMaster NAS allows you to install applications from both the official Terramaster
repository and the Community
repository.
For my setup, I installed:
- Plex for media streaming.
- qBittorrent for torrent management
- Docker (including
Docker Engine
,Docker Manager
andPortainer
) - Tailscale (community app) for secure remote access
6.1. Plex
Plex setup is simple:
- Open the app and sign in to your Plex account.
- Create your libraries as desired.
For easier access, I recommend creating the Plex libraries within the Public
folder.
6.2. qBittorrent
Upon installing qBittorrent, an admin
user is created with the password adminadmin
.
If you used the community app, a random password may be generated. Check the logs for this information.
For security, change the default password immediately: go to Tools/Options/Web UI/Authentication
.
Suggested Download Configuration:
- Save downloads in a shared location like (
/Volume1/public/Downloads
) for easy access. - Set up a monitored folder:
- Monitored folder:
/Volume1/public/Torrents/
- Added
.torrent
files:/Volume1/public/Torrents/Added/
- Completed downloads:
/Volume1/public/Torrents/Downloaded/
This setup keeps everything organized and makes it easy to monitor new and completed downloads.
6.3. Tailscale
Tailscale, a community app, enables secure remote connections. Download it from the Tailscale | TerraMaster Community Placeand install it manually via App Center/Settings/Install application manually
.
Connecting the NAS to Tailscale:
- After installation, find the login URL in the log file (
/<your_user>/MOD_CONFIG/Tailscale/Tailscale_start.log
). It will look like:
To authenticate, visit:
https://login.tailscale.com/a/xxxxxxxxxxxxxx
- Visit this URL to register the NAS with your Tailscale account. Once added, it will appear in your Tailscale admin console (optionally, rename it to nas for easy identification).
6.3.1. Set the NAS as an Exit Node
Optionally, you can configure the NAS as an exit node:
- SSH into the NAS (use nas as the hostname if connected via Tailscale).
ssh [username]@nas -p [port]
- Set the NAS as an exit node:
tailscale set --advertise-exit-node
- To ensure the app remains updated, use:
tailscale update
tailscale set --auto-update
7. UPS Configuration
To safeguard against power outages, connecting the NAS to a UPS is highly recommended. Some UPS models offer USB connectivity, which allows the NAS to receive a shutdown signal during power interruptions.
To enable UPS support:
- Go to
Control Panel/Hardware & Power
. - Check the
Enable USB Support
box.
This setup ensures your NAS can safely shut down in the event of a power failure, protecting your data and system.