ASA Server Manager
Go package directories have been consolidated under internal/; package names and layering are unchanged (see docs/INTERNAL_LAYOUT_MIGRATION.md).
A comprehensive ARK Server Ascended (ASA) server management tool built with Go and Vue.js, featuring a command-line interface, HTTP API, and web dashboard.
Features
Core Functionality
- ✅ Instance Management: Create, list, rename, and delete server instances
- ✅ Server Control: Start, stop, and restart individual or all instances
- ✅ RCON Support: Send RCON commands to server instances
- ✅ Backup & Restore: Create and restore world backups with flexible options
- ✅ Configuration Management: View and edit game configuration files (Game.ini, GameUserSettings.ini)
- ✅ Logging: Real-time server and instance logs viewing
Advanced Features
- ✅ Windows Service Integration: Run as a Windows service for background operation
- ✅ HTTP API Server: RESTful API with WebSocket and SSE support for real-time updates
- ✅ Web Dashboard: Embedded Vue.js web interface for intuitive management
- ✅ FRP Integration: Built-in Fast Reverse Proxy management for server exposure
- ✅ Syncthing Integration: File synchronization capabilities for server configuration
- ✅ Port Management: Automatic port conflict detection and resolution
System Requirements
- Operating System: Windows 10/11 (64-bit) natively; or Linux (x86_64) via umu + GE-Proton + Wine
- Go Version: 1.26 or higher (for development)
- Node.js: 16.x or higher (for frontend development)
- Disk Space: Minimum 20GB for server files and instances
- RAM: 8GB minimum, 16GB recommended
Installation
Pre-built Binaries
- Download the latest release from the Releases page
- Extract the archive to your preferred location
- Run
asa-manager.exe to start the application
Building from Source
Backend (Go)
go mod tidy
go build -o asa-manager.exe
Frontend (Vue.js)
cd app
npm install
npm run build
Usage
Command-Line Interface
Basic Commands
# List all instances
asa-manager list
# Create a new instance
asa-manager create
# Start an instance
asa-manager start <instance_name>
# Stop an instance
asa-manager stop <instance_name>
# Restart an instance
asa-manager restart <instance_name>
# Check server status
asa-manager status [instance_name]
Backup & Restore
# Create a backup
asa-manager backup <instance_name> <world_folder>
# Restore a backup
asa-manager restore <instance_name> <backup_file> [flags]
Available restore flags:
--worldfile: Restore world file (SaveDir)
--instance-config: Restore instance_config.ini
--game-config: Restore game config files
Batch Operations
# Start all instances
asa-manager start-all
# Stop all instances
asa-manager stop-all
Configuration Management
# View Game.ini for an instance
asa-manager view-game [instance_name]
# View GameUserSettings.ini for an instance
asa-manager view-game-user-settings [instance_name]
# Synchronize game config files
asa-manager sync-config <instance_name> [instance_name2] [...]
Windows Service Management
# Install as Windows service
asa-manager service install
# Start Windows service
asa-manager service start
# Stop Windows service
asa-manager service stop
# Remove Windows service
asa-manager service remove
HTTP API Server
api (and service mode) needs an existing, valid config.yaml: run asa-manager config init
(or asa-manager setup) first. A missing or invalid config makes it exit with code 78 instead of
starting with defaults.
# Start HTTP API server (HTTPS + HTTP/2 by default)
asa-manager api
# Fall back to plain HTTP/1.1
asa-manager api --tls=false
# Use your own certificate instead of the local CA
asa-manager api --cert-file C:\certs\asa.crt --key-file C:\certs\asa.key
# Add extra names to the certificate SAN (e.g. the domain your proxy serves)
asa-manager api --tls-domains asa.example.com
The API server runs on port 19193 by default.
HTTPS & the Local CA
The server speaks HTTPS with HTTP/2 out of the box. This is not (only) about
encryption: browsers negotiate HTTP/2 exclusively over TLS via ALPN, and HTTP/2 lifts
the “6 connections per origin” limit that persistent SSE streams otherwise exhaust.
See docs/HTTP2_CONNECTION_OPTIMIZATION.md.
On first start the program generates a local CA under {BaseDir}/certs/ and installs
it into the Windows trusted root store, so https://localhost:19193 opens without any
certificate warning. The CA private key is generated on your machine and is never
shipped in the binary.
# Show CA fingerprint, validity and whether it is trusted
asa-manager cert status
# Install manually (--machine installs for all users, requires administrator)
asa-manager cert install [--machine]
# Remove the CA from the trusted root store
asa-manager cert uninstall
asa-manager service remove removes the CA automatically. To never touch the trusted
root store, run with --tls-trust=false (the browser will then show a warning you must
accept once), or turn TLS off entirely with --tls=false.
Web Dashboard
Once the HTTP API server is running, access the web dashboard at:
https://localhost:19193
The dashboard provides a user-friendly interface for:
- Managing server instances
- Controlling server operations
- Viewing real-time logs
- Editing configurations
- Managing backups
- Monitoring server resources
Project Structure
Directory Structure
The former asaserver god-package has been split by single responsibility into the domain
packages below; pure utilities live under pkg/. See
docs/PACKAGE_RESTRUCTURE_PLAN.md for the rationale.
asa-server/
├── main.go # Entry point: CLI, GUI, OS service detection
├── main_windows.go # Windows-specific entry point
├── main_linux.go # Linux-specific entry point
│
│ ── Domain packages (bottom-up, no cycles; now all under internal/) ──
├── internal/
│ ├── config/ # Directory layout, InstanceConfig, INI read/write, config sync
│ ├── appconfig/ # config.yaml application config + validation
│ ├── process/ # PID store + IsServerRunning (breaks the state <-> instance cycle)
│ ├── certmgr/ # Local CA + leaf certificate, trusted root store (HTTPS/h2)
│ ├── rconx/ # RCON connection & command execution (retries, sentinel errors)
│ ├── realtime/ # WebSocket hub: server events + interactive RCON
│ ├── state/ # BadgerDB instance state persistence (CAS state machine)
│ ├── installer/ # SteamCMD download / ARK server update
│ ├── mirror/ # Per-instance mirror (NTFS junction / Linux symlink)
│ ├── instance/ # Lifecycle: Start/Stop/Restart, saves, mod extraction, ASA version
│ ├── runner/ # Cross-platform launcher: Windows native / Linux (umu + Proton + Wine)
│ ├── arkapimanage/ # ArkApi core + per-instance plugin install/update/uninstall
│ ├── plugindata/ # Plugin data & config isolation (layout, migration, classification)
│ ├── countdown/ # Delayed stop/restart orchestration: countdown + announcements
│ ├── batchmanage/ # Batch start/stop/restart across instances
│ ├── schedule/ # Cron-like scheduled tasks (restart / update)
│ ├── updatemanage/ # Server update task singleton
│ ├── filesyncmanage/ # File sync management
│ ├── backup/ # tar+zstd backup/restore with functional options
│ ├── frpmanage/ # FRP reverse proxy management
│ ├── syncthingmanage/ # Syncthing file sync management
│ ├── parseserver/ # ARK save file parsing
│ ├── auth/ # Auth: login, rate limit, TOTP, audit log
│ │
│ │ ── Interfaces ──
│ ├── webapi/ # HTTP API, split by domain: instanceapi, serverapi, backupapi,
│ │ # configapi, saveapi, logapi, iconapi, authapi, scheduleapi, apiresp
│ ├── gui/ # Fyne desktop GUI (system tray, service mgmt, log viewer)
│ ├── svcmgr/ # OS service integration (kardianos/service: Windows SCM / Linux systemd)
│ └── actions/ # CLI command handlers (update / setup / perms / prefix / netmon)
│
├── pkg/ # Leaf utilities, zero domain deps:
│ # archive asaversion console download fsutil iox linuxdeps logger
│ # netutil problem procmatch procnet proctree procx pyfinder
│ # resourcegate serverinfo shareacl steamrt sysuser tail umu
│ # vcredist wineprefix winnetetw xvfb arkcache display
├── app/ # Embedded Vue.js frontend (//go:embed dist)
└── docs/ # Documentation (see index below)
### Instance Directory Structure
instances/
└── <instance_name>/
├── instance_config.ini # Instance-specific configuration
├── Config/ # Game configuration files
│ ├── Game.ini
│ └── GameUserSettings.ini
└── server.log # Server log file
## HTTP API
The HTTP API provides RESTful endpoints for all server management functions. For detailed documentation, see the [API Reference](docs/API_REFERENCE.md).
### Key API Endpoints
- `GET /health` - Health check
- `GET /api/instances` - List all instances
- `POST /api/instances` - Create a new instance
- `GET /api/instances/:name` - Get instance status
- `POST /api/server/:name/start` - Start an instance
- `POST /api/server/:name/stop` - Stop an instance
- `POST /api/rcon/:name/command` - Send RCON command
- `GET /api/ws/events` - WebSocket for real-time events
- `GET /api/logs/:name` - SSE stream for instance logs
## Configuration
### Instance Configuration
Each instance has an `instance_config.ini` file with the following structure:
```ini
[ServerSettings]
ServerName=ARK Server <instance_name>
ServerPassword=
ServerAdminPassword=adminpassword
MaxPlayers=70
MapName=TheIsland_WP
RCONPort=27020
Port=7777
ModIDs=
CustomStartParameters=-NoBattlEye -crossplay -NoHangDetection
SaveDir=<instance_name>
ClusterID=
Integration Features
FRP Integration
The tool includes built-in FRP (Fast Reverse Proxy) management for exposing your server to the internet.
Syncthing Integration
Syncthing integration allows for easy synchronization of configuration files across multiple servers.
Development
Prerequisites
- Go 1.26 or higher
- Node.js 16.x or higher
- npm 8.x or higher
Building the Application
-
Build the backend:
go build -o asa-manager.exe
-
Build the frontend:
cd app
npm install
npm run build
Running the Development Server
-
Start the API server:
go run main.go api
-
Start the frontend development server:
cd app
npm run dev
Adding New Features
- CLI Commands: Add new commands in
actions/actions.go and register them in main.go
- API Endpoints: Add new endpoints in
webapi/actions.go
- Frontend Components: Add new components in
app/src/components/
- Frontend Views: Add new views in
app/src/views/
Troubleshooting
Common Issues
Command Not Found
Ensure asa-manager.exe is in your PATH or run it from the correct directory.
Instance Failed to Start
- Check if the instance configuration is correct
- Verify that required ports are not in use
- Check the server logs for more details
Backup Failed
- Ensure the instance is stopped before creating a backup
- Verify the world folder name is correct
- Ensure there is sufficient disk space
API Server Not Accessible
- Check if the service is running
- Verify firewall settings allow traffic on port 19193
Documentation
All documentation lives in docs/. Start with docs/README.md for the
Chinese overview, or jump straight to a topic below.
Architecture & Design
Linux Compatibility
Features
Reference
Migration & History
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License
Support
For issues and feature requests, please create a new GitHub Issue.
评论