Skip to content

Repository files navigation

PersonalNAS Studio

A high-efficiency, open-source Network Attached Storage (NAS) management system and lightweight control dashboard tailored for Windows-based home servers and dual-use hardware environments.

License: MIT Platform Python Core Engine Memory Footprint


1. Overview

Many homelab enthusiasts repurpose spare consumer PCs into home servers to perform multiple tasks simultaneously—such as hosting game instances (e.g., Minecraft, Palworld) alongside dedicated file storage and media sharing. However, standard dedicated NAS operating systems (such as TrueNAS or unRAID) require dedicated bare-metal installations that overwrite the underlying operating system and consume significant RAM for caching and virtualization.

Conversely, standard web dashboards and Electron-based management applications running on Windows frequently consume between 350 MB and 700 MB of system memory simply to display monitoring statistics, competing with memory-intensive game server processes on entry-level hardware (such as dual-core processors like the AMD Athlon 3000G).

PersonalNAS Studio resolves this challenge by delivering:

  • A compiled, single-binary Go storage backend (FileBrowser) that operates headless in the background.
  • An ultra-lightweight, native graphical management console written in Python (Tkinter) that uses approximately 24-26 MB of RAM.
  • A background watchdog process that guarantees 24/7 service availability without command prompt windows.
  • Integrated multi-network telemetry (LAN, Tailscale, Radmin VPN) with zero hardcoded credentials or IP addresses.

2. System Architecture

The project employs a decoupled architecture comprising the storage engine, daemon supervision, real-time metrics telemetry, and presentation layers:

                                 +-------------------------------------+
                                 |         External Clients            |
                                 |  (iOS / Android / Remote Desktop)   |
                                 +-------------------------------------+
                                            |               |
                               [Tailscale / Mesh VPN]   [Home LAN]
                                            |               |
                                            v               v
+-------------------------------------------------------------------------------+
| Windows Host Environment                                                      |
|                                                                               |
|   +--------------------------+                     +----------------------+   |
|   |   FileBrowser Backend    | <--- HTTP:8080 ---> | Web File Manager UI  |   |
|   |  (D:\NAS\app\*.exe, .db) |                     |  (Browser / Mobile)  |   |
|   +--------------------------+                     +----------------------+   |
|                 ^                                                             |
|                 | (Process Supervision)                                       |
|   +--------------------------+                     +----------------------+   |
|   |   Watchdog Supervisor    | <--- Embedded ----> |  Embedded Web Server |   |
|   |     (run_nas.pyw)        |                     |   (dashboard.py:8085)|   |
|   +--------------------------+                     +----------------------+   |
|                                                                               |
|   +-----------------------------------------------------------------------+   |
|   |                PersonalNAS Studio Desktop GUI                         |   |
|   |                      (gui_dashboard.pyw)                              |   |
|   |  - Native Win32 Window Frame (DWM Dark Mode API)                      |   |
|   |  - Hardware & Process Monitoring (psutil)                             |   |
|   |  - Real-Time Subprocess Log Stream Reader                             |   |
|   |  - QR Code Matrix Generator (qrcode)                                  |   |
|   +-----------------------------------------------------------------------+   |
|                                                                               |
|   +--------------------------+                     +----------------------+   |
|   |   Secondary HDD (D:\)    |                     |   Primary SSD (C:\)  |   |
|   |   Dedicated NAS Pool     |                     |    System & OS Only  |   |
|   +--------------------------+                     +----------------------+   |
+-------------------------------------------------------------------------------+

Architectural Highlights

  • Process Isolation: The file storage engine runs as an independent Windows process, isolated from the management interface. If the desktop UI is closed, storage operations remain online.
  • Resource Containment: Strict drive partition boundaries ensure that all user data, database transactions, and logs reside on the secondary bulk storage drive (D:\), safeguarding the primary OS drive (C:\) from disk exhaustion.
  • Dynamic Ingress Discovery: Rather than enforcing fixed hostnames or static IP mappings, network adapters are polled dynamically using operating system socket tables to display accurate addresses for LAN, Tailscale virtual networks, and private mesh configurations.

