Difference between revisions of "APITestPage"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(updated by API)
Line 1: Line 1:
[[NanoPi R2S/zh|查看中文]]
+
[[Getting Started with OpenMediaVault/zh|查看中文]]
 
+
==OpenMediaVault version==
==Introduction==
+
* OS: Debian 12<br />
[[File:NanoPi R2S-1.jpg|thumb|frameless|250x250px|Overview]]
+
* OpenMediaVault: 7.0.5-1 (Sandworm)<br />
[[File:NanoPi R2S_TOP.jpg|thumb|frameless|250x250px|Front]]
+
* Docker: 26.0.1<br />
[[File:NanoPi R2S-BOT.jpg|thumb|frameless|250x250px|Back]]
+
* Others: built-in OMV-Extras<br />
[[File:NanoPi_R2S-case1.jpg|thumb|frameless|250x250px|Case]]
+
==Earlier version OpenMediaVault==
[[File:R2sc-02.jpg|thumb|frameless|250x250px|Case]]
+
[[Getting Started with OpenMediaVault6|OpenMediaVault6]]
[[File:R2sc-03.jpg|thumb|frameless|250x250px|Case]]
+
==First Look==
[[File:R2sc-04.jpg|thumb|frameless|250x250px|Case]]
+
[[File:Openmediavault7.png|600px]]
[[File:R2sc-05.jpg|thumb|frameless|250x250px|Case]]
+
==Supported platforms==
* The NanoPi R2S(as "R2S") is an open source platform with dual-Gbps Ethernet ports designed and developed by FriendlyElec for IoT applications.
+
* RK3328<br />
* The NanoPi R2S uses the RK3328 SoC. It has two Gbps Ethernet ports and 1G DDR4 RAM. FriendlyElec ported an OpenWrt system for it. It works with Docker CE. It is a good platform for developing IoT applications, NAS applications =etc.
+
* RK3399<br />
 
+
* RK3568<br />
==Hardware Spec==
+
* RK3588<br />
* CPU: Rockchip RK3328, Quad-core Cortex-A53
+
==Find IP Address==
* DDR4 RAM: 1GB         
+
Since the hostname is set by default to the model of the development board, you can use the "ping" command to obtain the IP address. For example, for CM3588, you can use the following command:
* Network:
+
<syntaxhighlight lang="bash">
**Internal 10/100/1000M Ethernet Port x 1
+
ping CM3588
**USB3.0 converted 10/100/1000M Ethernet Port x 1<br />
+
</syntaxhighlight>
* USB2.0 Host: Type-A x1
+
==Access the OpenMediaVault web page==
* MicroSD Slot x 1
+
Enter the IP address of the development board in your web browser; the default login account for the web interface is:
* MicroUSB: power input and USB Slave
+
<syntaxhighlight lang="bash">
* Debug Serial Port: 3.3V TTL, 3-pin 2.54mm pitch connector, 1500000 bauds
+
Username: admin
* LED: LED x 3
+
Password: openmediavault
* KEY: KEY x 1 programmable
+
</syntaxhighlight>
* PC Size: 55.6 x 52mm
+
==Change the web login password==
* Power Supply: DC 5V/2A
+
Click on the profile picture in the upper-right corner of the web page, then select "Change Password"
* Temperature measuring range: 0℃ to 80℃
+
==Configure the web page timeout duration==
* OS/Software: U-boot,Ubuntu-Core,OpenWrt <br />
+
Navigate to "System" -> "Workbench" and adjust the "Auto Logout" time setting.
 +
==Logging in via SSH==
 +
<syntaxhighlight lang="bash">
 +
ssh pi@YourIPAddress
 +
</syntaxhighlight>
 +
The default password is "pi".
 +
==Create the root user==
 +
Create the root user and add user to the root and ssh groups:
 +
<syntaxhighlight lang="bash">
 +
sudo passwd root
 +
sudo gpasswd -a root root
 +
