# Server Info & News Configuration

# Server Info & News Configuration

**File:** `serverinfo/serverinfo.json`

This file feeds two tabs of the book: **Server** (description, address, live statistics, links) and **News** (the `announcements` list). The **Server & links** and **News** boards of the [admin window](./admin-panel#content-boards) edit it.

## Complete Example

```json
{
  "server": {
    "name": "KyuubiSoft Server",
    "tagline": "Survival, quests and a friendly community",
    "address": "play.example.com",
    "description": "Welcome to our Hytale server! We offer Survival, Mini-Games and a great community.",
    "version": "1.0.0"
  },
  "stats": {
    "showPlayerCount": true,
    "showUptime": true,
    "showVersion": true,
    "showTotalPlayers": true,
    "customStats": [
      { "name": "Game Mode", "value": "Survival", "icon": "Weapon_Sword_Iron" }
    ]
  },
  "announcements": [
    {
      "id": "season2",
      "title": "Season 2 starts next week",
      "text": "Get ready for new content, features and events!",
      "type": "event",
      "date": "2026-10-21",
      "expiresAt": "2026-11-30",
      "pinned": true,
      "link": "page:changelog",
      "linkLabel": "Read the changelog",
      "priority": 1
    }
  ],
  "links": [
    {
      "id": "discord",
      "name": "Discord",
      "description": "Join our community!",
      "url": "https://discord.gg/yourserver",
      "icon": "Deco_Inkwell",
      "priority": 1
    },
    {
      "id": "website",
      "name": "Website",
      "description": "Visit our official website",
      "url": "https://yourserver.com",
      "icon": "Tool_Map",
      "priority": 2
    }
  ]
}
```

---

## Server Information

| Field | Type | Description |
|-------|------|-------------|
| `name` | String | Server name (also on the banner of the Start tab) |
| `tagline` | String | Optional short line under the name |
| `address` | String | Optional server address shown on the Server tab |
| `description` | String | Server description |
| `version` | String | Server version (optional) |
| `i18n` | Object | Optional name, tagline and description per language |

---

## News

Every entry of `announcements` is a news card in the **News** tab; the three newest are also on the Start tab. Opening the News tab marks the shown news as read; unread news are marked in the navigation.

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `id` | String | generated | Unique id. It never changes, so the read state of players is kept |
| `title` | String | - | Title |
| `text` | String | - | Full text |
| `type` | String | `"info"` | `update`, `event`, `maintenance` or `info`. Old values: `warning` / `danger` show as maintenance, `success` as info |
| `date` | String | generated | Publication date, ISO (`2026-10-21` or `2026-10-21T18:00`) |
| `expiresAt` | String | `null` | ISO date after which the entry is hidden (null = never) |
| `pinned` | Boolean | `false` | Pinned entries come first |
| `link` | String | - | Optional target in the book: `section:<id>`, `page:<id>`, `rule:<category>:<id>`, `faq:<id>` |
| `linkLabel` | String | target name | Text of the link button |
| `permission` | String | - | Only players with this node see the entry |
| `priority` | Integer | `99` | Sort order (lower = higher) |
| `i18n` | Object | - | Optional title, text and link label per language |

News are sorted pinned first, then newest. Ids and dates are generated once for older entries.

Optional extras in `config.json`: `news.joinHint` (a chat line after join when the player has unread news) and the `news` section (icon, priority, permission). See [Configuration](./configuration#book-options-300).

---

## Links

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `id` | String | - | Unique link ID |
| `name` | String | - | Link title |
| `description` | String | - | Short description |
| `url` | String | - | The URL |
| `icon` | String | - | Item ID for the icon |
| `priority` | Integer | `99` | Sort order (lower = higher) |
| `i18n` | Object | - | Optional name and description per language |

:::info How Links Work
Hytale cannot open URLs directly, so a click on a link sends the URL to the player's chat. From there it can be clicked to open in a browser. `copyable` from older files is no longer used.
:::

---

## Stats

Live statistics on the Server tab.

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `showPlayerCount` | Boolean | `true` | Online / max players, with the online record |
| `showUptime` | Boolean | `true` | Server uptime |
| `showVersion` | Boolean | `true` | Server version |
| `showTotalPlayers` | Boolean | `true` | Total number of players seen |
| `customStats` | Array | `[]` | Your own values (`name`, `value`, `icon`) |

The online record and the players seen are kept in `state/server_state.json`.

---

## Examples

### Minimal configuration

```json
{
  "server": {
    "name": "My Server",
    "description": "A Hytale server"
  },
  "announcements": [],
  "links": [
    {
      "name": "Discord",
      "description": "Join us!",
      "url": "https://discord.gg/example",
      "icon": "Deco_Inkwell"
    }
  ]
}
```

### Maintenance notice that disappears by itself

```json
"announcements": [
  {
    "title": "Maintenance tonight",
    "text": "The server is down from 2 to 4 AM for updates.",
    "type": "maintenance",
    "pinned": true,
    "expiresAt": "2026-10-28T04:00"
  }
]
```