Notes on Installing the Plex Server on R4S
Environment Configuration
- Model: FriendlyElec NanoPi R4S
- Firmware Version: OpenWrt R22.3.13 (2022-06-22)
- Architecture: ARMv8 Processor x 6
- Environment: Google Direct
Prerequisites
- Self-provision a network capable of accessing Google
- Install an OpenWrt system with Docker enabled
- Expand memory card capacity for Docker
Pitfall Log
Architecture Issues
Most existing tutorials for setting up Plex via Docker are based on X86 architecture. If you set up using the plexinc/pms-docker Docker image, you will get an error 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.
Therefore, find the ARM architecture PLEX image at linuxserver/plex and start 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:latest
Detailed operational tutorials can also be found at linuxserver/plex. Adjust settings according to your specific requirements.
PLEX Missing Initial Setup Page
This means that when first accessing the Plex application interface, you might encounter a "Server not found" issue because remote access has not been enabled. You can use the following two methods to solve this:
I. SSH Port Forwarding
You need to open the PowerShell tool on your local computer, and then run the command above to forward the remote server's Plex port (default 32400) to a port on your local computer (e.g., 8888). After successful port forwarding, you can access localhost:8888/web in your local computer's browser to open the Plex application interface.
II. Direct Connection
If the remote server already allows remote access, you can try accessing the Plex application interface directly in your browser using the remote server's IP address and Plex port (e.g., http://13.124.4.66:32400/web).
Solution
On macOS, you can use the iTerm application to set up SSH port forwarding. The specific steps are as follows:
I. 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.
II. Enter the Remote Server Password and Authenticate
Now, you can open the browser on your local computer and enterhttp://localhost:8888/web to access the Plex interface on the remote server.
Error Again
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 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 isSHA256: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:1Host 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 previously connected remote server has changed. This might be due to a system update on the server or an administrator changing the server's key. To protect information security, the SSH client checks and verifies the remote server's key, and if the key changes, this error message appears.
Update the remote server key data on your local computer to resolve the issue. The steps are as follows:
-
Delete the old key: Execute
ssh-keygen -R <remote_server_ip>to delete the old key data on your 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 authenticate.
- After connecting, rerun the command to set up SSH port forwarding.
Once completed, you can access the PLEX server.