sudo gpasswd -a root _ssh
 +
</syntaxhighlight>
 +
You can now use the root user to log in via SSH:
 +
<syntaxhighlight lang="bash">
 +
ssh root@IPAddress
 +
</syntaxhighlight>
 +
==Configure the hard drive and shared folders==
 +
Two RAID profiles are available:
 +
* MD RAID: has better performance, because it does a better job of parallelizing writes and striping reads.<br />
 +
* Btrfs RAID: has better data safety, because the checksumming lets it ID which copy of a block is wrong when only one is wrong, and means it can tell if both copies are bad.<br />
 +
===Optional 1: MD RAID===
 +
===Step 1: Initialize the storage device===
 +
Navigate to "Storage" -> "Disks", select your storage device, and click the "Wipe" icon to perform disk erasure (please ensure your data is backed up). Typically, you can choose "Quick" erase.<br />
 +
If the disk can't be wiped, you need to remove the Shared Folders on this disc and Umount it first.
 +
===Step 2: Create RAID===
 +
(Note: USB interface hard drives are not supported, and OpenMediaVault will not list USB storage devices on the RAID creation page.)<br />
 +
Go to "Storage" -> "Multiple Device" click the "+" icon, choose the RAID level, and apply the settings.
 +
===Step 3: Create File System===
 +
Go to "Storage" -> "File Systems," click on the "+" icon, and for the type, it's recommended to choose "BTRFS", Select "Single" and check the storage device. If you created a RAID in the previous step, choose a device starting with /dev/md. If it's a USB hard drive, choose /dev/sda.<br />
 +
After formatting is complete, openmediavault will let you choose which file system to mount, and choose the device you want to mount.
 +
===Step 4: Add Shared Folders===
 +
Go to "Storage" -> "Shared Folders," click the "+" icon to create two folders named "nfs" and "samba." We will use these folders for testing NFS and Samba sharing in the following steps.<br />
 +
(Note: If there were previously created shared folders on the hard drive, you can recreate them with the same names, and the data will be preserved.)
 +
===Optional 2: Btrfs RAID===
 +
(Note: If the hard drive has already been initialized and RAID has been preserved, you can proceed directly to step four for mounting.)
 +
====Step 1: Initialize the storage device====
 +
Navigate to "Storage" -> "Disks", select your storage device, and click the "Wipe" icon to perform disk erasure (please ensure your data is backed up). Typically, you can choose "Quick" erase.<br />
 +
If the disk can't be wiped, you need to remove the Shared Folders on this disc and Umount it first.
 +
====Step 2: Format, Create Btrfs RAID and Mount====
 +
(Note: USB interface hard drives are not supported, and OpenMediaVault will not list USB storage devices on the RAID creation page.)<br />
 +
Go to "Storage" -> "File Systems" click the "+" icon, choose the "BTRFS", choose the RAID level, select your disks, and then save the settings.<br />
 +
After formatting is complete, openmediavault will let you choose which file system to mount, it doesn't list all the disks, so you should choose a drive that starts with /dev/nvme.
 +
====Step 3: Add Shared Folders====
 +
Go to "Storage" -> "Shared Folders," click the "+" icon to create two folders named "nfs" and "samba." We will use these folders for testing NFS and Samba sharing in the following steps.<br />
 +
(Note: If there were previously created shared folders on the hard drive, you can recreate them with the same names, and the data will be preserved.)
 +
==Create NAS users==
 +
Debian system users or Linux users created via the command line may lack certain permissions required for services like Samba and NFS. Therefore, it is recommended to use the OpenMediaVault interface to create a user specifically for accessing Samba and NFS shares. Here, I will create a user and group named "nasuser":<br />
 
<br />
 
