Setting Up and Managing a Minetest Mineclone2 Server on Debian-based Systems
In this comprehensive tutorial, we will walk you through the process of setting up a Minetest server with Mineclone2 on a Debian-based system. Minetest is an open-source voxel game engine and game, which is highly modifiable, allowing you to create your own games and experiences. One such modification is Mineclone2, which aims to offer gameplay very similar to Minecraft. We'll cover the installation, configuration, and management of both Minetest and Mineclone2, ensuring you have a robust setup for hosting your voxel game world. Additionally, we'll delve into essential maintenance tasks such as backing up your game world and updating your server software to ensure a smooth, enjoyable gaming experience for you and your players. Whether you're new to server management or an experienced administrator, this guide aims to provide clear, step-by-step instructions to get your Minetest Mineclone2 server up and running.
Here's a step-by-step guide on how to install and run a Minetest Mineclone2 server on a Debian-based system:
Update System Packages:
Before starting, ensure your system packages are up to date by running the following commands:
sudo apt update sudo apt upgrade
Install Minetest Server:
Install the Minetest server package using the following command:
sudo apt install minetest-server
The server should start by default. To confirm, run:
sudo systemctl status minetest-server
Configure Minetest Server:
To change server settings, edit the configuration file using the following command:
sudo nano /etc/minetest/minetest.conf
In this file, you can change your server's name, port, description, message of the day, max users, default privileges, etc.
To set an admin username, uncomment the admin line and enter your username:
name = admin_username
Save and exit the file (in nano, press
Ctrl + X
to close, pressY
to confirm changes, and pressEnter
to save).
Grant Admin Privileges:
- Connect to your server using the admin's username and grant all privileges to yourself.
In Minetest, the initial granting of administrative privileges needs to be done from the server's command line or configuration file, not from within the game client. Here's how you can grant yourself all privileges:
Via Configuration File:
Open the Minetest configuration file (
minetest.conf
) located in/etc/minetest/
or in your Minetest server's main directory.sudo nano /etc/minetest/minetest.conf
Add or modify the following line, replacing
<your-username>
with your username:name = <your-username>
Add the following line to grant all privileges to your username:
initial_privs = all
Save and close the file (in nano, press
Ctrl + X
to close, pressY
to confirm changes, and pressEnter
to save).Restart your Minetest server to apply the changes:
sudo systemctl restart minetest-server
Via Server Command Line:
If your server has a command line interface (CLI), you can grant privileges directly from there.
Access the server CLI, and type the following command, replacing
<your-username>
with your username:/grant <your-username> all
After following one of the above methods, you should have all privileges on your Minetest server. Connect to your server again and check your privileges using the
/privs
command in the game's chat/command interface.Install MineClone2:
First, find the version of MineClone2 compatible with your Minetest version. You can see the installed version of Minetest by running:
/usr/lib/minetest/minetestserver --version
Refer to the MineClone2 forum post for finding your compatible version.
Right-click on the appropriate link and select "copy link".
Download the compatible version of MineClone2 using wget
:
wget [compatible_version_link]
Use the
ls
command to see the name of the zip you have downloaded.unzip [file-name].zip
If you get an error like
-bash: unzip: command not found
you can use the following command to install unzip:sudo apt-get install unzip
Unzip the downloaded file and move the folder to the game's directory:
sudo mv ~/mineclone2 /var/games/minetest-server/.minetest/games/
If the directory doesn't exist, create it and run the move command again.
You can use this command to create the directory:
sudo mkdir /var/games/minetest-server/.minetest/games
Update Configuration for MineClone2:
Edit the Minetest configuration file again:
sudo nano /etc/minetest/minetest.conf
Find the
default_game
setting and change it tomineclone2
:default_game = mineclone2
Save and exit the file.
Delete Pre-existing World:
The current world is not compatible with MineClone2, so delete it:
sudo rm -r /var/games/minetest-server/.minetest/worlds/world
Restart Minetest Server:
Apply your changes by restarting the Minetest server:
sudo systemctl restart minetest-server
Connect to Your Server:
- After restarting, connect to your server again. Now your server should be running MineClone2.
(Optional) Latest Version:
- If you want the latest version of Minetest, you may need to build Minetest from source or set up the backports repositories. Check out the Minetest Wiki for more information on configuring and optimizing your server.
This guide is tailored to meet the requirements of a Debian-based system as per the instructions in the video tutorial.
Backup the Server's Game World
Here are additional sections on how to backup the server's game world and how to update both Minetest and Mineclone2 while keeping the same world intact:
Locate the World Directory:
- The world data is typically stored in the
/var/games/minetest-server/.minetest/worlds/
directory. Inside this directory, you'll find a folder namedworld
or something similar which contains the world data.
- The world data is typically stored in the
Create a Backup:
Use the
tar
command to create a compressed backup of the world directory. Run the following command:sudo tar -cvzf world_backup.tar.gz /var/games/minetest-server/.minetest/worlds/world
This command will create a file named
world_backup.tar.gz
containing a backup of your game world.
Move/Copy Backup to a Safe Location:
It's a good practice to move or copy the backup file to a different location or even to a different machine for safekeeping.
sudo mv world_backup.tar.gz /path/to/safe/location/
Update Minetest and Mineclone2:
Backup Your World:
- Before updating, ensure you have a backup of your world as described in the previous section.
Update Minetest:
If there's a newer version of Minetest available in the repositories, you can update it using the following commands:
sudo apt update sudo apt upgrade minetest-server
Update Mineclone2:
Download the latest version of Mineclone2 from the Mineclone2 forum page or other official sources.
Remove the old Mineclone2 directory:
sudo rm -r /var/games/minetest-server/.minetest/games/mineclone2
Unzip and move the new version of Mineclone2 to the games directory:
unzip mineclone2_new_version.zip sudo mv mineclone2 /var/games/minetest-server/.minetest/games
Verify Configuration:
- Ensure that the
default_game
setting in the Minetest configuration file (/etc/minetest/minetest.conf
) is still set tomineclone2
.
- Ensure that the
Restart Minetest Server:
Restart the Minetest server to apply the updates:
sudo systemctl restart minetest-server
Test Your Server:
- Connect to your server and ensure that everything is working as expected, and your world is intact.
These steps should help you in safely backing up your game world and updating Minetest and Mineclone2 to newer versions while keeping your world intact.
Regenerating a New World and Using a Specific Seed
If you're not satisfied with the auto-generated world in your Minetest server, you can regenerate a new world or use a specific seed to generate a world with certain characteristics. Here's how to do it:
Stop Your Minetest Server: Before making changes to your world, ensure that your Minetest server is stopped to prevent any data corruption.
sudo systemctl stop minetest-server
Backup Your Current World (Optional): If you have any data in your current world that you want to keep, it's a good idea to create a backup before proceeding.
sudo cp -r /var/games/minetest-server/.minetest/worlds/world /path/to/backup/directory
Delete Your Current World: Delete the current world directory to make way for the new world.
sudo rm -rf /var/games/minetest-server/.minetest/worlds/world
Edit Your Minetest Configuration: Open the Minetest configuration file to specify a seed or leave it blank for a random new world.
sudo nano /etc/minetest/minetest.conf
To use a specific seed, add or modify the following line:
fixed_map_seed = your_desired_seed
Replace
your_desired_seed
with the seed you want to use.To generate a random new world, either omit the
fixed_map_seed
line or leave it blank.
Start Your Minetest Server: Start your Minetest server again to generate the new world.
sudo systemctl start minetest-server
Verify Your New World: Connect to your Minetest server and explore the new world to ensure it meets your expectations.
Adjusting World Settings (Optional):
- If the new world isn't to your liking, you can repeat the above steps to try a different seed or generate another random world.
- Additionally, you can explore other world generation settings in the Minetest configuration file to further customize your world.
By following these steps, you can regenerate a new world or use a specific seed to create a world that better suits your preferences in Minetest with Mineclone2.
This section provides a step-by-step guide on how to regenerate a new world and how to use a specific seed for world generation in your Minetest server running Mineclone2.
Make Your New Mineclone2 Server Play More Like Vanilla Minecraft
To make your Mineclone2 server as much like Minecraft as possible, you may need to adjust several settings within the Minetest configuration file (minetest.conf
). Mineclone2 is designed to mimic Minecraft's gameplay and mechanics, but there might be some settings you can tweak to get a closer experience. Here are some suggestions:
Enable Damage:
Ensure that the
enable_damage
setting is true to have a survival gameplay experience similar to Minecraft.enable_damage = true
Set Default Privileges:
Set the default privileges for new players to mimic Minecraft's default permissions.
default_privs = interact, shout
Adjusting Map Generation Settings:
You can tweak map generation settings to get a world generation closer to Minecraft's. Some of these settings include:
mg_name = v7 water_level = 1
Enable PvP:
If you want to allow player versus player combat, ensure that PvP is enabled.
enable_pvp = true
Adjusting Player Settings:
Adjust player settings to match Minecraft's player mechanics.
player_backend = sqlite3 player_transfer_distance = 0
Enable Mods:
- Enable or install additional mods that bring Minecraft features to Mineclone2. There are many mods available that can enhance the gameplay experience to be more like Minecraft.
Texture Packs:
- Consider using a Minecraft-like texture pack to give Mineclone2 a more Minecraft-like appearance.
Server Description and Name:
Set a server description and name that reflects the Minecraft-like experience you are providing.
server_description = Minecraft-like Mineclone2 Server server_name = Mineclone2 Server
Creative Mode:
If you prefer a creative gameplay experience, you can enable creative mode.
creative_mode = false
Static Spawnpoint:
Set a static spawn point similar to Minecraft's spawn behavior.
static_spawnpoint = (0,0,0)
Other Gameplay Settings:
- Explore other gameplay settings in the
minetest.conf
file or in the in-game settings menu to fine-tune the gameplay experience.
- Explore other gameplay settings in the
These adjustments can help make your Mineclone2 server feel more like a traditional Minecraft server. Remember to restart your Minetest server after making changes to the configuration file to apply the new settings:
sudo systemctl restart minetest-server
Keep in mind that while Mineclone2 aims to replicate Minecraft's gameplay within the Minetest engine, there may be some differences or features that are not exactly like Minecraft due to the limitations or differences in the engine or the Mineclone2 implementation.
Admin Commands
Having a grasp of the admin commands in Minetest (especially when running MineClone 2) can be very beneficial for managing a server effectively. Here's a list of commonly used admin commands:
Granting and Revoking Privileges:
/grant <playername> <privilege>
: Grants a specified privilege to a player./revoke <playername> <privilege>
: Revokes a specified privilege from a player.
Teleportation:
/teleport <X,Y,Z>
: Teleports you to the specified coordinates./teleport <playername> <X,Y,Z>
: Teleports the specified player to the specified coordinates./teleport <playername1> <playername2>
: Teleports player1 to player2's position.
Giving Items:
/give <playername> <itemstring> [<count>]
: Gives the specified item to a player. You can also specify the quantity.
Time and Weather:
/time <time>
: Sets the time of day. (e.g.,/time 6000
for midday)/weather <weather>
: Sets the weather (e.g.,/weather rain
to set the weather to rain).
Server Management:
/kick <playername>
: Kicks a player from the server./ban <playername>
: Bans a player from the server./unban <playername>
: Unbans a player from the server.
Clearing Objects:
/clearobjects
: Clears all objects in the world. Be cautious as this can't be undone.
Purging and Removing Players:
/clearinv <playername>
: Clears a player's inventory./remove_player <playername>
: Removes a player's data from the server.
Information Commands:
/status
: Displays server status information./privs <playername>
: Displays the privileges of a specified player.
World Management:
/set <name> <value>
: Sets a server configuration setting./deleteblocks <X1,Y1,Z1> <X2,Y2,Z2>
: Deletes all blocks in the specified area.
Chat and Communication:
/me <action>
: Sends an action message to the chat. (e.g.,/me jumps
will display "*jumps") /msg <playername> <message>
: Sends a private message to a specified player.
These commands should give you a good degree of control over your server and help in managing players and game settings. Make sure to replace placeholders like <playername>
, <X,Y,Z>
, <itemstring>
, <count>
, <time>
, <weather>
, <name>
, and <value>
with actual values or player names when using these commands.
Admin Fly
In Minetest and MineClone 2, the fly
privilege allows players to fly around the world, which can be extremely useful for admins and moderators for overseeing and managing the server. Here's how you can use and manage the fly
privilege:
Enabling Fly Mode:
Granting Fly Privilege:
If you're an admin, you can grant the
fly
privilege to yourself or other players using the following command:/grant <playername> fly
Replace
<playername>
with the username of the player you want to grant the privilege to.
Activating Fly Mode:
- Once the
fly
privilege has been granted, the player can toggle fly mode on and off by pressing theK
key (by default). This can be changed in the settings under "Change Keys".
- Once the
Disabling Fly Mode:
- Revoking Fly Privilege:
If you need to revoke the
fly
privilege from a player, you can use the following command:/revoke <playername> fly
Checking Fly Privilege:
- Checking Privileges:
You can check the privileges of a player using the following command:
/privs <playername>
Tips:
- The
fly
privilege is very powerful and can potentially be abused, so it's typically reserved for trusted players, admins, and moderators. - While in fly mode, players can move up by pressing the jump key (space by default) and move down by pressing the sneak key (shift by default).
These commands and tips should help you manage the fly
privilege on your server effectively.
Adam Malin
You can find me on Twitter or on Nostr at
npub15jnttpymeytm80hatjqcvhhqhzrhx6gxp8pq0wn93rhnu8s9h9dsha32lx
You can view and write comments on this or any other post by using the Satcom browser extention.
value4value Did you find any value from this article? Click here to send me a tip!