Skip to content

The Ultimate Self-Hosted NAS Management System

License

Notifications You must be signed in to change notification settings

decryptedchaos/arcanas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‰ Arcanas

The Ultimate Self-Hosted NAS Management System πŸš€

License: MPL 2.0 Go Version SvelteKit Status

Arcanas is a powerful, modern, and lightning-fast NAS management system designed for the enthusiast. Built with a robust Go backend (standard library only) and a sleek SvelteKit 5 frontend, it delivers a premium experience for managing your storage empire.

✨ Features

Storage Management

  • πŸ›‘οΈ Storage Pools - Advanced management for MergerFS, LVM, and direct device mounts
  • πŸ“Ό RAID Mastery - Create, manage, and monitor MD RAID arrays (0, 1, 5, 6, 10)
  • πŸ’Ώ Disk Management - Format disks, manage partitions, view SMART data
  • πŸ”„ Device Mounting - Mount/unmount devices for switching between storage pools and iSCSI

File Sharing

  • πŸ“‚ NFS Exports - Configure and manage NFS shares with client access rules
  • 🀝 Samba/SMB - Set up Windows-compatible file sharing
  • 🎯 Path Editing - Edit export paths on existing shares without delete/recreate

iSCSI

  • πŸ’Ύ iSCSI Targets - Professional-grade iSCSI target management with LIO/targetcli
  • πŸ”Œ LUN Management - Create and manage LUNs with block or fileio backstores
  • πŸ” ACL Configuration - Manage initiator IQNs and access control lists

Monitoring & System

  • ⚑ Real-time Monitoring - Live CPU, memory, network, and disk I/O metrics
  • πŸ“Š SMART Data - Drive health monitoring with test execution
  • πŸ–₯️ System Info - View processes, logs, and system resources
  • πŸ‘₯ User Management - Manage users and service account permissions

Architecture

  • πŸš€ Single Binary - Zero external runtime dependencies, embedded frontend
  • ⚑ Hot-Reload Dev - Blazing fast iteration with Air and Vite 6
  • 🎨 Modern UI - Svelte 5 with SvelteKit, Tailwind CSS, dark mode support

πŸš€ Quick Start

πŸ› οΈ Development Mode

# 1. Clone the repository
git clone https://github.com/decryptedchaos/arcanas.git
cd arcanas

# 2. Install frontend dependencies
cd frontend && npm install

# 3. Start backend with hot-reload (from project root)
cd ..
./dev.sh

# 4. Or start frontend separately
cd frontend && npm run dev    # Frontend on :5173
cd ../backend && go run cmd/server/main.go  # Backend on :4000

Access the dashboard:

πŸ“¦ Production Installation

Install Latest Release

curl -fsSL https://raw.githubusercontent.com/decryptedchaos/arcanas/master/install.sh | sudo bash

Install Specific Version

curl -fsSL https://raw.githubusercontent.com/decryptedchaos/arcanas/master/install.sh | sudo bash -s -- --version v1.0.0

The installer will:

  • Download the latest release for your platform (amd64/arm64)
  • Install system dependencies (Samba, NFS, MergerFS, LVM, mdadm, targetcli)
  • Create the arcanas service user and data directories
  • Set up systemd service with auto-start
  • Configure sudoers for privileged operations
  • Start the service

Access Arcanas:

Frontend: http://your-server-ip:4000
API:      http://your-server-ip:4000/api

Service Management:

sudo systemctl start arcanas    # Start the service
sudo systemctl stop arcanas     # Stop the service
sudo systemctl restart arcanas  # Restart the service
sudo systemctl status arcanas   # Check service status
sudo journalctl -u arcanas -f   # View logs

πŸ—οΈ Architecture

arcanas/
β”œβ”€β”€ 🧠 backend/              # Go backend (standard library only)
β”‚   β”œβ”€β”€ cmd/server/         # Main entry point
β”‚   β”œβ”€β”€ internal/
β”‚   β”‚   β”œβ”€β”€ handlers/       # HTTP request handlers
β”‚   β”‚   β”œβ”€β”€ system/         # System command execution
β”‚   β”‚   β”œβ”€β”€ models/         # Data structures
β”‚   β”‚   β”œβ”€β”€ routes/         # API routing
β”‚   β”‚   └── utils/          # Helper functions
β”‚   └── static/             # Embedded frontend (generated)
β”œβ”€β”€ 🎨 frontend/            # SvelteKit 5 frontend
β”‚   β”œβ”€β”€ src/lib/           # Components, API client, stores
β”‚   β”œβ”€β”€ src/routes/        # Pages (storage, scsi, nfs, samba, etc.)
β”‚   └── static/            # Static assets
β”œβ”€β”€ πŸ“œ build.sh             # Production build script
β”œβ”€β”€ πŸ”„ dev.sh               # Development hot-reload script
└── πŸš€ deploy.sh            # Remote deployment script

Storage Architecture

New Architecture (Direct Mount):

  • MD RAID devices mount directly at /srv/{poolname}
  • No MergerFS wrapper for single-device pools
  • Better performance and simpler management

Legacy Support:

  • Existing /mnt/arcanas-disk-* mounts still work
  • Automatically detected and shown as "legacy" type pools

MergerFS:

  • Used only for aggregating multiple raw disks (JBOD)
  • Physical disks (sda, sdb) β†’ MergerFS β†’ /srv/{poolname}

βš™οΈ Configuration

Environment Variables

  • API_PORT - Server port (default: 4000)
  • DEV_MODE - Enable continuous frontend rebuild (default: false)

Storage Locations

  • Storage Pools - /srv/{poolname}/
  • Legacy Mounts - /mnt/arcanas-disk-{device}/
  • iSCSI Storage - /var/lib/arcanas/iscsi/

System Requirements

  • Linux (tested on Arch, Ubuntu, Debian)
  • Go 1.24+ (for development)
  • Node.js 20+ (for frontend development)
  • Sudo access for privileged operations

πŸ› οΈ Development

Build for Production

./build.sh    # Builds frontend, embeds in Go binary
# Output: ./arcanas (single binary)

Build Frontend Only

cd frontend
npm run build    # Outputs to build/

Run Backend (One-Shot)

cd backend
go run cmd/server/main.go

Run Backend (Auto-Rebuild)

DEV_MODE=true go run cmd/server/main.go

Frontend Development

cd frontend
npm run dev      # Start Vite dev server on :5173
npm run build    # Build for production
npm run lint     # Prettier + ESLint check

Remote Deployment

./deploy.sh root@192.168.1.140    # Deploy to remote server

πŸ”’ Security

  • Sudoers Configuration - Privileged commands executed via passwordless sudo
  • Path Validation - All paths validated to prevent traversal attacks
  • Input Sanitization - User inputs sanitized before system command execution
  • Service Isolation - Runs as dedicated arcanas user

πŸ“„ License

This project is licensed under the Mozilla Public License 2.0. See LICENSE for details.


🀝 Contributing

Contributions are welcome! The project uses MPL 2.0 which allows for:

  • Proprietary use of modified files (you keep your modifications private)
  • Copyleft on original files (modifications to MPL-licensed files must remain MPL)

Please ensure all Go files include the MPL license header.


πŸ“œ Changelog

See CHANGELOG.md for version history and changes.

About

The Ultimate Self-Hosted NAS Management System

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published