<br />
* '''Network Transmission Rates'''
+
Click on "Users" -> "Groups" and then click the "+" icon to create a user group named "nasuser".<br />
::{| class="wikitable"  
+
Click on "Users" -> "Users" then click the "+" icon to create a user named "nasuser", change user's shell to "/usr/sbin/nologin", and select the "nasuser" and "users" groups.
|-
+
==Create a Samba share==
! width=100px style="background: Light grey; color: black" |
+
Go to "Services" -> "SMB/CIFS" -> "Settings," check the box at the top for "Enabled," select "SMB1" as the minimum protocol version, and then click "Save"<br />
! width=150px style="background: Light grey; color: black" align="center" | TX
+
<br />
! width=150px style="background: Light grey; color: black" align="center" | RX         
+
Go to "Services" -> "SMB/CIFS" -> "Shares," click the "+" button, and in the "Shared folder" field, select the folder you want to share. as an example, here i select the "samba" folder<br />
|-
+
<br />
|WAN      ||align="center" | 941 Mbps  ||align="center" |  941 Mbps  
+
Testing: <br />
|-
+
On Mac system, right-click Finder, select "Connect to Server," and enter "smb://YourIPAddress" (replace with the actual IP address). A authentication dialog will appear; enter the username "nasuser" and the password to access the share.
|LAN      ||align="center" | 941 Mbps  ||align="center" |  941 Mbps 
+
==Create an NFS share==
|-  
+
Go to "Services" -> "NFS" -> "Settings" check the box at the top for "Enabled", and in the "Versions" section, select all versions, including "NFSv2", then click "Save" and apply the settings.<br />
|Notes:  ||colspan="2" |  1. test utility: iperf <br /> 2. use indepedent IP address section and test with a PC in simplex communication mode
+
<br />
|}
+
Go to "Services" -> "NFS" -> "Shares," click the "+" button, and in the "Shared folder" field, select the folder you want to share. here i select the "nfs" folder. In the "Client" section, enter the IP range or specific IPs that are allowed to access the share (e.g., 192.168.1.0/24). Set the permissions to "Read/Write", in the "Extra Options" field, Input:
 +
<syntaxhighlight lang="bash">
 +
rw,async,insecure,no_subtree_check,all_squash,anonuid=0,anongid=0
 +
</syntaxhighlight>
 +
Then click "Save" and apply the settings.
 +
===Testing NFS mounting on a Mac===
 +
Viewing OpenMediaVault's NFS Share Information via Command Line
 +
<syntaxhighlight lang="bash">
 +
# showmount -e YourIPAddress
 +
Exports list on YourIPAddress:
 +
/export                             192.168.1.0/24
 +
/export/nfs                         192.168.1.0/24
 +
</syntaxhighlight>
 +
Right-click Finder on your Mac, select "Connect to Server," and in the address bar, input:
 +
<syntaxhighlight lang="bash">
 +
nfs://YourIPAddress/export/nfs
 +
</syntaxhighlight>
 +
===Testing NFS mounting on Linux===
 +
Installing the NFS client
 +
<syntaxhighlight lang="bash">
 +
sudo apt install nfs-common
 +
</syntaxhighlight>
 +
Start to mount:
 +
<syntaxhighlight lang="bash">
 +
sudo mount -t nfs YourIPAddress:/export/nfs /mnt/nfs
 +
</syntaxhighlight>
 +
Checking the Status
 +
<syntaxhighlight lang="bash">
 +
# df -h | grep nfs
 +
YourIPAddress:/export/nfs 7.3G 3.5M  6.8G    1% /mnt/nfs
 +
</syntaxhighlight>
 +
To set up automatic mounting at boot time, add the following line to the /etc/fstab file:
 +
<syntaxhighlight lang="bash">
 +
YourIPAddress:/export/nfs /mnt/nfs nfs defaults 0 0
 +
</syntaxhighlight>
 +
==Transferring Docker Data to a Hard Drive==
 +
Access "Storage" -> "Shared Folders," and click the "+" icon to create three folders, namely:
 +
<syntaxhighlight lang="bash">
 +
