Config files and prompts
Config files
Section titled “Config files”Many games read their port, player limit or passwords from a config file instead of the command line. configFiles writes values into those files before every start, like Pterodactyl’s Wings does:
configFiles: - path: server.properties # relative to the server's files; may use placeholders parser: properties values: - key: server-port value: "{{server.build.default.port}}" - key: max-players value: "{{env.MAX_PLAYERS}}"parser |
File | Keys |
|---|---|---|
properties (default) |
key=value lines (server.properties) |
the key |
ini |
[section] and key=value |
section.key, or plain for the top |
json |
a JSON document | a dotted path: network.port |
yaml |
a YAML document | a dotted path |
file |
any text file | a line starting with the key is replaced by the value |
- Existing keys are replaced in place; missing ones are added, in the given order. Everything else in the file stays as it is.
- A missing file is created; the game may fill in the rest on its first start.
jsonkeeps numbers andtrue/falseas JSON types.yamldoesn’t keep comments.
Console prompts
Section titled “Console prompts”When a game asks something on its console, the server page can show a button that does exactly what the template defines: write files, send a command, then start or restart. Nothing else.
prompts: - id: eula when: You need to agree to the EULA # text in a console line (case-insensitive) title: The server needs the Minecraft EULA accepted message: By accepting you agree to the Minecraft End User License Agreement. link: label: Minecraft EULA url: https://aka.ms/MinecraftEULA action: Accept and start # the button writeFiles: - path: eula.txt content: "eula=true\n" command: null # or a console command to send then: start # none · start · restartThe prompt disappears at the next server start. Importing an egg with Pterodactyl’s eula feature creates exactly this prompt.