Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Plex and Syncthing to build a Media Center

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail how to use Plex and Syncthing to build a media center. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

The author's equipment: Acer notebook (Archlinux), Xiaomi TV (Android). It may be different from your device, but the principle is similar. I learned that even for the Windows version, the policies for users and permissions are the same. Or you can install an Arch.

Software introduction

Plex is a set of software, including media server, Android and other terminal devices App. Support transcoding and metadata-based classification, as well as select different bit rates during playback.

Syncthing open, decentralized file synchronization software. The P2P mechanism is so powerful that it can be synchronized with the intranet service at home in the company.

Systemd is a very advanced daemon management tool under Linux, and it is easy to use. A simple example can be found in this article: using systemd to manage Node.js applications

Set up Syncthing service

Syncthing has a lot of binary to download, so you can pick a suitable download and install it. Archlinux can be installed from AUR:

Yaourt-S syncthing

Start the service with systemd:

Systemctl start syncthing@harttle.service systemctl enable syncthing@harttle.service

The @ harttle suffix makes it work under harttle users and needs to be changed to your system user name. In this way, the file created by Syncthing has the default permissions of the harttle user, and Owner is harttle:users.

After startup, you can access the service. You need to install Syncthing on each device so that they can synchronize files with each other after exchanging ID. Backup policies and shared directories can be set on Web UI. If your service starts on a remote server like [Harttle] (/), you can use SSH to Forward the Web UI port locally:

# use your server address ssh 192.168.1.xx-L 8384:localhost:8384

And then visit the local. The same is true of the later Plex Web ports, so I won't repeat them.

Set up Plex service

Similarly, install AUR plex and start:

Yaourt-S plex-media-server systemctl start plexmediaserver systemctl enable plexmediaserver

In order for Plex to read and write Syncthing files, you need to have Plex run on harttle users as well. There are two things you need to do.

1. Change Startup user

Edit the Systemd Unit file / etc/systemd/system/multi-user.target.wants/plexmediaserver.service and change User and Group to yours:

[Service] User=harttle Group=users

two。 Change runtime file permissions

Since we changed the Plex startup user, we also need to change the Plex workspace directory / var/lib/plex accordingly. The Owner of this directory should be the same as the startup user, otherwise it will not start normally. If your directory is not this, you can trace it all the way to this directory from the configuration in the Systemd Unit file.

Chown harttle:users-R / var/lib/plex

The log file is also here and can be used to debug: / var/lib/plex/Plex\ Media\ Server/Logs. Then restart the Systemd Unit of Plex:

Systemctl daemon-reload systemctl restart plexmediaserver

You can manage media content and directories by visiting localhost:32400. To upload to Plex with Syncthing, simply set the Syncthing and Plex directories to the same, and upload the corresponding folder of the Syncthing node to send only.

Client

If you can also access Plex Media Server from other machines on the local area network, the service has been started successfully. After starting Plex, you can access the DLNA service from Xiaomi TV. It will be easier to use after installing the Plex Android client. Download: https://www.apkmirror.com/apk/plex-inc/plex/. Screenshots of usage are attached:

On how to use Plex and Syncthing to build a media center to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report