taimatsu

taimatsu's xLog

☁️云从业者|👏白日梦想家|🛠️Serverless爱好者

Personal Unraid Configuration Tips (Part One)

Last year, I accidentally bought a Wanyou HS-201P router. Due to the difficult-to-use U-NAS system of Wanyou, it was left unused. When I went home this week and saw it, I thought about changing the system and making use of it. This article is to share my process and provide reference for those who need it.

NAS HS-201P#

Let's take a look at the configuration part:

  • CPU: Quad-core J4125
  • Memory: 2-32G optional (DDR4 laptop memory)
  • Network Port: 2X2.5G network port (crab network card, model: rtl8125b-2)
  • Hard Drive Bay: 2 hot-swappable 3.5"/2.5" SATA3
  • HDMI: 1 x HDMI
  • USB: Front 1 x USB 3.0, Rear 2 x USB 3.0
  • Operating System: UNAS 6.0 alpha (to be criticized later)
  • Others: Built-in 16G emmc installed with the system, also supports an NVME interface (can install an M.2 SSD)

Why choose UNRAID?#

After comparing NAS operating systems such as Synology DSM/UNRAID/FreeNAS, I finally preferred UNRAID. The price is reasonable, $59 for a 6-bay, $89 for a 12-bay, and $129 for unlimited bays. You can choose the system according to your actual needs. The official website also provides a 30-day free trial for experience.

I purchased the cheapest 6-bay for $59.

Failed to install APPS application market#

Configure Proxy#

By default, the system does not come with a pre-installed app market. Therefore, when you click the install button in the APPS interface, it will fail due to well-known network issues.

Here, you need to have a magic tool that can bypass network restrictions. You just need to enable the "Allow LAN connection" feature of Clash on any device in the same LAN. Note that the default http_proxy port of Clash is 7890.

Then, open the command window in the upper right corner. You need to edit the file /root/.wgetrc and write the following proxy settings code:

use_proxy=yes
http_proxy=http://[your Clash device IP address]:[default port number 7890]
https_proxy=http://[your Clash device IP address]:[default port number 7890]
wait=10

After completing the above steps and saving, you don't need to restart the system. Just click install under APPS, and you can successfully install the application market.

Set up startup#

Because unraid boots from a USB drive, the root/.wgetrc file that was just edited will be lost after restarting. Therefore, you need to edit the /boot/config/go file and write the following code:

echo "use_proxy=yes" >> /root/.wgetrc
echo "http_proxy=http://[your Clash device IP]:[default port 7890]" >> /root/.wgetrc
echo "https_proxy=http://[your Clash device IP]:[default port 7890]" >> /root/.wgetrc
echo "wait=10" >> /root/.wgetrc

The meaning of this code is that when the USB drive is booted, a .wgetrc file is written in the root, which means that the above code is written again when the system starts up.

Docker network issues#

WEB-UI freezes#

After using it, it was found that when installing Docker from the market, if the image download speed is extremely slow, unraid will freeze and the entire system will freeze.

If this happens, simply change the browser or open a new incognito window to solve the problem.

At the same time, it is also recommended to use the docker pull command line to pull the image instead of installing directly from the application market.

Docker image proxy#

Since Docker Hub cannot be accessed in China and pulling from other image repositories is also very slow, it is recommended to set up an image proxy for UNRAID.

Edit the /etc/docker/daemon.json file and write the following code:

{
  "registry-mirrors": [
    "https://hub-mirror.c.163.com",
    "https://your.own.mirror.aliyuncs.com"
  ]
}

Here, please note that if it is a newly installed system, you need to start the main sequence once, otherwise the edit will prompt that the folder does not exist.

After editing, restart the docker service. You can turn it off and on again in SETTINGS of docker, or simply restart the command. Use the command docker info to check if it has been set successfully. There will be a "Registry Mirrors:" section showing two links.

In addition, modify the /root/config/go file to enable the same changes at startup:

mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://hub-mirror.c.163.com","https://your.own.mirror.aliyuncs.com"]
}
EOF

If it is not a Docker Hub image, you can refer to my article "Available Image Repository Proxy in China".

Wanyou NAS fan speed reduction#

Switch to the unraid command line interface and execute the following commands:

# Download i2c-tools
wget -c [https://packages.slackonly.com/pub/packages/14.2-x86_64/system/i2c-tools/i2c-tools-4.1-x86_64-1_slonly.txz](https://packages.slackonly.com/pub/packages/14.2-x86_64/system/i2c-tools/i2c-tools-4.1-x86_64-1_slonly.txz)
# Install i2c-tools
installpkg i2c-tools-4.1-x86_64-1_slonly.txz
modprobe i2c-dev
# Optional step
i2cdetect -l | grep smbus
# Adjust fan speed, modify the last number 50
i2cset -y 0 0x54 0xf0 50

After setting this step, even if you restart, it will not be restored, so you don't need to set it to start at boot.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.