Multiplayer servers
Export a dedicated server, configure a session, and connect game clients.
asterune-server runs an authoritative game session on a machine operated by
the game's author or host. Clients connect directly to its address. Use
Studio multiplayer playtests to test server and
client behavior before exporting.
Export a dedicated server
The current Studio Export dialog reports dedicated-server builds as unavailable. Use the dedicated-server export command to produce a server build. Desktop client exports use the graphical Export dialog.
Dedicated-server exports require a compatible server template. Source builds can stage one using Building Asterune.
Start a session
On the server machine, open the exported server directory and run its executable.
For a Linux export named MyGame:
./MyGame --listen 0.0.0.0:27015 --status 127.0.0.1:27016The executable reads the exported game beside it. --game <file> selects a
different .astg bundle, .astx place, or .luau script. A missing game file,
unknown profile, or invalid configuration prevents startup and returns an error.
The optional status listener serves /health, /ready, and /metrics over
HTTP. Request http://127.0.0.1:27016/ready on the server machine. HTTP 200 with
ready: true confirms readiness; HTTP 503 indicates that the session is not
ready. Read the server log if startup fails or readiness remains false.
Connect a client
Export the same game as a client using Exporting games. From its Linux export directory, connect to the server:
./MyGame --connect play.example.com:27015Replace play.example.com with the server's reachable host name or IP address.
Allow inbound UDP traffic on the server's listen port in the host firewall and
network configuration. For a test on one machine, connect to 127.0.0.1:27015.
Confirm that the client enters the game and the server records the connection.
Server configuration
asterune.server.json defines the game's server profiles. An operator can add
server.config.json beside the exported executable or select another file with
--config <file>. Command-line options take precedence over environment
variables, then operator configuration, then exported settings and defaults.
| Option | Default | Behavior |
|---|---|---|
--profile <id> | The project's default profile | Selects a profile from asterune.server.json. Unknown IDs fail. |
--place <key> | The profile's first place, or the game's start place | Selects the initial place. |
--listen <host:port> | 0.0.0.0:27015 | Binds the game listener. |
--status <host:port> | Disabled | Binds the HTTP status listener. |
--max-players <n> | The selected profile's limit | Overrides the limit, clamped to 1–1024 inclusive. A nonnumeric command-line value fails. |
--log-json | Disabled | Writes structured log entries as JSON objects. |
Environment variables use ASTERUNE_SERVER_ followed by the option name in
capitals with underscores, such as ASTERUNE_SERVER_MAX_PLAYERS.
A profile with joinPolicy: "reserved" does not enforce admission when no token
authority is configured. The standalone server logs a warning in that case and
accepts anyone who can reach the listener.