Tag Archives: Plex

Bye-Bye Synology, Hello Mac Mini

I had been using my Synology NAS for a few months now. However, as I started to do more and more with it, its inherent lack of processing power started to irk me. The CPU was too slow, the RAM too limited. More than that, its ugliness on my living room shelf disgusted me. Eventually, I decided to replace it with a Mac Mini.

Synology DS224+ next to my Mac Mini
Synology DS224+ next to my Mac Mini

Since I was anyways using the NAS more as a computer than for storage (a measly few hundred GBs), the choice was not difficult. I got a good deal on a used Mac Mini M2 Pro and went about migrating my data and services from the Synology.

Remote Access

Since I planned to use the Mac Mini as a headless server, the first thing I needed to do during setup was enable remote access. I used my TV as the initial display. Luckily, macOS has built-in VNC & SSH servers and enabling them was as simple as checking a few boxes.

Remote Management and Remote Login, macOS
Remote Management and Remote Login, macOS
Remote Management, macOS
Remote Management, macOS

With an Apple only environment, you can have better security by

  1. Selecting the “Remote Management”, not the “Screen Sharing” option
  2. Not selecting the “VNC viewers may control screen with password”
  3. Using VNC over SSH when connecting with clients over the internet

The above will break compatibility with most commercial VNC applications. I like Screens 5 & Termius for VNC and SSH respectively. Both apps are paid, but quite powerful.

After verifying that remote access was working, I disconnected the TV, keyboard and mouse for good & haven’t needed them since.

Docker & Threadfin

The service I was most worried about was Threadfin, because it is not natively supported on the Mac and I need to run it within docker.

Thankfully, docker desktop works quite seamlessly on the Mac and the settings & environment variables look similar to container manager on Synology. My only problem was, I couldn’t get the container to auto-start after reboots, using environment variables in the GUI. Eventually, I could get it to work via the terminal

docker update --restart always <container_id>

Once it worked, I could clearly see the performance difference. While on Synology, the container took approx 2-3 mins from start to being usable, on the Mac, it takes less than 10 seconds.

PS: You can’t fetch new images from docker’s repository till you click on the verification link sent via email, if you have created a new account.

CloudflareTunnel

Cloudflare tunnel is installed via homebrew. It is as simple as copy/pasting a few commands via Terminal. Since the configuration of the tunnel is handled from the Cloudflare dashboard, there are no further steps required on the Mac itself.

Bonus feature, Cloudflare also allows you to setup VNC & SSH connections to your device, exposing a web interface to any browser you want to use it with. Over the same tunnel.

Plex & Homebridge

Plex is supported natively on the Mac and installing it is as easy as mounting the disk image. It detected Threadfin as a DVR fairly easily.

At first, Plex refused to detect media content from my external SSD, which was an APFS encrypted volume. However, after erasing it and setting it up as un-encrypted, it was detected fairly quickly. Funnily, once I encrypted it again, it continued to work, so I am not sure what the original problem was.

Homebridge is also natively supported on the mac and is installable via homebrew. Thankfully it comes with backup/restore functionality out-of-the-box, which worked seamlessly. Just had to keep in mind 2 things:

  1. The plugins are not backed up and restored, so these need to be installed on the new machine manually before restoring the backup
  2. I had to delete the bridge from my home app and add it again for my device status to work properly.

Backblaze Backup

Unlike my NAS, there’s no disk redundancy on the mac, so I chose to subscribe for Backblaze’s backup service. It is quite cheap, allows unlimited storage and if you need, they can even send you a USB drive to restore your content from.

Backblaze backup on macOS
Backblaze backup on macOS

It took around 2 days for the client to upload all my data in auto-throttled mode.

qBittorrent

For macOS, most people recommend Transmission to download torrents and the app itself is rock-solid, however, it is lacking support for RSS feeds. One can use add-ons like flexget to enable this, but I couldn’t get it to work.

Eventually, I settled for qBittorrent, which, although dated, has all the necessary features and works quite well. Its web UI is near-unusable on mobile phones, though and I couldn’t find a client on the App Store which works well, yet.

qBittorrent v5.0.5 on macOS
qBittorrent v5.0.5 on macOS

Resource & Environmental monitoring

I use TG Pro to monitor environmental parameters like temperature, fan speeds. It is a paid app, but is quite cheap and requires a one-time-payment only.

I use stats to monitor the CPU, GPU, Memory and bandwidth utilisation on the Mac. It is open-source and installable via homebrew.

Stats & TG Pro on Mac Menu bar
Stats & TG Pro on Mac Menu bar

Summary

Overall, what I miss most from my Synology is its easy-to-use web interface and cloud connectivity features, which worked seamlessly. Even after a lot of effort, I cannot achieve the same level of integration on the mac, as all the services are from separate providers & lack cohesion.

