Configuration
Edit the files in config/, then restart Foton.
config.toml
Server, network, logging and performance.
worlds.toml
Worlds, seeds and difficulty.
groups.toml
Groups and permissions.
config.toml
Configuration schema for Foton Minecraft server.
[server]
Server configuration
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
server_port required | integer | 25565 | 1–65000 | Server port |
max_players required | integer | 20 | 1–2147483647 | Maximum number of players allowed on the server |
allow_extended_view_distance | boolean | false | Allow view_distance above vanilla's 32-chunk cap, up to Foton's 128-chunk cap | |
view_distance required | integer | 10 | 1–128 | Maximum view distance in chunks. Normally 1-32; 1-128 when allow_extended_view_distance is true. |
simulation_distance required | integer | 10 | 1–128 | Maximum simulation distance in chunks |
max_chained_neighbor_updates | integer | 1000000 | Maximum queued neighbor-update tasks in one chained run. Negative values disable the limit. | |
online_mode required | boolean | true | Whether to use Mojang's authentication service | |
auth_server | string | uri | Optional authentication endpoint for online-mode hasJoined checks. Omit to use Mojang's session server. | |
allow_insecure_auth_server | boolean | false | Allow a non-loopback HTTP authentication endpoint. HTTPS remains the default. | |
profile_server | string | uri | Optional endpoint for online-mode player name-to-profile lookups. Omit to use Mojang's profile service. | |
services_server | string | uri | Optional endpoint for Mojang-compatible service public keys. Omit to use Mojang's services endpoint. | |
encryption required | boolean | true | Whether to enable encryption for client-server communication. Required in online mode. | |
allow_flight | boolean | false | Whether the server allows unauthorized client flight | |
tab_list_stats | boolean | true | Whether the server shows its TPS and MSPT statistics in the player list header and footer. A plugin's own header or footer for a player always takes precedence | |
motd required | string | "A Foton Server" | Message of the day displayed in server lists | |
use_favicon required | boolean | true | Whether to use a custom favicon for the server | |
favicon required | string | "config/favicon.png" | Path to the favicon file (PNG format, 64x64 pixels) | |
enforce_secure_chat | boolean | false | Whether to enforce secure chat | |
chat_spam_threshold_seconds | integer | 10 | Vanilla chat spam threshold window in seconds; values <= 0 disable throttling | |
command_spam_threshold_seconds | integer | 10 | Vanilla command spam threshold window in seconds; values <= 0 disable throttling |
[server.compression]
Compression settings
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
threshold required | integer | 256 | 256–2147483647 | Compression threshold in bytes |
level required | integer | 4 | 1–9 | Compression level (1 = fastest, 9 = best compression) |
[server.server_links]
Server links configuration
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
enable | boolean | false | Enable the server links feature | |
links | array of table | [] | List of server links to display in the server menu |
[server.rcon]
Remote administration over the Source Rcon protocol
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
enable | boolean | false | Whether the rcon port is opened at all | |
bind | string | "127.0.0.1" | IP address rcon listens on. Keep loopback unless remote administration is required | |
port | integer | 25575 | 1–65535 | Port rcon listens on |
max_connections | integer | 8 | 1–65535 | Maximum simultaneous rcon connections |
password | string | "" | Password every rcon client must send before it may run a command |
[server.bedrock]
Letting Bedrock Edition players in, through a Geyser this server runs
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
enable | boolean | false | Whether Geyser is started and the Bedrock port opened at all | |
port | integer | 0 | 0–65535 | UDP port Bedrock clients connect to; 0 shares server_port. Trade-off: Bedrock's Add Server dialog pre-fills 19132, so sharing the Java port means typing the port in by hand -- set this to 19132 explicitly for that automatic experience instead |
motd | string | "" | What Bedrock clients see in the server list; empty reuses the server MOTD | |
username_prefix | string | "." | Prepended to a Bedrock player's gamertag so it cannot collide with a Java player's name | |
trusted_proxies | array of string | ["127.0.0.1", "::1"] | Addresses a Floodgate identity handshake is accepted from | |
java_home | string | "" | A JDK or JRE for Geyser; empty means JAVA_HOME, then java on the path | |
jar_path | string | "" | An operator-supplied Geyser jar; empty means fetch the pinned build |
[server.threads]
Optional worker counts for server thread pools. 0 or omitted uses each pool's automatic default.
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
main_runtime | integer | 0 | ≥ 0 | Worker threads for the primary Tokio runtime |
chunk_runtime | integer | 0 | ≥ 0 | Worker threads for the chunk Tokio runtime |
packet_workers | integer | 0 | ≥ 0 | Persistent workers for inter-tick gameplay packet processing |
chunk_generation | integer | 0 | ≥ 0 | Worker threads for the Rayon chunk generation pool |
chunk_encoding | integer | 0 | ≥ 0 | Worker threads for the Rayon chunk encoding pool |
[server.bug_reports]
Where player-filed bug reports are sent, on top of the local file
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
webhook_url | string | Endpoint each filed report is posted to; unset keeps reports local | ||
webhook_token | string | Optional bearer token sent with each post |
[server.resource_pack]
The resource pack every client is asked to load while it joins. Replaces the resource-pack* and require-resource-pack entries of vanilla's server.properties
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
url | string | "" | Where clients download the pack from (resource-pack). Empty sends no pack | |
id | string | "" | The pack's UUID (resource-pack-id). Empty derives one from the URL, as vanilla does | |
sha1 | string | "" | The pack file's SHA-1 in hex, at most 40 characters (resource-pack-sha1). Clients cache the pack by it; without one they only refresh it when the URL changes | |
prompt | string | "" | Text on the confirmation screen, as vanilla text component JSON (resource-pack-prompt) | |
required | boolean | false | Whether a client that declines the pack is disconnected (require-resource-pack) |
[log]
Logging configuration
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
log_path | string | "./.logs" | Path where store the log files and history | |
log_level | error | warn | info | debug | trace | "info" | The level of information the logger will show | |
time | none | date | uptime | "uptime" | Time format: none, date (HH:MM:SS:mmm), or uptime (seconds since start) | |
module_path | boolean | false | Whether the module_path of the log should be displayed | |
extra | boolean | false | Whether the extra data of the log should be displayed | |
log_file | boolean | true | Whether the log should be written into a file | |
rotation_time | none | hourly | daily | weekly | monthly | "daily" | Time between log file rotations | |
max_history | integer | 50 | ≥ 1 | Amount of console commands saved |
worlds.toml
World and domain configuration schema for Foton.
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
save_path | string | "saves" | Root directory for saves | |
seed | string | "" | Root seed default; empty means random | |
default_gamemode | gamemode | "survival" | ||
difficulty | difficulty | "normal" | ||
storage | storage | |||
player_storage | player_storage | |||
domains required | table | Domain declarations keyed by domain name |
Structures
storage
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
type required | foton:disk | foton:ram | |||
config | table | Storage-specific config. foton:disk supports optional relative path; foton:ram accepts no keys. |
player_storage
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
type required | foton:file |
domain
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
default | boolean | false | ||
seed | string | |||
default_gamemode | gamemode | "survival" | ||
difficulty | difficulty | "normal" | ||
storage | storage | |||
worlds required | array of world | ≥ 1 item(s) |
world
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
name required | world_name | |||
generator required | identifier | |||
default | boolean | false | ||
seed | string | |||
default_gamemode | gamemode | "survival" | ||
difficulty | difficulty | "normal" | ||
storage | storage | |||
nether_portal_target | world_name | |||
end_portal_target | world_name | |||
config | table | Generator-specific config validated by the selected generator |
Value types
| Name | Accepts | Meaning |
|---|---|---|
identifier | string ^[a-z0-9_.-]+:[a-z0-9_.-]+(/[a-z0-9_.-]+)*$ | |
world_name | string ^[a-z0-9_.-]+$ | |
gamemode | survival | creative | adventure | spectator | |
difficulty | peaceful | easy | normal | hard |
groups.toml
Permission group configuration schema for Foton.
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
default_groups required | array of group_name | ["default"] | unique | Groups applied to every player |
groups required | table | Permission groups keyed by group name |
Structures
group
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
priority | integer | 0 | Conflict priority for equally specific group rules. Higher wins. | |
inherits | array of group_name | [] | unique | Parent groups inherited by this group |
allow | array of permission_rule_expression | [] | unique | Permission expressions explicitly allowed by this group |
deny | array of permission_rule_expression | [] | unique | Permission expressions explicitly denied by this group |
metadata | array of metadata_rule | [] | Ordered typed metadata rules |
metadata_rule
| Key | Type | Default | Limits | Meaning |
|---|---|---|---|---|
key required | permission_metadata_expression | Namespaced metadata key with an optional context selector, such as plugin:max_homes{domain=survival}. | ||
value required | permission_metadata_value | Typed permission metadata value |
Value types
| Name | Accepts | Meaning |
|---|---|---|
group_name | string ^[a-z0-9_-]+$ | |
permission_rule_expression | string ^(\*|[a-z0-9_-]+(\.[a-z0-9_-]+)*(\.\*)?)(\{([a-z0-9_-]+|[a-z0-9_-]+(\.[a-z0-9_-]+)*:[a-z0-9_-]+([./][a-z0-9_-]+)*)=[^\s{},=]+(,([a-z0-9_-]+|[a-z0-9_-]+(\.[a-z0-9_-]+)*:[a-z0-9_-]+([./][a-z0-9_-]+)*)=[^\s{},=]+)*\})?$ | Permission key with an optional context selector, such as foton.fly{domain=lobby}. |
permission_metadata_expression | string ^[a-z0-9_-]+(\.[a-z0-9_-]+)*:[a-z0-9_-]+([./][a-z0-9_-]+)*(\{([a-z0-9_-]+|[a-z0-9_-]+(\.[a-z0-9_-]+)*:[a-z0-9_-]+([./][a-z0-9_-]+)*)=[^\s{},=]+(,([a-z0-9_-]+|[a-z0-9_-]+(\.[a-z0-9_-]+)*:[a-z0-9_-]+([./][a-z0-9_-]+)*)=[^\s{},=]+)*\})?$ | Namespaced metadata key with an optional context selector, such as plugin:max_homes{domain=survival}. |
permission_metadata_value | boolean or integer or string | Typed permission metadata value |