Page 1 of 1

Public Minetest server on debian linux

PostPosted: Mon Jun 29, 2015 15:36
by TuxerP
Hello,

I am new to this forum and have setup a basic minetest server on debian. Now I want to change the world of my existing users (some family members) to a new world. For example the stampy world. I can find lots of thing for single player servers, but not for public servers. Can anyone help me out?

My hardware:
Intel Pentium 4 Dual Core CPU 3.00 Ghz
2 Gb internal memory
70 Gb harddisk

Installed default Debian testing install and installed minetest-server from package management.

Minetest directory:
/var/games/minetest-server/.minetest/

Mods directory:
/var/games/minetest-server/.minetest/mods/

World directory:
/var/games/minetest-server/.minetest/worlds/

Re: Public Minetest server on debian linux

PostPosted: Tue Jun 30, 2015 11:24
by Morn76
I think you just put the world in the worlds/ folder and change the command that launches the Minetest server (probably in a systemd service file somewhere) to that world, e.g.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
 minetestserver --worldname stampyworld

Looking at the file list for the Debian MT-server package (https://packages.debian.org/jessie/i386 ... r/filelist), there doesn't seem to be a service file included though. I suppose you have to figure out how MT is started on Debian first.

Re: Public Minetest server on debian linux

PostPosted: Tue Jun 30, 2015 21:05
by TuxerP
Morn76 you set me on the right track. There is a service on debian which starts the minetest server. In the service configuration it uses a startup parameter "conf". This conf pointed to the /etc/minetest/minetest.conf file. This file contained a parameter called "default_game" which was set to minetest. Changing it to stampy created a stampy world.

Re: Public Minetest server on debian linux

PostPosted: Tue Jun 30, 2015 21:21
by Morn76
Arch Linux (the distro I use) includes a really ingenious Minetest .service file that you can enable with a parameter, e.g. "systemctl enable minetest@stampyworld" should work I think. The benefit would be that you can quickly switch between worlds like this and perhaps even run multiple servers with different world paths at the same time. Maybe you could adapt this for Debian if you need that kind of functionality.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
[Unit]
Description=Minetest multiplayer server w/ %i.conf server config
After=syslog.target network.target

[Service]
User=minetest
ExecStart=/usr/bin/minetestserver --config /etc/minetest/%i.conf --map-dir /var/lib/minetest/%i/

[Install]
WantedBy=multi-user.target

from https://projects.archlinux.org/svntogit ... s/minetest

Re: Public Minetest server on debian linux

PostPosted: Wed Jul 01, 2015 00:01
by lightonflux
Who does the packaging for Debian? It should be included in the deb, even if disabled.

Re: Public Minetest server on debian linux

PostPosted: Thu Jul 02, 2015 20:47
by TuxerP
I have updated my hardware and are now running stampy's subgame and world. What a beautifull world!!!
Morn76 do you have some tips for me to improve performance? Minetest.conf settings for example.

Re: Public Minetest server on debian linux

PostPosted: Fri Jul 03, 2015 10:48
by Morn76
TuxerP wrote:I have updated my hardware and are now running stampy's subgame and world. What a beautifull world!!!
Morn76 do you have some tips for me to improve performance? Minetest.conf settings for example.

Do you mean server or client performance? I think you can find advice for both on these forums somewhere.

For the server, I would recommend migrating the world to LevelDB or even Redis.

For clients, play around with minimum viewing range.

You could also try to disable some mods (primarily Mesecons) to improve performance. Of course you will see a few missing blocks here and there, but the Stampy world uses Mesecons pretty sparingly (mainly pressure plates and a few pistons here and there).

Re: Public Minetest server on debian linux

PostPosted: Sat Jul 04, 2015 09:30
by Morn76
You could also improve server performance by lowering mob spawn rates, especially peaceful mobs like sheep. There is no global setting for this at the moment, it's a bit tricky. Basically the simple_mobs spawn function looks like

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
function mobs:register_spawn(name, nodes, max_light, min_light, chance, active_object_count, max_height, spawn_func)

So if you increase chance and/or lower active_object_count, you get fewer mobs spawning.

E.g. in mobs/init.lua, you could change

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
mobs:register_spawn("mobs:sheep", {"default:dirt_with_grass"}, 20, 12, 5000, 8, 31000)

to

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
mobs:register_spawn("mobs:sheep", {"default:dirt_with_grass"}, 20, 12, 50000, 4, 31000)

and similarly for other animals.