However, the sheer computing power and the lack of physical ugliness more than makes up for it.

Synology DS223j NAS

Recently, I had been looking to move my pirated media away from the Mega + Infuse combo (Mega had been throttling transfers, causing choppy videos). Additionally, I was paying monthly subscription fees for both. So I decided to move everything to a NAS. My main requirement was for the NAS to not be based on x86-64 architecture and especially not an Intel processor. After a tight battle with the TerraMaster F2-212 and ASUS Drivestor 2, I decided to go with the Synology DS223j.

Even though the TerraMaster and Asustor provided more value for money and in some cases more features (Hot swappable drives, 2.5Gbps ethernet expansion), Synology won me over with their superior software and cloud-based backend.

Overall, few weeks later, I don’t regret getting the Synology DS223j at all.

NAS doing NAS-ing
NAS doing its NAS-ing

Storage

The first action after ordering the NAS was to order the drive(s).
I didn’t need much storage space, but I did need redundancy, so I went with 2x2TB drives.

DriveCapacitySpinR/W SpeedCache
Seagate IronWolf
S2000VN003
2TB5400 RPM180MB/s256MB
WD Red Plus
WD20EFPX
2TB5400 RPM175MB/s512MB

Following best practice, I got 2 drives with similar performance numbers, but different models, as I didn’t want them to fail around the same time. This happens especially if you buy 2 drives of the same model from the same batch.

The DS223j does not support hot swap of drives, you need to open up the NAS chassis and install the drives using screws.

For redundancy, I chose Synology Hybrid RAID, which works well enough.

Synology DSM 7

Synology DSM is a web based interface to access your NAS. It is extremely intuitive and powerful. The first time it needs to be accessed using the local IP; once signed in to the Synology account, you can access it via Synology’s cloud-based web app (QuickConnect).

Although Quickconnect can allow inbound connections to your server natively using UPnP, I strongly recommend keeping that disabled on your router and using manual port forwarding rules, instead. It can also check if you configured your router correctly or not.

The Control Panel lets you configure almost any aspect of the NAS, I didn’t have to login using the Linux Terminal even once.

There was a short learning curve over a few days to understand what “storage space”, “volume”, “shared folders” meant and I was able to settle down on the configuration in a few days.It even lets you adjust the brightness of the LEDs on the front of the unit and auto-change them during different times of the day. (The Blue Power LED is especially irritating early mornings).

Next, its time to install apps.

Media Server-1 : Plex

Media sharing was the primary reason for getting the NAS. I created a separate encrypted Shared Folder to store my media on.

I spent sme time researching and comparing Plex, Jellyfin and Emby. I installed Plex because the Pros outweighed the cons

Plex Pros
  1. Functional, powerful settings
  2. Fast Library scanning
  3. Cloud/Plex Account based connectivity <—Some self-hosting purists would consider this a con
  4. Accurate metadata retrieval
  5. Natively installable from Synology Package Manager
Plex Cons
  1. Hardware transcoding does not support ARMv8 processors.
  2. Hardware transcoding is a paid feature.
  3. Interface is cluttered, Plex tries to shove its streaming services down your throat (Can get around this by using A 3rd party client like Infuse)
  4. Plex Relay is massively bandwidth limited, even with a paid subscription. Without this, need to pay for a public IP and also setup port forwarding.
  5. Plex can see what you have and what you’re watching.

Once installed, the web interface is enabled. You only need to use the local web interface once to sign in to your Plex account. Further access can be via Plex’s cloud-based web app.

Although Plex can allow inbound connections to your server natively using UPnP, I strongly recommend keeping that disabled on your router and using manual port forwarding rules, instead.

It can also check if you configured your router correctly or not.

Streaming performance is great even without transcoding. I never saw the CPU go above 30% when streaming, nor did I experience skipping and buffering.

Media Server-2. : Jellyfin

I also installed Jellyfin to test it against Plex.

Jellyfin Pros
  1. Completely open source
  2. Completely free
  3. No requirement to have a JellyFin account (The connection is directly between the client and the NAS)
Jellyfin Cons
  1. Indexing is slow and painful.
  2. Movie/V Show matching is not as accurate as Plex
  3. Requires more technical involvement to get it working
  4. Since there’s no cloud component, you have to manually choose between a local connection and an internet-based connection (Some may consider this a Pro)

On Synology, the easiest way to get Jellyfin up and running is as below:

  1. Install Jellyfin from Synocommuity using this guide
  2. Enable https access for Jellyin
    • Set up Dynamic DNS and SSL certificate using this guide
    • Set up reverse proxy on DSM and point it to Jellyfin using this guide

