minetestserver
Run a Minetest game server
TLDR
Start the server
List available worlds
Load the specified world
List the available game IDs
Use the specified game
Listen on a specific port
Migrate to a different data backend
Start an interactive terminal after starting the server
SYNOPSIS
minetestserver [options]
PARAMETERS
--help
Displays a help message and exits.
--version
Displays the server version information and exits.
--config <file>
Specifies an alternative path to the server configuration file (e.g., minetest.conf).
--world <path>
Sets the path to the world directory where world data is stored and loaded from.
--port <port>
Specifies the network port on which the server will listen for incoming connections.
--gameid <gameid>
Specifies the game ID (e.g., 'minetest_game') to load. This determines which game and mods are active.
--logfile <file>
Redirects all server output and log messages to the specified file.
--info
Displays detailed server information, including active mods, game paths, and compile-time options, then exits.
--verbose
Enables more verbose logging output, useful for debugging.
--migrate <source_world> <dest_world>
Migrates world data from one location to another, typically used for world format conversions or relocation.
--update-world
Performs an in-place update of the world database to the latest Minetest world format.
DESCRIPTION
minetestserver is the standalone server component of the open-source voxel game Minetest. It allows multiple players to connect to a shared world, enabling cooperative building, exploration, and various game modes. Unlike the Minetest client, minetestserver runs without a graphical interface, making it suitable for deployment on headless servers or as a background process. It manages world data, player connections, and game logic, relying heavily on a configuration file (typically minetest.conf) for most settings, though some crucial parameters can be overridden or specified via command-line arguments. Its flexibility and low resource footprint make it popular for hosting private or public Minetest worlds. Users can extend its functionality through Lua-based mods and game modes.
CAVEATS
Security: Exposing a minetestserver to the internet without proper security measures (e.g., strong admin passwords, up-to-date software) can pose risks.
Performance: Server performance is highly dependent on hardware, player count, and complexity of loaded mods/games. Monitor CPU, RAM, and disk I/O.
Configuration: Most server settings are controlled via minetest.conf. Incorrect configurations can lead to stability issues or unintended behavior.
World Corruption: Improper shutdowns (e.g., power outages) can corrupt world data. Regular backups are strongly recommended.
CONFIGURATION FILE (MINETEST.CONF)
The server primarily relies on a configuration file, typically named minetest.conf. This file contains the majority of adjustable server settings, including the server name, maximum players, PvP settings, administrator privileges, and detailed logging options. Command-line parameters often serve to override specific settings found within this file, or to specify its location.
RUNNING IN BACKGROUND
For continuous operation, minetestserver is commonly run as a background process. This can be achieved using terminal multiplexers like screen or tmux, or by using nohup. For more robust and managed deployment on Linux systems, it is often configured as a systemd service, which ensures automatic startup on boot, proper process management, and simplified logging.
HISTORY
Minetest's development began around 2010 by Perttu Ahola (celeron55). The minetestserver component was central from its early stages, facilitating multiplayer gameplay. Over the years, it has matured significantly, gaining features like a robust Lua modding API, improved world generation, and enhanced network performance. Its open-source nature has fostered a vibrant community, contributing to its continuous development and expansion with various game modes and content. The clear separation between client and server has always been a core design principle, making dedicated server hosting efficient and popular.