Register a server
A registered server appears in the GAMPEON server browser while it sends heartbeats. Registration only lists your server; it does not host it.
1. Create the server entry
Section titled “1. Create the server entry”In GAMPEON Create, open Servers, fill in Register a server and enter a name (3 to 64 characters). Or use the API:
POST https://api.gampeon.com/v1/serversAuthorization: Bearer <session token>Content-Type: application/json
{ "name": "Neon Racers EU #1" }The answer contains the server id and a serverKey. The key is shown only once. Store it in your server’s configuration, never in a Git repository or a marketplace upload.
You can register up to 10 servers per account.
2. Send heartbeats
Section titled “2. Send heartbeats”Every 30 seconds, your server sends its state:
POST https://api.gampeon.com/v1/servers/<id>/heartbeatX-Server-Key: <serverKey>Content-Type: application/json
{ "port": 7790, "players": 12, "maxPlayers": 64, "tags": ["racing", "drift"], "language": "en"}| Field | Required | Meaning |
|---|---|---|
port |
yes | Game port, 1 to 65535. |
players |
yes | Players online now, at most maxPlayers. |
maxPlayers |
yes | 1 to 2048. |
address |
no | Host name or IP. Defaults to the address the heartbeat came from. |
tags |
no | Up to 10 tags, used as filters in the browser. Use genres such as roleplay, racing or survival. |
language |
no | Language code such as en or de-DE. |
The answer says when to send the next heartbeat (nextHeartbeatInMs). A server without a heartbeat for 90 seconds is shown as offline and disappears from the list.
With the GAMPEON game server
Section titled “With the GAMPEON game server”The GAMPEON game server (and gampeon-server) sends heartbeats and checks players’ join tickets by itself. Put the ID and key into server.cfg:
set gampeon_server_id "<id>"set gampeon_server_key "<serverKey>"sets tags "roleplay, economy"sets locale "en-US"sv_maxclients 64- The game server sends
portandmaxPlayersitself.sv_maxclientslowersmaxPlayersif it is smaller than the game’s limit. tagsandlocalebecome the tags and the language in the server browser.- Set
sv_publicAddressif players should connect to another host name than the one the heartbeat comes from. - Scripts can neither read nor change
gampeon_server_id,gampeon_server_keyorgampeon_api. The key is only sent over HTTPS.
Players who join get checked with POST /v1/servers/<id>/join/verify, see Players.
3. Describe and link it
Section titled “3. Describe and link it”In the portal or with PATCH /v1/servers/<id> you can add a description, a website (https:// only) and link the server to one of your projects. Linked servers add their players to the project page.
Lost key
Section titled “Lost key”Delete the server entry and create a new one. Keys cannot be shown again, because GAMPEON only stores a hash of them.