Ghi chép về máy chủ tệp tin và quản lý người dùng trong công ty nhỏ tại Việt Nam

Triển khai máy chủ tệp tin nội bộ sử dụng TrueNAS SCALE, SMB và Tailscale cho công ty nhỏ tại Việt Nam.

🇻🇳 Tiếng Việt

Enterprise-Hero-1

Bài viết này ghi lại quá trình triển khai máy chủ tệp tin cho một công ty nhỏ tại Hải Phòng, quy mô dưới 20 nhân sự.
Công ty cần một giải pháp chia sẻ tệp tin đơn giản giữa các máy tính chạy Windows 10/11.


1. Yêu cầu đối với hệ thống

Vì nhân viên không chuyên CNTT, hệ thống cần đơn giản, ổn địnhdễ bảo trì.
Ngoài ra, còn có các yêu cầu cụ thể:


2. Các lựa chọn cân nhắc

Chia sẻ tệp là nhu cầu cơ bản, có nhiều giải pháp sẵn sàng. Dưới đây là các lựa chọn được xem xét.

2.1. Hệ điều hành

Để chạy máy chủ tệp tin, có thể dùng Linux, FreeBSD hoặc các hệ điều hành tối ưu cho NAS:

Chúng tôi chọn TrueNAS SCALE vì giao diện Web quản trị tốt và hỗ trợ phần cứng tốt hơn FreeBSD.

2.2. Giao thức chia sẻ tệp

Các giao thức phổ biến cho chia sẻ tệp tin gồm:

Chúng tôi chọn SMB vì tương thích tốt với Windows 10/11. WebDAV cũng khả thi nhưng bảo trì phức tạp hơn.
TrueNAS SCALE quản lý người dùng và ACL rất tốt với SMB, do đó là lựa chọn tối ưu.


3. Lựa chọn cuối cùng

Để đơn giản hóa quản trị, hệ thống cuối cùng gồm:


4. Triển khai TrueNAS SCALE “Dragonfish” 24.04

Open-Storage-That-Scales-Graphic-2024_805x453px

4.1. Cấu trúc phân quyền

Với quy mô nhỏ, việc phân quyền đơn giản:

4.2. Mạng riêng ảo (VPN)

Ban đầu sử dụng WireGuard Easy, nhưng gặp lỗi cập nhật DNS chậm.
Sau đó chuyển sang Tailscale để ổn định hơn, chỉ giữ WireGuard cho truy cập giao diện TrueNAS Web.

wg-easy

WireGuard Easy:

Tailscale:

4.3. Sao lưu sau giai đoạn thử nghiệm


5. Các vấn đề gặp phải

5.1. WireGuard client mất kết nối

Một số máy khách Windows bị mất kết nối, cần kích hoạt lại thủ công.
Nguyên nhân: máy chủ WireGuard dùng DDNS, khi IP thay đổi endpoint không cập nhật kịp.
Đã khắc phục bằng Tailscale.


Bài viết tổng hợp từ kinh nghiệm triển khai thực tế tại doanh nghiệp nhỏ tại Việt Nam. Hy vọng hữu ích cho những ai đang tìm kiếm giải pháp lưu trữ và bảo mật dữ liệu nội bộ.


🇬🇧 English

This post documents the process of deploying a file server for a small company in Hai Phong, Vietnam, with fewer than 20 employees.
The company needed a simple and reliable solution for sharing files between Windows 10/11 clients.


1. System Requirements

Since most employees are non-technical, the system must be simple, stable, and easy to maintain.
Specific requirements included:


2. Options Considered

File sharing is a basic requirement with many ready-made solutions. Below are the evaluated options.

2.1. Operating System

To host a file server, you can use Linux, FreeBSD, or NAS-optimized OS:

We selected TrueNAS SCALE because it provides an excellent web interface and broader hardware compatibility than FreeBSD.

2.2. File Sharing Protocols

Common protocols include:

We chose SMB for its strong compatibility with Windows 10/11 clients.
WebDAV works too, but is more complex to maintain.
TrueNAS SCALE provides excellent user and ACL management with SMB, making it the best option.


3. Final Setup

To simplify administration, the final setup included:


4. Deploying TrueNAS SCALE “Dragonfish” 24.04

4.1. Permission Structure

With a small team, access control is simple:

4.2. Virtual Private Network (VPN)

Initially, WireGuard Easy was used, but DNS updates were slow.
We switched to Tailscale for better reliability and kept WireGuard for accessing the TrueNAS Web UI.

WireGuard Easy:

Tailscale:

4.3. Backup after Testing Phase


5. Issues Encountered

5.1. WireGuard Client Disconnections

Some Windows clients lost connection and had to be reactivated manually.
Cause: the WireGuard server used DDNS; when its public IP changed, endpoints failed to update.
Resolved by switching to Tailscale.


This article is based on real-world deployment experience at a small business in Vietnam. We hope it helps those looking for a simple, secure, and maintainable internal file-sharing solution.