docker            -> The Docker data directory, defined in /etc/docker/daemon.json
 +
docker-compose    -> Location of compose files
 +
docker-data      -> Location of persistent container data
 +
docker-app        -> For personal use, storing Dockerfiles and data
 +
</syntaxhighlight>
 +
Access "Services" -> "Compose" enter the "Settings" interface, and configure the "Shared folder" for "Compose Files" and "Data",<br />
 +
<br />
 +
Access the SSH terminal and execute the following command to move Docker data to the shared folder, where "/srv/dev-disk-by-uuid-XXYYZZ/docker" represents the absolute path of the shared folder, which can be obtained from the "Storage" -> "Shared Folders" list on the web interface:
 +
<syntaxhighlight lang="bash">
 +
su root
 +
systemctl stop docker.socket docker.service
 +
mv /var/lib/docker/* /srv/dev-disk-by-uuid-XXYYZZ/docker/
 +
</syntaxhighlight>
 +
On the web interface, set the "Docker storage" to the absolute path of the "docker" shared folder. save the settings and apply, and then reboot the system.
 +
==Install Nextcloud with Docker==
 +
Run the following command in the terminal:
 +
<syntaxhighlight lang="bash">
 +
su root
 +
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
 +
mkdir nextcloud
 +
cd nextcloud
 +
mkdir data
  
==Diagram, Layout and Dimension==
+
docker run -d -p 8888:80  --name nextcloud \
===Layout===
+
     -v $PWD/data:/var/www/html --restart=always \
[[File:NanoPi R2S-layout.jpg |frameless|550px|NanoPi R2S Layout]]
+
     --privileged=true  arm64v8/nextcloud
* '''GPIO 24-Pin Spec'''
+
</syntaxhighlight>
::{| class="wikitable"
+
you can access the Nextcloud web interface by opening a web browser and navigating to http://YourIPAddress:8888/ (replace YourIPAddress with the actual IP address of your device).  
|-
+
==Install Filebrowser with Docker==
| style="background: PaleTurquoise; color: black" colspan="1"| '''Pin#''' || style="background: PaleTurquoise; color: black" colspan="1"| '''Name'''|| style="background: PaleTurquoise; color: black" colspan="1"| '''Linux gpio'''|| style="background: PaleTurquoise; color: black" colspan="1"| '''Pin#'''|| style="background: PaleTurquoise; color: black" colspan="1"| '''Name'''|| style="background: PaleTurquoise; color: black" colspan="1"| '''Linux gpio'''   
+
Run the following command in the terminal:
|-
+
<syntaxhighlight lang="bash">
|1    || SYS_3.3V              ||     ||2    || VDD_5V              ||
+
su root
|-
+
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
|3    || I2C0_SDA / GPIO2_D1  || 89  ||4    || VDD_5V              ||
+
mkdir filebrowser
|-
+
cd filebrowser
|5    || I2C0_SCL / GPIO2_D0  || 88  ||6    || GND                  ||
+
|-
+
|7    || GPIO2_A2 / IR_RX        || 66  ||8  || UART1_TX / GPIO3_A4  || 100
+
|-
+
|9    || GND                  ||     ||10    || UART1_RX / GPIOG3_A6 || 102
+
|}
+
 
+
:For more details refer to:[http://wiki.friendlyelec.com/wiki/images/5/59/SCH_NanoPi_R2S_V1.0-1912.pdf NanoPi_R2S_V1.0_1912-Schematic.pdf]
+
:Dimensional Diagram:[http://wiki.friendlyelec.com/wiki/index.php/File:Dimension_NanoPi_R2S_V1.0-1912_PCB.rar NanoPi R2S PCB file in dxf format]
+
 
+
==Get Started==
+
===Essentials You Need===
+
Before starting to use your NanoPi R2S get the following items ready
+
* NanoPi R2S
+
* MicroSD Card/TF Card: Class 10 or Above, minimum 8GB SDHC
+
* MicroUSB 5V/2A power adapter
+
* If you need to develop and compile,you need a computer that can connect to the Internet. It is recommended to install Ubuntu 20.04 64-bit system and use the following script to initialize the development environment, or use docker container: <br />
+
**[https://github.com/friendlyarm/build-env-on-ubuntu-bionic How to setup the Compiling Environment on Ubuntu bionic]<br />
+
**[https://github.com/friendlyarm/docker-cross-compiler-novnc docker-cross-compiler-novnc]<br />
+
 
+
 
+
===TF Cards We Tested===
+
Refer to: [[Template:TFCardsWeTested/zh|TFCardsWeTested]]
+
{{1500000SerialPortDebugSetting}}
+
===Install OS===
+
{{Downloads-RK3328|NanoPi-R2S}}
+
{{BurnLinuxToSD-Rockchip|NanoPi-R2S}}
+
{{FriendlyWrt21|NanoPi-R2S}}
+
{{OfficialUbuntuCore|NanoPi-R2S}}
+
{{FriendlyCoreRemoveQt}}
+
{{OfficialDebianCore|NanoPi-R2S}}
+
==Buildroot Linux==
+
{{RK3399 Buildroot Intro|NanoPi-R2S}}
+
<br />
+
For a more detailed description of the Buildroot system, please refer to: [[Buildroot|Buildroot]]<br />
+
  
==How to Compile==
+
docker run -d -v $(readlink -f /srv/dev-disk-by-uuid-*):/srv \
{{Rockchip-DevEnv|NanoPi-R2S}}
+
    -v $PWD/filebrowserconfig.json:/etc/config.json \
{{RK3328-BuildFromSource|NanoPi-R2S}}
+
    -v $PWD/database.db:/etc/database.db -p 8080:80 \
{{RK3328-HWAccess|NanoPi-R2S}}
+
    --restart=always --name filebrowser \
{{RockchipMiscCustome|RK3328}}
+
    filebrowser/filebrowser
 +
</syntaxhighlight>
  
{{MoreOS}}
+
After completing the setup, you can access the Filebrowser web interface by opening a web browser and navigating to http://YourIPAddress:8080/ (replace YourIPAddress with the actual IP address of your device). The default username and password for Filebrowser are both "admin".  
==Resources==
+
==Install Jellyfin with Docker==
===Datasheets and Schematics===
+
Access "Storage" -> "Shared Folders," click the "+" icon to create a "media" folder for storing multimedia resources. Then, in the command-line terminal, you can run the following command to install Jellyfin:
* Schematics
+
<syntaxhighlight lang="bash">
** [http://wiki.friendlyelec.com/wiki/images/5/59/SCH_NanoPi_R2S_V1.0-1912.pdf NanoPi_R2S_V1.0_1912-Schematic.pdf]
+
su root
** [https://wiki.friendlyelec.com/wiki/images/0/0f/NanoPi-R2S-V1.1-2009-Schematic.pdf NanoPi-R2S-V1.1-2009-Schematic.pdf]
+
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
 +
mkdir jellyfin
 +
cd jellyfin
 +
mkdir config cache
  
* PCB Dimensional Diagram
+
docker run -d --name jellyfin \
** [http://wiki.friendlyelec.com/wiki/index.php/File:Dimension_NanoPi_R2S_V1.0-1912_PCB.rar NanoPi_R2S_V1.0_1912 PCB file in dxf format]
+
-v $PWD/config:/config \
* Datasheet
+
-v $PWD/cache:/cache \
** RK3328 Datasheet [http://wiki.friendlyelec.com/wiki/images/d/d7/Rockchip_RK3328_Datasheet_V1.1-20170309.pdf Rockchip_RK3328_Datasheet.pdf]
+
-v $(readlink -f /srv/dev-disk-by-uuid-*/media):/media \
 +
