Installing Plex Server on R4S: Notes
Environment Configuration
- Model: FriendlyElec NanoPi R4S
- Firmware version: OpenWrt R22.3.13 (2022-06-22)
- Architecture: ARMv8 Processor x 6
- Environment: Google Direct
Preparations
- Prepare a network that can access Google on your own
- Install an OpenWrt system with docker
- Expand the storage card capacity for docker
Pitfall Notes
Architecture Issue
Most existing tutorials for setting up Plex with docker are based on the X86 architecture. If you set it up using the docker image from plexinc/pms-docker, an error will appear in the docker container logs: stderr: exec /init: exec format error
This is because the docker container you installed does not match your system architecture.
So I found the ARM-architecture PLEX from linuxserver/plex and started the installation:
docker run \
-d \
--name plex \
-p 32400:32400/tcp \
-p 3005:3005/tcp \
-p 8324:8324/tcp \
-p 32469:32469/tcp \
-p 1901:1900/udp \
-p 32410:32410/udp \
-p 32412:32412/udp \
-p 32413:32413/udp \
-p 32414:32414/udp \
-e TZ=Asia/Shanghai \
-e PLEX_CLAIM=claim-xfczZtmEH5QPvZQc1HsF \
-e ADVERTISE_IP="http://192.168.31.1:32400/" \
-h Zero-R4s \
-v /myplex/plex/database:/config \
-v /myplex/transcode/temp:/transcode \
-v /mnt/sda/Media:/data \
--restart unless-stopped \
lscr.io/linuxserver/plex:latestThe specific tutorial can also be found at linuxserver/plex. Just adjust it according to your own situation.
PLEX Has No Initial Setup Page
This means that when entering the Plex application interface for the first time, you may encounter a “server not found” issue because remote access has not been enabled. In this case, you can use the following two methods to solve it:
1. SSH Port Forwarding
You need to open the PowerShell tool on your local computer, then run the command above to forward the Plex port of the remote server (default is 32400) to a port on your local computer (for example, 8888). After the port forwarding succeeds, you can access localhost:8888/web in your local computer’s browser to open the Plex application interface.
2. Direct Connection
If remote access has already been allowed on the remote server, you can try directly accessing the remote server’s IP address and Plex port in the browser (for example, http://13.124.4.66:32400/web) to open the Plex application interface.
Solution
On macOS, you can use the iTerm application to set up SSH port forwarding. The specific steps are as follows:
1. Connect to the Remote Server
Enter the following command to connect to the remote server, where username is the username on the remote server, and remote_server_ip is the IP address of the remote server:
ssh -L 8888:localhost:32400 username@remote_server_ip
This will forward Plex’s 32400 port on the remote server to port 8888 on the local computer.
2. Enter the Password on the Remote Server and Verify
Now, you can open the browser on your local computer and enter http://localhost:8888/web to access the Plex interface on the remote server.
Another Error
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ED25519 key sent by the remote host is
SHA256:OC9qmnB9nQtFN/OiPH7jGEoKb/zbX4NghGv/glu5dwQ.
Please contact your system administrator.
Add correct host key in /Users/yikzero/.ssh/known_hosts to get rid of this message.
Offending ED25519 key in /Users/yikzero/.ssh/known_hosts:1
Host key for 192.168.31.1 has changed and you have requested strict checking.
Host key verification failed.This error message indicates that the key of the remote server previously connected to has changed. This may be because the server underwent a system update or the administrator changed the server’s key. To protect information security, the SSH client checks and verifies the remote server’s key. If the key has changed, this error message will appear.
Update the remote server key data on the local computer to resolve the issue. The steps are as follows:
-
Delete the old key: Run
ssh-keygen -R <remote_server_ip>to delete the old key data on the local computer. -
Connect to the remote server: Connect using
ssh username@remote_server_ip.- The system will prompt “Are you sure you want to continue connecting (yes/no)?”. Enter yes and press Enter.
- Enter the remote server password to verify.
- After connecting, run the command again to set up SSH port forwarding.
After completion, you can access the PLEX server.