简体中文 · Website · Deployment · API
Lazync is a self-hosted file library and directory synchronization system for personal NAS devices and Linux file servers. The server is written in Free Pascal, and the Windows desktop client uses Lazarus LCL.
The project keeps current server files as ordinary files in a Lazync-owned library, preserves version history, and synchronizes a bound Windows folder in the background. It is intended for operators who want to control both their storage and synchronization service.
Project status: alpha. The current release provides a usable automatic upload and remote create/update/delete download baseline. Review the known limitations before using Lazync as the only copy of important data.
- Ordinary-file storage with immutable file identities and historical versions.
- Resumable 8 MiB chunk uploads and conditional byte-range downloads.
- Incremental change journal with persistent cursors and full-reconciliation fallback when a cursor expires.
- Atomic replacement, recovery records for interrupted operations, and a single-writer library lock.
- User accounts, revocable device credentials, expiring sessions, login rate limiting, and per-directory read-only or read/write grants.
- Bilingual Web file manager with upload, download, folder creation, deletion, version history, restore, and administrator-managed users.
- Built-in HTTPS or deployment behind a TLS reverse proxy.
- English and Simplified Chinese desktop UI with a persistent system tray mode.
- One account and one managed-folder binding in the current UI, backed by a forward-compatible bindings model.
- Recursive
ReadDirectoryChangesWmonitoring plus periodic reconciliation for missed events, offline changes, and watcher overflow. - Separate FIFO upload and download workers: one transfer in each direction may run concurrently.
- Persistent resumable transfer state, SHA-256 verification, ETag concurrency protection, and atomic installation of downloaded files.
- Empty-directory synchronization and file, directory, glob, and extension filters.
- Optional Explorer status overlays and a Lazync icon on the managed root.
- Device tokens stored in Windows Credential Manager; passwords and tokens are not written to the client INI file.
- Automatic use of Windows trusted roots. Untrusted private certificates require explicit SHA-256 fingerprint review and are pinned to the account binding.
Windows managed folder
|
| filesystem notifications + reconciliation
v
Lazync Windows client <==== HTTPS ====> Lazync server
| |
| Credential Manager | user grants / version history
v v
local binding state Lazync-owned file library
The server is the authority for account permissions, file identities, version
history, and the remote change journal. The client owns only its configured
managed directory and the hidden .lazync-client metadata directory inside it.
Requirements: Free Pascal 3.2.2 or newer. OpenSSL 3 development/runtime libraries are required when using the built-in HTTPS listener.
git clone https://github.com/shenmin/lazync.git
cd lazync
bash ./scripts/build_linux.shThe server binary is written to build/linux/server/lazync_server.
Generate a private configuration, review its storage and TLS paths, and validate it before starting:
./build/linux/server/lazync_server \
--write-example-config ./lazync-server.ini
./build/linux/server/lazync_server \
--config ./lazync-server.ini --check-config
./build/linux/server/lazync_server \
--config ./lazync-server.iniDo not expose a plain HTTP listener through router port forwarding. See the Linux/NAS deployment guide for systemd, directory-confined NAS deployment, reverse proxies, private CAs, and certificate renewal.
Requirements:
- Lazarus with a Win64 Free Pascal compiler;
- a trusted Win64 OpenSSL 3 runtime containing
libssl-3-x64.dllandlibcrypto-3-x64.dll.
Set LAZARUS_DIR and optionally OPENSSL_BIN_DIR, or pass them explicitly:
powershell -ExecutionPolicy Bypass -File .\scripts\build_windows.ps1 `
-LazarusDir D:\lazarus `
-OpenSslBinDir "C:\Program Files\Git\mingw64\bin"The portable client is written to build/windows/client. Run
lazync_client.exe, enter the HTTPS server URL, account credentials, and an
empty or reusable Lazync-managed folder. Explorer overlays are optional; their
registration instructions are in
packaging/windows/README.md.
- Use HTTPS for every connection outside the local process boundary.
- Server files and historical versions are plaintext. Use NAS volume encryption if encryption at rest is required.
- Keep the server INI private: it contains the root-managed administrator password by design.
- Do not let other applications write directly into the server library.
- Back up both live files and the
.lazyncmetadata tree in one consistent snapshot. - Compare a manually accepted certificate fingerprint through an independent channel before trusting it.
Read SECURITY.md before an Internet-facing deployment.
The following are not implemented yet:
- propagation of local deletion and local rename operations;
- automatic conflict-copy creation and complete offline multi-device conflict resolution;
- multiple active accounts or managed folders in the desktop UI;
- binary delta transfer, a Windows installer, and automatic updates.
Changed files are transferred in full, although interrupted uploads and downloads resume. The desktop protocol allows a single file up to 2 TB and a binding up to 500,000 files, but practical limits depend on the NAS, filesystem, network, version retention, and path structure. See capacity and transfer limits.
assets/ Logo and application artwork
client/ Lazarus LCL client and Explorer extension source
server/ Free Pascal server and managed file-library source
shared/ Units shared by client and server
docs/ API, storage, and limits documentation
packaging/ systemd, standalone NAS, and Windows packaging resources
scripts/ Public build and artwork-generation entry points
third_party/ Vendored dependencies and their license information
Generated output is written below build/ and is not versioned.
- Linux/NAS deployment
- HTTP API reference
- Storage model
- Capacity and transfer limits
- Windows packaging
- Security policy
Lazync is licensed under the
GNU General Public License version 3 (GPL-3.0-only). Vendored
dependencies retain their own compatible licenses; see
third_party/synapse/README.md and source-file
headers in that directory.
Lazync combines “Lazarus” and “sync”. It is not affiliated with Dropbox, Synology, Microsoft, or any other storage vendor.