-p 8096:8096 \
 +
--restart=always \
 +
jellyfin/jellyfin
 +
</syntaxhighlight>
 +
After completing the setup, you can access the Jellyfin web interface by opening a web browser and navigating to http://YourIPAddress:8096/ (replace YourIPAddress with the actual IP address of your device). This will allow you to access and manage your media content using Jellyfin.
 +
==Install Portainer with Docker==
 +
Run the following command in the terminal:
 +
<syntaxhighlight lang="bash">
 +
su root
 +
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
 +
mkdir portainer
 +
cd portainer
 +
mkdir data
  
==Update Logs==
+
docker run -d \
{{RK3328-UpdateLog|NanoPi-R2S}}
+
  --name portainer \
 +
  --restart=always \
 +
  -e TZ=Asia/Shanghai \
 +
  -p 8000:8000 \
 +
  -p 9000:9000 \
 +
  -v /var/run/docker.sock:/var/run/docker.sock \
 +
  -v $PWD/data:/data \
 +
  portainer/portainer-ce:latest
 +
</syntaxhighlight>
 +
After completing the setup, you can access the Portainer web interface by opening a web browser and navigating to http://YourIPAddress:9000/ (replace YourIPAddress with the actual IP address of your device). The default administrator account username and password are both "admin".

Revision as of 07:58, 18 April 2024

