> For the complete documentation index, see [llms.txt](https://docs.aethercube.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aethercube.fr/developers/running-a-server/requirements-and-installation.md). Agents can also search and read this documentation through its [MCP server](https://docs.aethercube.fr/~gitbook/mcp).

# Requirements and installation

This page gets you from nothing to a runnable server folder. You need it if you want to host a server, for friends or for the public.

## Requirements

| Item             | Requirement                                                                                                                                                                                   |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Java             | Java 21. The build targets release 21.                                                                                                                                                        |
| Operating system | Any system that runs Java 21. The server is tested on Linux. It also runs on Windows.                                                                                                         |
| Network          | One TCP port for players (default `25565`). Optionally one loopback or private port for metrics (default `9464`).                                                                             |
| Backend account  | Only for an online server that is listed in the directory. See [Online mode, TLS and the directory](https://docs.aethercube.fr/developers/running-a-server/online-mode-tls-and-directory.md). |

## Getting the server

There is no packaged download yet, so you build the server from source. You need the repository and a JDK 21 on the machine that builds it. Gradle comes with the repository through the wrapper, so there is nothing else to install.

```sh
cd game-server
./gradlew :server-launcher:installDist
```

On Windows use `gradlew.bat`.

The task writes the runnable distribution to:

```
game-server/server-launcher/build/install/aethercube-server/
├── bin/
│   ├── aethercube-server        POSIX start script
│   └── aethercube-server.bat    Windows start script
└── lib/                         the server and its libraries
```

Copy that folder to the machine that hosts the server, or run it in place.

## Server directory layout

The server reads and writes files relative to a base directory. The base directory is the parent of the folder that holds the configuration file. With the default `--config config/server.yml`, it is the directory you start the server from.

```
my-server/
├── config/
│   ├── server.yml            required
│   ├── tls/                  certificate chain and private key (not needed with tls.self_signed)
│   └── server-secret.txt     backend secret (online mode only)
├── plugins/                  plugin jars, one folder of data per plugin
├── packs/                    content packs (folders and .zip files)
└── server-data/              created by the server: worlds, backups, players, permissions
```

`plugins.directory`, `content_packs.directory` and `storage.data_directory` are resolved against the base directory when they are relative. The TLS files and the secret file are resolved the same way.

Start the server from the base directory:

```sh
/path/to/aethercube-server/bin/aethercube-server --config config/server.yml
```

## Command line

| Option                | Meaning                                                                                                                                |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `--config <file>`     | The configuration file. Default `config/server.yml`.                                                                                   |
| `--ready-file <path>` | When the gameplay port is listening, write `{"port": <n>, "spki": "<hex>"}` to this file. Used by the client for single-player worlds. |
| `--parent-pid <pid>`  | Stop in order when this process ends. The check runs every 2 seconds.                                                                  |
| `--help`, `-h`        | Print the usage.                                                                                                                       |

Exit status: `2` for an invalid configuration (every problem is printed first), `1` when start-up fails.

## Java options and logging

The start scripts are the standard Gradle application scripts. They read `JAVA_HOME`, `JAVA_OPTS` and `AETHERCUBE_SERVER_OPTS`. Use them to size the heap, for example `JAVA_OPTS="-Xms2g -Xmx2g"`.

The server logs to standard output. Set the level with a system property:

```sh
JAVA_OPTS="-Daethercube.log.level=DEBUG" bin/aethercube-server --config config/server.yml
```

The default level is `INFO`. Secrets, tickets and packet payloads are never logged, whatever the level. I would not raise the level of third-party loggers in production.

## Stopping

Type `stop` in the console, run `/stop` as an operator, or send SIGINT or SIGTERM. The server then shuts down in order:

1. It refuses new players.
2. It tells the players, disconnects them and closes the network.
3. It disables the plugins.
4. It saves the player profiles and the modified chunks.
5. It stops the simulation, flushes the journal and closes the world files.
6. It stops the workers and the metrics endpoint, and unregisters from the master server.

`server.shutdown_timeout_seconds` bounds this sequence. Changes that miss the budget stay in the journal and are replayed at the next start.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aethercube.fr/developers/running-a-server/requirements-and-installation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