On clients, you can install the Swiftfin client. However, there’s a catch:

  1. For devices like TVs, you will obviously connect to Jellyfin server using your local IP
  2. For mobile devices like iPhone/iPad, the switching is not automatic (Like Plex). When on the same network, you need to connect (over http) using the local IP, when outside, need to connect (over https) using the dynamic DNS name set up previously. I didn’t bother and set up the WAN connection permanently. This means even when I am at home, I am streaming over the internet.

The interface is cleaner than Plex, as in it is not trying to shove its own services down your throat.

Eventually I found Plex to be a better match for me and got rid of Jellyfin.

Private Cloud : Synology Drive

Having a second backup of all my photos (First backup is on iClown) was the other reason for buying the NAS.

The NAS comes pre-installed with Synology Cloud Sync, which can automatically sync with a public cloud. I would have preferred this way, but unfortunately, iCloud is not among the list of supported clouds (The fault is likely on Apple’s side for locking down their ecosystem). So I decided to use my iPad to backup photos from my iCloud to the NAS.

Now, there’re two apps which you can use to backup your photos From your iDevice to your NAS – Synology Drive and Synology Photos. Synology Drive works quite like the Google Drive and OneDrive apps; it can be used for file management and backup. Synology Photos, on the other hand focuses on photos and can also act like a media gallery. Both can backup photos equally well and do, to the same location on the NAS. Both apps are quite well built and designed.

I wanted to treat my photos as files and didn’t want the photo management features, so I went with Synology Drive.

The options to backup files and photos are quite extensive.

The app automatically backs up new photos in the background, but this process is quite throttled because of Apple’s restrictions. For the first upload, there’s a special focussed backup mode which can keep the app in the foreground, but lower the screen brightness. Using this, I was able to upload all 18000 photos and videos overnight.

Backing up files and documents is a more manual process. You need to frequently copy your files to a dedicated sync folder and the app syncs them from there on.

Synology Drive sync task settings
Synology Drive sync task settings

Apart from requiring manual sync every few days, your device also needs to store 2 copies of each file, which is not ideal. Luckily, it takes less than 10 minutes to upload <20GB of documents (~1800 files).

It’s also a waste of bandwidth, because it synced and overwrites everything, every time, not just changes.

Local Storage : SMB

For local storage and backup, I debated between SMB and AFP. Although AFP did provide faster transfer speeds, I went with SMB because of dwindling support for the former.

DSM provides granular control for multiple users, allowing you to choose which user can access which part of the file system. Eg, I created a separate account for my daughter and assigned a file storage quota on a dedicated shared folder for her MacBook to make nightly automatic backups using Time Machine.

IoT Management : Homebridge

Homebridge allows your NAS to emulate itself as an Apple HomeKit bridge, which further allows you to see non-HomeKit accessories in your Home app. The app is completely open source, and so are the plugins. Ideally you need 1 plugin for each non-HomeKit device you have. I used the below plugins

PluginDeviceData Supported
Homebridge LG ThinQLG ThinQ Washing machine1. Operational Status
2. Door Lock status
Homebridge MiotMI 3C Air Purifier1. Operational Status
2. Mode Toggle (Auto/Sleep/Full)
3. PM2.5 level
4. Temperature
5. Relative Humidity
6. Fan speed control

There are thousands of plugins available, covering almost every vendor of smart home devices.

Unlike Plex, Homebridge is not natively available in the Synology Package Manager, you need to add a new repository and install from there.

Your IoT devices need to have a consistent IP address on the local network, I suggest setting up DHCP binding on your router. Some of the plugins have quite an involved process of adding devices, but thankfully it is a one time thing. Once done, the data from your accessories will appear in the Homebridge UI.

Homebridge showing data from IOT
Homebridge showing data from IOT

Once you add your Homebridge as a HomeKit bridge in your Apple Home, the data is further relayed to the Home app on all your devices.

The experience is not as seamless as native HomeKit devices and this is not what I bought the NAS for, but it was a pleasant bonus, nonetheless.

Antivirus : Antivirus Essential

Antivirus Essential is Synology’s antivirus solution. I am not sure how effective it is, but it is a pain to run the first time. The first “full scan” took 4 days with the NAS too busy to do almost anything else during that time. Even the first time update of virus definitions takes hours.

Thankfully, if you enable “smart scan”, subsequent scans are much faster (Around an hour).

Probably the performance is much better on more powerful units.

Download Manager : Download Station

Download Station is Synology’s web based download manager. For a first party app, it is quite powerful. It can download files from a wide variety of URLs & P2P file types.

You can even download using RSS feeds. It is not as powerful as some dedicated clients, but it is good enough that I don’t use a 3rd party utility.

It even supports eMule!