查看中文

1 OpenMediaVault version

  • OS: Debian 12
  • OpenMediaVault: 7.0.5-1 (Sandworm)
  • Docker: 26.0.1
  • Others: built-in OMV-Extras

2 Earlier version OpenMediaVault

OpenMediaVault6

3 First Look

Openmediavault7.png

4 Supported platforms

  • RK3328
  • RK3399
  • RK3568
  • RK3588

5 Find IP Address

Since the hostname is set by default to the model of the development board, you can use the "ping" command to obtain the IP address. For example, for CM3588, you can use the following command:

ping CM3588

6 Access the OpenMediaVault web page

Enter the IP address of the development board in your web browser; the default login account for the web interface is:

Username: admin
Password: openmediavault

7 Change the web login password

Click on the profile picture in the upper-right corner of the web page, then select "Change Password"

8 Configure the web page timeout duration

Navigate to "System" -> "Workbench" and adjust the "Auto Logout" time setting.

9 Logging in via SSH

ssh pi@YourIPAddress

The default password is "pi".

10 Create the root user

Create the root user and add user to the root and ssh groups:

sudo passwd root
sudo gpasswd -a root root
sudo gpasswd -a root _ssh

You can now use the root user to log in via SSH:

ssh root@IPAddress

11 Configure the hard drive and shared folders

Two RAID profiles are available:

  • MD RAID: has better performance, because it does a better job of parallelizing writes and striping reads.
  • Btrfs RAID: has better data safety, because the checksumming lets it ID which copy of a block is wrong when only one is wrong, and means it can tell if both copies are bad.

11.1 Optional 1: MD RAID

11.2 Step 1: Initialize the storage device

Navigate to "Storage" -> "Disks", select your storage device, and click the "Wipe" icon to perform disk erasure (please ensure your data is backed up). Typically, you can choose "Quick" erase.
If the disk can't be wiped, you need to remove the Shared Folders on this disc and Umount it first.

11.3 Step 2: Create RAID

(Note: USB interface hard drives are not supported, and OpenMediaVault will not list USB storage devices on the RAID creation page.)
Go to "Storage" -> "Multiple Device" click the "+" icon, choose the RAID level, and apply the settings.

11.4 Step 3: Create File System

Go to "Storage" -> "File Systems," click on the "+" icon, and for the type, it's recommended to choose "BTRFS", Select "Single" and check the storage device. If you created a RAID in the previous step, choose a device starting with /dev/md. If it's a USB hard drive, choose /dev/sda.
After formatting is complete, openmediavault will let you choose which file system to mount, and choose the device you want to mount.

