Difference between revisions of "Setting up a server/Debian"

From Luanti Wiki
Jump to navigation Jump to search
(clarify Luanti name more)
(Replaced content with "Please see [https://dev.luanti.org/setting-up-a-server/ Setting up a server] on the Luanti Developer Wiki. For setting up a Luanti server according to Debian, see [https:...")
Tag: Replaced
 
Line 1: Line 1:
{{Languages}}
+
Please see [https://dev.luanti.org/setting-up-a-server/ Setting up a server] on the Luanti Developer Wiki.
A simple Luanti/Minetest [[server]] can be started in any Debian (Ubuntu, Linux Mint or derivative distribution) that has the <code>minetest</code> package by going to its “Server” tab, however such a game only remains available for the duration of the host's playing session.
 
  
''Note: Luanti is called “Minetest” for the rest of this page due to old package versions, where it’s still called “Minetest”.''
+
For setting up a Luanti server according to Debian, see [https://wiki.debian.org/Games/Minetest#Setting_up_a_server this page on the Debian Wiki].
 
 
This guide is aimed at providing a more permanent, minimal server environment setup without a graphical desktop environment.
 
 
 
== Installing Minetest version 5 from Buster Backports ==
 
 
 
As of August 2019, minetest is available in version 0.4.17 in Debian Buster (Stable), and also in version 5.0.1 in Buster Backports.
 
 
 
The two versions are not compatible, and installing both version on the same system would be tricky. Since most servers probably use the newest versions, and players too, the version from the backports comes as a natural choice.
 
 
 
First, add the [https://wiki.debian.org/Backports Backrpots repositories as explained on Debian Wiki].
 
 
 
Then install the minetest packages you need from it.
 
 
 
# apt install -t buster-backports minetest-server
 
 
 
== Manage the server startup ==
 
 
 
Systemd is the default and currently prefered solution to manage services on Debian.
 
 
 
=== systemd ===
 
 
 
Since version 0.4.10+repack-3 the Debian minetest-server package automatically creates a system-wide, unprivileged user called '''Debian-minetest'''. The home directory of this user is ''/var/games/minetest-server''. You can do all the configuration in ''/etc/minetest/minetest.conf''. All log files are written to ''/var/log/minetest''.
 
 
 
It should already be started. Check whether its running (or why it doesn't start) with
 
 
 
# systemctl status minetest-server
 
 
 
Start the server with
 
 
 
# systemctl start minetest-server
 
 
 
Stop the server with
 
 
 
# systemctl stop minetest-server
 
 
 
You can disable the server on boot with
 
 
 
# systemctl disable minetest-server
 
 
 
You can start multiple servers with different configurations by using systemd's template unit feature.
 
 
 
# systemctl start minetest-server@pvp.service
 
 
 
Provided that you also saved the configuration file for this server in <code>/etc/minetest/pvp.conf</code>, the server will now use this second configuration and log everything to <code>/var/log/minetest/pvp.log</code>.
 
Simply replace <code>pvp</code> after @ with your desired name.
 
 
 
=== sysV-init ===
 
 
 
If systemd is not your default init system and you still prefer to use the old sysV-init style configuration, you can use the service command to start or stop your server.
 
 
 
# service minetest-server start
 
 
 
or:
 
 
 
# service minetest-server stop
 
 
 
== Configuration of the server ==
 
 
 
You can find a commented server configuration file on /usr/share/doc/minetest/minetest.conf.example.gz.
 
 
 
  # zcat /usr/share/doc/minetest/minetest.conf.example.gz > /etc/minetest/myservername.conf
 
 
 
Interesting parameters start with the Server / Singleplayer section, you may delete client parameters prior to that.
 
 
 
== Install and enable mods ==
 
 
 
=== Install a mod ===
 
 
 
You can install the packages you want from the available mods.
 
 
 
If you need to install mods which aren't packaged yet in Debian (for instance, mobs_animal and mobs_monster), you can add them in the /var/games/minetest-server/.minetest/mods directory (create it if needed).
 
 
 
=== Enable a mod ===
 
 
 
You will need to enable them afterwards. Mod activation is not a general server setup, but a world setup.
 
 
 
Once a server is started, it should create world files, and refresh them to add configuration lines with the available mods in the world.mt file.
 
 
 
  $ cat /var/games/minetest-server/.minetest/worlds/world/world.mt
 
  creative_mode = false
 
  auth_backend = sqlite3
 
  player_backend = sqlite3
 
  gameid = minetest
 
  enable_damage = true
 
  backend = sqlite3
 
  load_mod_mobs_animal = true
 
  load_mod_mobs = true
 
  load_mod_mobs_monster = false
 
 
 
First, stop the server running the world. Then edit this file to enable the mod, just change the value from false to true on the corresponding load_mod_* lines.
 
 
 
== Further information ==
 
 
 
* For a detailed explanation of the server configuration file, see the [http://github.com/minetest/minetest/blob/master/minetest.conf.example minetest.conf] page.
 
* Use a different [[Database backends|database backend]] for your world.
 
* [http://forum.minetest.net/viewtopic.php?f=3&t=3837 One-line script for installing/compiling Minetest Git, for Debian / Ubuntu / Mint]
 
* [https://wiki.debian.org/Games/Minetest Debian Wiki Minetest page]
 
* [http://forum.minetest.net/viewtopic.php?f=10&t=9588 Guide to create fast minetest server on Debian]
 
* [[Server commands]] page for a list of useful commands.
 
* [[Itemstrings|Item strings]] for the itemstrings for use with the <code>/give</code> and <code>/giveme</code> commands.
 
* See the [[Privileges]] page for detailed information on the privilege system.
 
 
 
 
 
[[Category:Server]]
 
[[Category:Tutorials]]
 

Latest revision as of 16:09, 21 December 2024

Please see Setting up a server on the Luanti Developer Wiki.

For setting up a Luanti server according to Debian, see this page on the Debian Wiki.