3. Key Capabilities

Ultra-Low Memory Utilization

Built upon Python's native Tkinter wrapper around the Tcl/Tk graphic subsystem, the desktop management client consumes approximately 25 MB of resident memory (RSS). This yields a 95% reduction in resource overhead compared to Chromium or Electron wrappers, reserving maximal RAM and thread bandwidth for concurrent game servers.

Integrated Minecraft & Game Server Monitoring

For dual-purpose server configurations, PersonalNAS actively inspects system process trees for Java runtime instances hosting game servers. It tracks:

  • Process Identifier (PID)
  • Real-time memory allocation (working set)
  • Configured maximum heap allocation ceiling (-Xmx)
  • Overall system memory availability for allocation adjustments

Embedded Real-Time Event Console

Rather than launching separate command prompt windows (cmd.exe) that clutter the desktop, PersonalNAS embeds a high-contrast terminal viewer directly inside the application. The viewer dynamically tracks the runtime log file (filebrowser.log), parsing connection attempts, HTTP status codes, and user logins with automated scroll lock.

Rapid Mobile Onboarding via Dynamic QR Codes

To facilitate mobile access without tedious manual typing of internal IP addresses and port combinations, the interface computes on-the-fly QR code matrices for all active network adapters. Scanning the screen with a standard mobile camera immediately routes the device to the server interface.

Drive Quota & Directory Inspection

Provides immediate visual telemetry across storage volumes:

  • Secondary Bulk Storage (D:\): Capacity, consumed space, free allocation, and categorized folder breakdowns (Photos, Documents, Videos, Backups).
  • System Volume (C:\): Threshold warnings to prevent OS instability due to capacity exhaustion.

4. Repository Structure

PersonalNAS/
├── app/
│   └── .gitkeep              # Placeholder for FileBrowser binary and BoltDB
├── logs/                     # Local diagnostic and access logs (gitignored)
├── dashboard.py              # Standalone HTTP monitoring server (Port 8085)
├── gui_dashboard.pyw         # Native Win32 desktop application (All-in-One Studio)
├── run_nas.pyw               # Background supervisor and process watchdog
├── install.ps1               # Automated installation and dependency provisioning script
├── start_nas.bat             # Background service bootstrap launcher
├── stop_nas.bat              # Service termination utility
├── restart_nas.bat           # Restart sequencing script
├── status_nas.bat            # Quick command-line status utility
├── open_dashboard.bat        # Browser dashboard shortcut launcher
├── open_web_dashboard.bat    # Web dashboard endpoint launcher
├── requirements.txt          # Python library specifications
├── LICENSE                   # MIT License declaration
└── README.md                 # Project technical documentation

5. Prerequisites & Compatibility

Hardware Requirements

  • Processor: 64-bit dual-core CPU (e.g., AMD Athlon, Intel Celeron, or higher)
  • RAM: 4 GB minimum (16 GB recommended if co-hosting Minecraft or containerized workloads)
  • Storage:
    • Primary disk (SSD recommended for OS)
    • Secondary internal or external storage drive formatted as NTFS

Software Requirements

  • Operating System: Microsoft Windows 10 Pro / Home (Build 19041 or later) or Windows 11 (64-bit)
  • Python: Python 3.10, 3.11, 3.12, 3.13, or 3.14 (with Tkinter included in installation)
  • Networking (Optional for Remote Access): Tailscale client for secure mesh networking without port forwarding

6. Installation & Deployment