11.5 Step 4: Add Shared Folders

Go to "Storage" -> "Shared Folders," click the "+" icon to create two folders named "nfs" and "samba." We will use these folders for testing NFS and Samba sharing in the following steps.
(Note: If there were previously created shared folders on the hard drive, you can recreate them with the same names, and the data will be preserved.)

11.6 Optional 2: Btrfs RAID

(Note: If the hard drive has already been initialized and RAID has been preserved, you can proceed directly to step four for mounting.)

11.6.1 Step 1: Initialize the storage device

Navigate to "Storage" -> "Disks", select your storage device, and click the "Wipe" icon to perform disk erasure (please ensure your data is backed up). Typically, you can choose "Quick" erase.
If the disk can't be wiped, you need to remove the Shared Folders on this disc and Umount it first.

11.6.2 Step 2: Format, Create Btrfs RAID and Mount

(Note: USB interface hard drives are not supported, and OpenMediaVault will not list USB storage devices on the RAID creation page.)
Go to "Storage" -> "File Systems" click the "+" icon, choose the "BTRFS", choose the RAID level, select your disks, and then save the settings.
After formatting is complete, openmediavault will let you choose which file system to mount, it doesn't list all the disks, so you should choose a drive that starts with /dev/nvme.

11.6.3 Step 3: Add Shared Folders

Go to "Storage" -> "Shared Folders," click the "+" icon to create two folders named "nfs" and "samba." We will use these folders for testing NFS and Samba sharing in the following steps.
(Note: If there were previously created shared folders on the hard drive, you can recreate them with the same names, and the data will be preserved.)

12 Create NAS users

Debian system users or Linux users created via the command line may lack certain permissions required for services like Samba and NFS. Therefore, it is recommended to use the OpenMediaVault interface to create a user specifically for accessing Samba and NFS shares. Here, I will create a user and group named "nasuser":

Click on "Users" -> "Groups" and then click the "+" icon to create a user group named "nasuser".
Click on "Users" -> "Users" then click the "+" icon to create a user named "nasuser", change user's shell to "/usr/sbin/nologin", and select the "nasuser" and "users" groups.

13 Create a Samba share

Go to "Services" -> "SMB/CIFS" -> "Settings," check the box at the top for "Enabled," select "SMB1" as the minimum protocol version, and then click "Save"

Go to "Services" -> "SMB/CIFS" -> "Shares," click the "+" button, and in the "Shared folder" field, select the folder you want to share. as an example, here i select the "samba" folder

Testing:
On Mac system, right-click Finder, select "Connect to Server," and enter "smb://YourIPAddress" (replace with the actual IP address). A authentication dialog will appear; enter the username "nasuser" and the password to access the share.

14 Create an NFS share

Go to "Services" -> "NFS" -> "Settings" check the box at the top for "Enabled", and in the "Versions" section, select all versions, including "NFSv2", then click "Save" and apply the settings.

Go to "Services" -> "NFS" -> "Shares," click the "+" button, and in the "Shared folder" field, select the folder you want to share. here i select the "nfs" folder. In the "Client" section, enter the IP range or specific IPs that are allowed to access the share (e.g., 192.168.1.0/24). Set the permissions to "Read/Write", in the "Extra Options" field, Input:

rw,async,insecure,no_subtree_check,all_squash,anonuid=0,anongid=0

Then click "Save" and apply the settings.

14.1 Testing NFS mounting on a Mac

Viewing OpenMediaVault's NFS Share Information via Command Line

# showmount -e YourIPAddress
Exports list on YourIPAddress:
/export                             192.168.1.0/24
/export/nfs                         192.168.1.0/24

Right-click Finder on your Mac, select "Connect to Server," and in the address bar, input:

nfs://YourIPAddress/export/nfs

14.2 Testing NFS mounting on Linux

Installing the NFS client

sudo apt install nfs-common

Start to mount:

