How to Easily Install Zdir 4 on Synology NAS for Advanced File Sharing
Zdir 4 is a versatile private storage application developed with Golang and Vue3. It supports file indexing, online previewing, and sharing, along with advanced features like WebDAV and offline downloading, making it ideal for NAS devices. This tutorial explains how to easily install Zdir 4 on a Synology NAS, enabling you to build your own advanced file sharing system, perfect for home media collections or file distribution.

Feature Overview
Zdir 4 automatically scans both public and private directories. Place files you want to share publicly in the public directory and keep private files in the private directory. You can switch between them instantly using the button in the top-right corner, keeping them completely separate.

Private files can be shared individually with password protection and expiration time settings.

You can create a music folder and place songs inside it. Zdir 4 will automatically scan the entire folder, turning the application into an online music player.

Zdir 4 includes a built-in offline downloader that requires zero configuration. It supports HTTP/HTTPS and magnet links, making downloads easier.

If a downloaded video cannot be decoded by the browser, you can call the local player for playback.

With Zdir 4's unique file description feature, you can set a specific description for each shared file, making it easier for visitors to understand the content.

Common text formats support code highlighting and online editing.

For more advanced usage, Zdir 4 includes built-in WebDAV functionality. You can connect any WebDAV-compatible client to Zdir 4 to unlock features like music playback, video management, and file synchronization.
Note: Some of the above features are advanced and require a paid Pro license to unlock.
Installing Zdir 4 on Synology NAS
Importing the Image
Since Docker official images are unavailable in China, Zdir provides an offline image for download. Visit the following link to download the image to your local device: https://soft.xiaoz.org/#/zdir/docker/zdir4.tar?type=file
Then, open Container Manager >> Images >> Actions >> Import >> Add from File >> From Local Device and select the downloaded zdir4.tar file.

Note: If you can resolve the issue of pulling Docker images on Synology, you can skip this step!
If your network allows downloading Docker images, you can search for zdir in the Registry and download the version tagged helloz/zdir:4. (Without image caching, 4 always represents the latest version, not latest.)

Installing Zdir 4
Switch to the Images tab, find helloz/zdir:4, right-click, and select Run.

Fill in the details as shown below.

- Container Name: Enter any name (recommended:
zdir4) - Enable Resource Limits: Optional
- Start Automatically: Check this box
Next, configure the port and mount paths.

- The first
6080is the access port (you can change this); the second6080is the internal container port and must not be changed. /opt/zdir/data: Data storage directory (contains database and configuration)./opt/zdir/data/public: Public file directory (accessible by all users)./opt/zdir/data/private: Private file directory (accessible only after login).
The first column directories should be chosen based on your local Synology folders. The second column directories are internal container paths and must not be modified, otherwise, data loss may occur.
In the Advanced section, check Use High Privilege to Run Container, keep other settings default, and click Next.

Click Finish.

Finally, access your Synology IP at the configured local port to complete the Zdir initialization.

Additional Notes
Zdir 4 is not limited to Synology NAS. You can install it on any Docker-enabled device, such as QNAP, Zspace, Greenlink NAS, or even a VPS.
- Zdir 4 Official Website: https://www.zdir.pro/zh/
- Demo Address: https://soft.xiaoz.org/#/
- Help Documentation: https://doc.xiaoz.top/web/#/10/54
Conclusion
This article covers the basic features of Zdir 4 and the installation method on Synology NAS. If you are interested, you can scan the QR code below to join the official Zdir WeChat group. If the QR code has expired, you can add the author's WeChat ID: xiaozme to be invited.