Automated Deployment (Recommended)

  1. Open PowerShell with standard user permissions (administrative elevation is not required).
  2. Clone the repository into your preferred application directory (e.g., D:\NAS):
    git clone https://github.com/CyberSphinxxx/PersonalNAS.git D:\NAS
    cd D:\NAS
  3. Execute the automated installer:
    powershell -ExecutionPolicy Bypass -File .\install.ps1
    The installer automates the following steps:
    • Verifies and installs Python package dependencies (psutil, qrcode).
    • Creates the application directory structure (D:\NAS\app, D:\NAS\logs).
    • Retrieves the official compiled FileBrowser release binary from GitHub.
    • Generates desktop shortcuts for the management studio.

Manual Setup Step-by-Step

If you prefer manual provisioning:

  1. Install Python Dependencies:

    pip install -r requirements.txt
  2. Retrieve FileBrowser Binary:

    • Download the official windows-amd64-filebrowser.zip release from the FileBrowser GitHub Repository.
    • Extract filebrowser.exe into the app/ subfolder.
  3. Initialize Configuration & Database: Run the database initialization command pointing to your target storage pool:

    app\filebrowser.exe config init -d app\filebrowser.db -a 0.0.0.0 -p 8080 -r D:\NAS_Shared -l logs\filebrowser.log
  4. Provision the Initial Administrator:

    app\filebrowser.exe users add admin <YourSecurePassword> --perm.admin -d app\filebrowser.db

7. Service Management & Automation

PersonalNAS Studio includes multiple operational profiles depending on user preference:

Background Supervision (Production Mode)

Executing run_nas.pyw through pythonw.exe initializes a headless watchdog loop.

  • Single Instance Enforcement: Uses a loopback socket mutex (127.0.0.1:58249) to guarantee only one supervisor process executes concurrently.
  • Fault Recovery: If filebrowser.exe encounters an unhandled exception or terminates, the watchdog detects process exit and restarts the service within two seconds.
  • Console Suppression: Started with the CREATE_NO_WINDOW flag, eliminating background terminal windows.

Windows Startup Integration

To configure automatic execution upon user logon:

  • Place a shortcut to run_nas.pyw inside the Windows Startup folder:
    %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\StartNAS.lnk
    
    • Target: C:\Path\To\pythonw.exe
    • Arguments: D:\NAS\run_nas.pyw
    • Start In: D:\NAS

Script Control Reference

  • start_nas.bat: Evaluates running tasks; initiates run_nas.pyw if inactive.
  • stop_nas.bat: Issues termination commands to filebrowser.exe and associated supervisor instances.
  • restart_nas.bat: Executes an orderly stop-delay-start sequence.
  • status_nas.bat: Inspects active process tables and echoes running endpoints.

8. Network Access Strategy

PersonalNAS listens on 0.0.0.0:8080, binding to all network interfaces. Access depends on client location and routing:

Ingress Route Target Device Profile Typical Address Configuration Notes
Local Network (LAN) Devices on home Wi-Fi/Ethernet http://192.168.x.x:8080 High-speed internal transfer; zero internet routing required.
Tailscale Mesh VPN Remote mobile devices & laptops http://100.x.x.x:8080 End-to-end encrypted; traverses NATs without router port forwarding.
Virtual LAN (Radmin) Secondary gaming PCs / friends http://26.x.x.x:8080 Peer-to-peer virtual local network for Windows endpoints.
Host Loopback Local server PC http://localhost:8080 Direct local administrative access.

Network Ports Reference

  • Port 8080 (TCP): Primary FileBrowser storage engine and web client.
  • Port 8085 (TCP): PersonalNAS lightweight web monitoring dashboard.
  • Port 25565 (TCP): Standard Minecraft Java Edition server port (if co-hosted).

9. Mobile Client Configuration

The FileBrowser web client is a Progressive Web App (PWA) compatible with iOS and Android:

Connecting Locally (Home Wi-Fi)

  1. Ensure the mobile device is associated with the local wireless network.
  2. Launch PersonalNAS Studio on the host machine.
  3. In the Overview tab, select the QR button adjacent to Home Wi-Fi.
  4. Scan the rendered code using the native camera application to navigate to the interface.