sudo mount -t nfs YourIPAddress:/export/nfs /mnt/nfs

Checking the Status

# df -h | grep nfs
YourIPAddress:/export/nfs  7.3G  3.5M  6.8G    1% /mnt/nfs

To set up automatic mounting at boot time, add the following line to the /etc/fstab file:

YourIPAddress:/export/nfs /mnt/nfs nfs defaults 0 0

15 Transferring Docker Data to a Hard Drive

Access "Storage" -> "Shared Folders," and click the "+" icon to create three folders, namely:

docker            -> The Docker data directory, defined in /etc/docker/daemon.json
docker-compose    -> Location of compose files
docker-data       -> Location of persistent container data
docker-app        -> For personal use, storing Dockerfiles and data

Access "Services" -> "Compose" enter the "Settings" interface, and configure the "Shared folder" for "Compose Files" and "Data",

Access the SSH terminal and execute the following command to move Docker data to the shared folder, where "/srv/dev-disk-by-uuid-XXYYZZ/docker" represents the absolute path of the shared folder, which can be obtained from the "Storage" -> "Shared Folders" list on the web interface:

su root
systemctl stop docker.socket docker.service
mv /var/lib/docker/* /srv/dev-disk-by-uuid-XXYYZZ/docker/

On the web interface, set the "Docker storage" to the absolute path of the "docker" shared folder. save the settings and apply, and then reboot the system.

16 Install Nextcloud with Docker

Run the following command in the terminal:

su root
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
mkdir nextcloud
cd nextcloud
mkdir data
 
docker run -d -p 8888:80  --name nextcloud \
    -v $PWD/data:/var/www/html --restart=always \
    --privileged=true  arm64v8/nextcloud

you can access the Nextcloud web interface by opening a web browser and navigating to http://YourIPAddress:8888/ (replace YourIPAddress with the actual IP address of your device).

17 Install Filebrowser with Docker

Run the following command in the terminal:

su root
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
mkdir filebrowser
cd filebrowser
 
docker run -d -v $(readlink -f /srv/dev-disk-by-uuid-*):/srv \
    -v $PWD/filebrowserconfig.json:/etc/config.json \
    -v $PWD/database.db:/etc/database.db -p 8080:80 \
    --restart=always --name filebrowser \
    filebrowser/filebrowser

After completing the setup, you can access the Filebrowser web interface by opening a web browser and navigating to http://YourIPAddress:8080/ (replace YourIPAddress with the actual IP address of your device). The default username and password for Filebrowser are both "admin".

18 Install Jellyfin with Docker

Access "Storage" -> "Shared Folders," click the "+" icon to create a "media" folder for storing multimedia resources. Then, in the command-line terminal, you can run the following command to install Jellyfin:

su root
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
mkdir jellyfin
cd jellyfin
mkdir config cache
 
docker run -d --name jellyfin \
-v $PWD/config:/config \
-v $PWD/cache:/cache \
-v $(readlink -f /srv/dev-disk-by-uuid-*/media):/media \
-p 8096:8096 \
--restart=always \
jellyfin/jellyfin

After completing the setup, you can access the Jellyfin web interface by opening a web browser and navigating to http://YourIPAddress:8096/ (replace YourIPAddress with the actual IP address of your device). This will allow you to access and manage your media content using Jellyfin.

19 Install Portainer with Docker

Run the following command in the terminal:

su root
cd $(readlink -f /srv/dev-disk-by-uuid-*/docker-app)
mkdir portainer
cd portainer
mkdir data
 
docker run -d \
  --name portainer \
  --restart=always \
  -e TZ=Asia/Shanghai \
  -p 8000:8000 \
  -p 9000:9000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v $PWD/data:/data \
  portainer/portainer-ce:latest

After completing the setup, you can access the Portainer web interface by opening a web browser and navigating to http://YourIPAddress:9000/ (replace YourIPAddress with the actual IP address of your device). The default administrator account username and password are both "admin".