Documentation menu

Getting started

Configuration

Every key in link.json, its default, and the environment variable that overrides it.

Link reads mods/Link_Link/link.json. It creates the file with defaults on the first boot, and adds any new keys after an update, so you never have to write it from scratch.

Environment variables win over the file. That helps in containers, where you want one image and one file for every server.

This server

serverId default lobby-1 env LINK_SERVER_ID

The unique name of this server. Transfers are addressed to it, and players use it with /server.

group default lobby env LINK_GROUP

The server’s type, for example lobby or skywars. /play, /servers and LinkPlugin.servers(group) pick servers by it.

host env LINK_HOST

The address other servers send players to. Players connect to it from their own game, so use a public address or domain, not 127.0.0.1.

port default 5520 env LINK_PORT

The port that goes with host.

With a shared file, host, port and group come from this server’s entry in servers instead.

Registry

backend default static

How servers find each other: static, redis or http. See choosing a registry.

secret env LINK_SECRET

Signs every transfer, and must be the same on every server. Generated on the first boot. Only used by static: Redis and Cloudflare keep it for you.

The whole network, for static only. Each entry has an id, group, host and port. See shared file.

redis.url env LINK_REDIS_URL

For redis: redis://:password@host:6379/0, or rediss:// for TLS.

redis.namespace default link

A key prefix, so several networks can share one Redis.

http.url env LINK_HTTP_URL

For http: the URL of your Cloudflare registry.

http.token env LINK_HTTP_TOKEN

For http: the LINK_TOKEN you set on the registry.

Matchmaking

strategy default fill

How /play picks a server when players leave this one: fill packs the busiest server with room, spread picks the emptiest. See matchmaking.

Game servers

requireTicket default false

Send players who join this server directly, not through Link, to fallbackGroup. See lobby-only game servers.

fallbackGroup default lobby

Where requireTicket sends those players.

When the file is wrong

Link checks the file at startup. If something is missing, it logs what, turns transfers off on that server, and lets the server start normally. Players can still join it; they just can’t move with Link until you fix the file and restart. The messages are listed in troubleshooting.

Something wrong or missing on this page? Open an issue on GitHub.