# Server Management

# Server Management

This guide covers all server management features available in the KyuubiSoft Panel.

## Dashboard

The dashboard provides an overview of your server:

- **Server Status** - Online/Offline/Starting
- **Player Count** - Current and maximum players
- **Resource Usage** - CPU, Memory, TPS
- **Quick Actions** - Start, Stop, Restart buttons
- **Alerts** - Update notifications, permission issues

## Server Controls

### Starting the Server

1. Click **Start** on the dashboard or sidebar
2. Watch the console for startup progress
3. Server is ready when you see "Server started"

### Stopping the Server

1. Click **Stop**
2. Players receive a warning message
3. World data is saved automatically
4. Container stops gracefully

### Restarting the Server

1. Click **Restart**
2. Performs stop then start
3. Use for applying configuration changes

## Console

The live console shows real-time server output:

### Features
- **Auto-scroll** - Follows new messages
- **Search/Filter** - Find specific log entries
- **Command History** - Arrow keys to recall commands
- **Copy** - Select and copy log text

### Executing Commands

Type commands in the input field and press Enter:

```
/say Hello everyone!
/time set day
/tp Player1 Player2
```

See [Commands Reference](./commands) for all available commands.

## Quick Settings

Fast access to common server settings:

| Setting | Description |
|---------|-------------|
| Server Name | Display name in server list |
| MOTD | Message of the day |
| Max Players | Maximum concurrent players |
| Password | Server password (optional) |
| Whitelist | Enable/disable whitelist |

Changes apply after server restart.

## Performance Monitoring

### Memory Statistics

- **Heap Used** - Current JVM heap usage
- **Heap Max** - Maximum available heap
- **Non-Heap** - Metaspace, code cache
- **Memory Pools** - Detailed breakdown

### TPS (Ticks Per Second)

- **Current TPS** - Real-time value
- **Average TPS** - 60-second rolling average
- **Min/Max** - Lowest and highest in window

Target: 20 TPS (50ms per tick)

### MSPT (Milliseconds Per Tick)

- Shows how long each tick takes
- < 50ms = Good performance
- > 50ms = Server is lagging

### CPU Usage

- Container CPU percentage
- System CPU percentage

## Player Management

### Online Players

View all connected players with:
- Username and UUID
- Current world and position
- Playtime and join count
- Health and hunger

### Player Actions

Click on a player for actions:

| Action | Description |
|--------|-------------|
| **Kick** | Remove from server |
| **Ban** | Permanent ban |
| **Teleport** | Move to location |
| **Give Item** | Add items to inventory |
| **Heal** | Restore health |
| **Gamemode** | Change gamemode |
| **OP** | Grant operator status |

### Player Details

Detailed player view includes:
- **Overview** - Stats and position
- **Inventory** - All items with icons
- **Appearance** - Equipped items
- **Chat** - Player's chat history
- **Deaths** - Death locations

### Whitelist

Manage server whitelist:
1. Go to **Whitelist**
2. Add players by username
3. Enable whitelist in Quick Settings

## World Management

### World List

View all loaded worlds:
- World name and type
- Player count per world
- World size on disk

### WebMap Integration

If EasyWebMap is installed:
- Live 2D map view
- Player positions
- Chunk rendering

Access at the **WebMap** page or `http://SERVER:18081`

## Scheduler

Automate server tasks:

### Creating Tasks

1. Go to **Scheduler**
2. Click **Add Task**
3. Configure:
   - Task type (Backup, Restart, Command, Broadcast)
   - Schedule (Cron expression or interval)
   - Options

### Task Types

| Type | Description |
|------|-------------|
| **Backup** | Create server backup |
| **Restart** | Restart the server |
| **Command** | Execute a command |
| **Broadcast** | Send message to players |

### Schedule Examples

```
# Every day at 4 AM
0 4 * * *

# Every 6 hours
0 */6 * * *

# Every Sunday at midnight
0 0 * * 0
```

## Server Updates

### Checking for Updates

1. Go to **Settings** → **Updates**
2. Click **Check for Updates**
3. View available version info

### Update Configuration

| Option | Description |
|--------|-------------|
| **Auto-Check** | Check automatically |
| **Check Interval** | How often to check |
| **Notify Players** | Alert players of updates |
| **Patchline** | Release or pre-release |
| **Backup Before** | Create backup first |
| **Auto-Apply** | Automatic installation |

### Applying Updates

1. Download the update
2. Optionally create backup
3. Apply update (restarts server)

## Broadcasts

Send messages to all players:

1. Go to **Broadcasts** or use console
2. Enter message
3. Click **Send**

Or via console:
```
/say [Server] Restarting in 5 minutes!
```