zsai001 7acc771339 fix: make /api/themes public and handle localStorage quota
- Move GET /api/themes to public routes (visitors need installed themes)
- Handle localStorage QuotaExceededError gracefully for metrics cache
- Limit metrics cache size to prevent quota issues
2025-12-30 16:03:15 +08:00

vStats - Server Monitoring Dashboard

English | 中文

GitHub Release License Go React TypeScript

A minimalist and beautiful server monitoring dashboard. Powered by Go, millisecond-level latency, one-click deployment.

💝 Sponsors

Thanks to the following sponsors for supporting this project!

TOHU Cloud | Debee

📸 Preview

Preview 1 Preview 2
Preview 3 Preview 4

Features

  • 🚀 Real-time Monitoring - WebSocket real-time push of system metrics
  • 🖥️ Multi-Server Management - Support monitoring multiple servers
  • 💻 CPU / Memory / Disk / Network - Comprehensive monitoring
  • 🎨 Modern UI - Glassmorphism design with smooth animations
  • 🎭 Theme System - 16 built-in themes + install custom themes from GitHub
  • 🔐 Secure Authentication - JWT authentication protects admin interfaces
  • One-Click Deployment - Docker / script one-click installation

🎨 Theme System

VStats supports a modular theme system. You can:

  • Choose from 16 built-in themes (Midnight, Cyberpunk, Terminal, etc.)
  • Install themes from GitHub: username/repo or username/repo@v1.0.0
  • Create your own themes and share them with the community

Installing Custom Themes

  1. Go to SettingsThemesInstall Theme
  2. Enter a GitHub source: username/theme-repo
  3. Click Install

Creating Themes

Want to create your own theme? See the Theme Development Guide.

Theme template: docs/theme-template/

📋 TODO

  • Data aggregation and optimization
  • Billing and cycle management
  • Global map view
  • Performance testing (speedtest / latency)
  • Media unlock detection
  • Custom banner / slogan
  • Referral & affiliate settings
  • Alert notifications (Email / Telegram / Discord / Webhook)
  • Custom dashboard layout
  • Mobile responsive optimization
  • Server grouping and tagging
  • Dark / Light theme switching
  • Custom theme
  • Improve vstats-cli
  • Improve vstats-cloud

📚 Documentation & Resources

Resource Link
📖 Full Documentation vstats.zsoft.cc
🎯 Online Demo vps.zsoft.cc
🐳 Docker Hub zsai001/vstats-server
📦 GitHub Releases Download Page

🚀 Quick Start

# Docker one-click deployment
mkdir -p data
sudo chown -R 1000:1000 data
docker run -d --name vstats-server -p 3001:3001 \
  -v $(pwd)/data:/app/data zsai001/vstats-server:latest

For more installation methods, please visit Documentation Site

📦 Script Installation

Server Installation

Use the official installation script to install Server with one command:

curl -fsSL https://vstats.zsoft.cc/install.sh | sudo bash

Or use wget:

wget -qO- https://vstats.zsoft.cc/install.sh | sudo bash

After installation, visit http://your-server-ip:3001 to access the control panel.

Get Admin Password:

# Linux
journalctl -u vstats | grep -i password

# macOS
tail -20 ~/.vstats/data/vstats.log | grep -i password

# Or reset password
/opt/vstats/vstats-server --reset-password  # Linux
~/.vstats/vstats-server --reset-password     # macOS

Agent Installation

Run the following command on the monitored server to install Agent:

curl -fsSL https://vstats.zsoft.cc/agent.sh | sudo bash -s -- \
  --server http://your-server-ip:3001 \
  --name "$(hostname)" \
  --token "your-admin-token"

Parameter Description:

  • --server: Server access address
  • --name: Server display name (optional, defaults to hostname)
  • --token: Admin Token (obtained from Server control panel)

Upgrade

Server Upgrade:

curl -fsSL https://vstats.zsoft.cc/install.sh | sudo bash -s -- upgrade

Agent Upgrade:

curl -fsSL https://vstats.zsoft.cc/agent.sh | sudo bash -s -- --upgrade

Uninstall

Server Uninstall:

curl -fsSL https://vstats.zsoft.cc/install.sh | sudo bash -s -- uninstall

Agent Uninstall:

curl -fsSL https://vstats.zsoft.cc/agent.sh | sudo bash -s -- --uninstall

Service Management

After installation, Server and Agent will be registered as systemd services and can be managed using systemctl commands.

Server Service Management

Check Service Status:

systemctl status vstats

Start Service:

systemctl start vstats

Stop Service:

systemctl stop vstats

Restart Service:

systemctl restart vstats

Reload Configuration (without restart):

systemctl reload vstats

Enable Auto-start on Boot:

systemctl enable vstats

Disable Auto-start on Boot:

systemctl disable vstats

View Service Logs:

# View all logs
journalctl -u vstats

# View logs in real-time (similar to tail -f)
journalctl -u vstats -f

# View last 100 lines of logs
journalctl -u vstats -n 100

# View logs for a specific time period
journalctl -u vstats --since "2024-01-01 00:00:00" --until "2024-01-02 00:00:00"

Agent Service Management

Check Service Status:

systemctl status vstats-agent

Start Service:

systemctl start vstats-agent

Stop Service:

systemctl stop vstats-agent

Restart Service:

systemctl restart vstats-agent

Enable Auto-start on Boot:

systemctl enable vstats-agent

Disable Auto-start on Boot:

systemctl disable vstats-agent

View Service Logs:

# View all logs
journalctl -u vstats-agent

# View logs in real-time
journalctl -u vstats-agent -f

# View last 100 lines of logs
journalctl -u vstats-agent -n 100

Common systemctl Commands

# View all enabled services
systemctl list-units --type=service --state=running

# Check if service is running
systemctl is-active vstats
systemctl is-active vstats-agent

# Check if service is enabled for auto-start
systemctl is-enabled vstats
systemctl is-enabled vstats-agent

# Reload systemd configuration (required after modifying service files)
systemctl daemon-reload

💬 Feedback

Encountered issues or have suggestions? Welcome to join the Telegram group for real-time feedback:

👉 vStats Feedback Group

🙏 Thanks

yeah.cx with ipv6 vps for testing

Star History

Star History Chart

📄 License

MIT License

🤝 Contributing

Welcome to submit Issues and Pull Requests!

Description
极简美观的服务器探针监控系统。Go 驱动,毫秒级延迟,一键部署。
Readme 124 MiB
Languages
TypeScript 48.1%
Go 41%
CSS 4.7%
Shell 3.5%
PowerShell 1.2%
Other 1.5%