Connecting Remotely (Tailscale)

  1. Install the official Tailscale client from the Apple App Store or Google Play Store.
  2. Authenticate using the same account active on the Windows host server.
  3. Activate the Tailscale tunnel on the mobile device.
  4. Open the Tailscale address (http://100.x.x.x:8080) or scan the Tailscale QR code.

Installation as a Home Screen App

  • iOS (Safari): Tap the Share action sheet icon, select Add to Home Screen, and confirm.
  • Android (Chrome): Tap the overflow menu (three vertical dots), select Install App or Add to Home Screen.

The application will run in standalone mode with a dedicated application icon and borderless viewport.


10. User Management & Access Control

Access control policies live within the local BoltDB database (app/filebrowser.db):

Creating Restricted User Accounts

To create dedicated storage environments for household members or external collaborators:

  1. Log in via administrative credentials at http://localhost:8080.
  2. Navigate to Settings -> User Management -> New.
  3. Define authentication credentials.
  4. Set the user Scope:
    • Setting Scope to / grants visibility over the entire storage root.
    • Setting Scope to /Documents/UserFolder sandboxes the user inside that specific subdirectory.
  5. Configure operational permissions:
    • Allow / prevent file deletion
    • Allow / prevent link generation and public sharing
    • Allow / prevent command runner execution

11. Performance & Benchmark Profile

Memory Consumption Benchmark

Measured on Windows 10 Pro x64 (Build 19045), AMD Athlon 3000G, 16 GB DDR4 RAM:

Monitoring Solution Memory Footprint (Private Working Set) CPU Impact (Idle)
PersonalNAS Studio (Tkinter) 24.5 MB < 0.1%
Chromium Web Dashboard (Edge / Chrome) 380.0 MB – 620.0 MB 1.2% – 2.8%
Electron-Based Dashboard Wrapper 290.0 MB – 450.0 MB 0.8% – 1.6%

PersonalNAS preserves memory resources specifically for memory-sensitive server runtimes such as Java Virtual Machines, which frequently experience garbage collection latency spikes when available memory is constricted.


12. Troubleshooting & Diagnostics

Server Displays "Cannot be Reached" from Mobile Device

  1. Verify Interface Target: Ensure you are navigating to the Server Host IP (100.106.x.x), not the mobile device's own Tailscale IP.
  2. Service Verification: Check PersonalNAS Studio to confirm the status indicator reads NAS Online.
  3. Firewall Ingress: Ensure the Windows Defender Firewall allows incoming connections on port 8080. If restricted, execute:
    netsh advfirewall firewall add rule name="FileBrowser NAS" dir=in action=allow protocol=TCP localport=8080

Storage Quota or Permission Errors

  • Ensure the destination directory (D:\NAS_Shared) has write permissions assigned to the Windows user account executing the supervisor script.

Process Watchdog Diagnostics

  • Review runtime logs located at D:\NAS\logs\filebrowser.log or access the Live Console & Logs tab in the desktop application to review real-time execution errors.

13. Security and Version Control Compliance

To ensure public repository safety:

  • No Binaries: Upstream release binaries are retrieved during deployment via script rather than stored in the Git object database.
  • No Credentials: Initial administrator passwords are not committed; database assets (*.db) are ignored in .gitignore.
  • No Network Information: Dynamic API introspection handles IP detection; private LAN topologies are not embedded in source code.

14. Contributing

Contributions, feature proposals, and bug reports are welcome. Please submit pull requests or open issues through the GitHub issue tracker.


15. License

This project is open-source software licensed under the MIT License. The underlying FileBrowser engine is licensed under the Apache 2.0 / GNU AGPLv3 licenses by the original authors.

About

Ultra-Lightweight Open-Source NAS & Server Controller for Windows PCs. Designed for budget home servers and dual-use machines (e.g. Minecraft Server + NAS) using only ~25 MB of RAM

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages