How to create a server on Debian

Post Reply
Googler
Member
Posts: 10
Joined: Thu Mar 31, 2016 08:52
In-game: Googler

How to create a server on Debian

by Googler » Post

Sorry. Not sure where to post this topic. Bugs and Problems do not see fit too. Feel free to move it to a more appropriate forum.

I have a Debian VPS server. I followed this http://wiki.minetest.net/Setting_up_a_server/Debian but the explanation is hard to understand.

Below is what I used.

Code: Select all

*Logged in as root
apt-get update
apt-get upgrade
apt-get install minetest-server
adduser minetest

* Logged in as minetest
minetestserver --info
And it output something similar to this ...

Code: Select all

INFO[main]: Server: Loading environment metadata
INFO[main]: Server: Loading players
INFO[main]: Starting server on port 30000...
ACTION[main]:         .__               __                   __   
ACTION[main]:   _____ |__| ____   _____/  |_  ____   _______/  |_ 
ACTION[main]:  /     \|  |/    \_/ __ \   __\/ __ \ /  ___/\   __\
ACTION[main]: |  Y Y  \  |   |  \  ___/|  | \  ___/ \___ \  |  |  
ACTION[main]: |__|_|  /__|___|  /\___  >__|  \___  >____  > |__|  
ACTION[main]:       \/        \/     \/          \/     \/        
ACTION[main]: World at [/home/minetest/.minetest/worlds/world]
ACTION[main]: Server for gameid="minetest" listening on port 0.0.0.0:30000.
INFO[ServerThread]: Server creating detached inventory "creative"
INFO[ServerThread]: ServerMap: SQLite3 database opened
From the tutorial/wiki, I do not which steps to follow after that.

Pointing me to a good direction will be appreciate. Thanks.
Last edited by Googler on Sat Jun 18, 2016 04:41, edited 1 time in total.

User avatar
linushsao
Member
Posts: 418
Joined: Mon Jan 27, 2014 12:56
IRC: linushsao
In-game: linus
Location: Taipei,Taiwan(R.O.C)
Contact:

Re: How to create a server on Debean

by linushsao » Post

my server is based on DEBIAN,hosted on digitalocean.

you post seems like that:

1.it work,port is 30000,it may work when you connect from internet.
2.your world folder is /home/minetest/.minetest/worlds/world
3.your game is the basic config ->minetest

anything else you try to figure out?

here following is my server's info:

2016-06-18 11:12:28: ACTION[Main]: .__ __ __
2016-06-18 11:12:28: ACTION[Main]: _____ |__| ____ _____/ |_ ____ _______/ |_
2016-06-18 11:12:28: ACTION[Main]: / \| |/ \_/ __ \ __\/ __ \ / ___/\ __\
2016-06-18 11:12:28: ACTION[Main]: | Y Y \ | | \ ___/| | \ ___/ \___ \ | |
2016-06-18 11:12:28: ACTION[Main]: |__|_| /__|___| /\___ >__| \___ >____ > |__|
2016-06-18 11:12:28: ACTION[Main]: \/ \/ \/ \/ \/
2016-06-18 11:12:28: ACTION[Main]: World at [/home/linus/.minetest/worlds/marsu]
2016-06-18 11:12:28: ACTION[Main]: Server for gameid="marsu" listening on 0.0.0.0:30016.

Googler
Member
Posts: 10
Joined: Thu Mar 31, 2016 08:52
In-game: Googler

Re: How to create a server on Debean

by Googler » Post

linushsao wrote:my server is based on DEBIAN,hosted on digitalocean.

you post seems like that:

1.it work,port is 30000,it may work when you connect from internet.
2.your world folder is /home/minetest/.minetest/worlds/world
3.your game is the basic config ->minetest

anything else you try to figure out?

here following is my server's info:

2016-06-18 11:12:28: ACTION[Main]: .__ __ __
2016-06-18 11:12:28: ACTION[Main]: _____ |__| ____ _____/ |_ ____ _______/ |_
2016-06-18 11:12:28: ACTION[Main]: / \| |/ \_/ __ \ __\/ __ \ / ___/\ __\
2016-06-18 11:12:28: ACTION[Main]: | Y Y \ | | \ ___/| | \ ___/ \___ \ | |
2016-06-18 11:12:28: ACTION[Main]: |__|_| /__|___| /\___ >__| \___ >____ > |__|
2016-06-18 11:12:28: ACTION[Main]: \/ \/ \/ \/ \/
2016-06-18 11:12:28: ACTION[Main]: World at [/home/linus/.minetest/worlds/marsu]
2016-06-18 11:12:28: ACTION[Main]: Server for gameid="marsu" listening on 0.0.0.0:30016.
Sorry for the wrong spelling. Anyway, thank you for your fast and helpful reply. I understand part one and two but not three. Can you explain no 3? I can't figure out where to edit the minetest.conf file and server properties (name, maximum slots etc). Once again, thank you.

User avatar
linushsao
Member
Posts: 418
Joined: Mon Jan 27, 2014 12:56
IRC: linushsao
In-game: linus
Location: Taipei,Taiwan(R.O.C)
Contact:

Re: How to create a server on Debean

by linushsao » Post

Googler wrote: Sorry for the wrong spelling. Anyway, thank you for your fast and helpful reply. I understand part one and two but not three. Can you explain no 3? I can't figure out where to edit the minetest.conf file and server properties (name, maximum slots etc). Once again, thank you.
first,sorry for my bad english. hope i could give you a help.if you simply run the command "minetestserver" in terminal, you will receive the info like that:

Code: Select all

[linus@archlinux script]$ minetestserver 
Multiple worlds are available.
Please select one using --worldname <name> or --world <path>
  iieiuiei       '/home/linus/.minetest/worlds/iieiuiei'
  marsu          '/home/linus/.minetest/worlds/marsu'
  new            '/home/linus/.minetest/worlds/new'

2016-06-18 17:49:38: ERROR[main]: No world path specified or found.
we could see i have three world's data:iieiuiei /marsu/new .the folder "/home/linus/.minetest/worlds/marsu" is my MARSSurvival Game SERVER's world-folder.it's online.it's info could be found in forum's "subgame->WIPgame" board.

the most simply way to setup a server is told minetestserver where the world-folder is,like that:

Code: Select all

[linus@archlinux script]$ minetestserver --worldname new
Using world specified by --worldname on the command line
2016-06-18 17:55:27: ACTION[main]:         .__               __                   __   
2016-06-18 17:55:27: ACTION[main]:   _____ |__| ____   _____/  |_  ____   _______/  |_ 
2016-06-18 17:55:27: ACTION[main]:  /     \|  |/    \_/ __ \   __\/ __ \ /  ___/\   __\
2016-06-18 17:55:27: ACTION[main]: |  Y Y  \  |   |  \  ___/|  | \  ___/ \___ \  |  |  
2016-06-18 17:55:27: ACTION[main]: |__|_|  /__|___|  /\___  >__|  \___  >____  > |__|  
2016-06-18 17:55:27: ACTION[main]:       \/        \/     \/          \/     \/        
2016-06-18 17:55:27: ACTION[main]: World at [/home/linus/.minetest/worlds/new]
2016-06-18 17:55:27: ACTION[main]: Server for gameid="minetest" listening on 0.0.0.0:30021.
you could saw tha last line "Server for gameid="minetest" listening on 0.0.0.0:30021." is different from your.because my minetest.conf is different from you.the default path of minetest.conf is $HOME/.minetest

if you have try "minetestserver --worldname new","new" could be replace of any,you may got error msg,because in you world-folder($HOME/.minetst/worlds) has no world's data.i used to create a empty world by minetest's GUI(page "SERVER").minetest will create world's basic files like that:

Code: Select all

[linus@archlinux new]$ ls
env_meta.txt      ipban.txt     map.sqlite  world.mt
force_loaded.txt  map_meta.txt  players
the file "world.mt" is the world-data's basic object.it will told minetestserver the two important info:

Code: Select all

gameid = minetest
backend = sqlite3
gameid = minetest ,it means minetestserver is running the game"minetest".without download other game(like my marssurvuval game),your basic game is "minetest".

backend = sqlite3,it means the database-system's type is sqlite3

the other file will be automatic created by minetestserver.

till now,hope you understand the info i said.

Googler
Member
Posts: 10
Joined: Thu Mar 31, 2016 08:52
In-game: Googler

Re: How to create a server on Debian

by Googler » Post

Hmm.Thank you linushsao. I think I understand part of it. I am now able to set-up the server and connect to the server via IP. I wonder how do I make my server appear at http://www.minetest.net/servers/. To add on, where can I edit my server settings such as name and maximum players? Additionally, I notice that my server went offline whenever I close Putty, how do I make my server 24/7?

User avatar
AccidentallyRhine
Member
Posts: 252
Joined: Sun Aug 02, 2015 05:43

Re: How to create a server on Debian

by AccidentallyRhine » Post

Hello, Googler since you are using Debian (I assume Jessie) please use the systemd service which should have been automatically created if you installed from the repo. That is:

Code: Select all

systemctl start minetest-server
This should allow your server to continue running after closing the terminal session.

And to have your server appear in the servers list, edit your minetest.conf file. Specifically this part should be changed to "true":

Code: Select all

#    Automaticaly report to the serverlist.
#    type: bool
# server_announce = false
If you don't know where your minetest.conf file is run the command:

Code: Select all

locate minetest.conf
it should be within your server installation directory.

Googler
Member
Posts: 10
Joined: Thu Mar 31, 2016 08:52
In-game: Googler

Re: How to create a server on Debian

by Googler » Post

AnxiousInfusion wrote:Hello, Googler since you are using Debian (I assume Jessie) please use the systemd service which should have been automatically created if you installed from the repo. That is:

Code: Select all

systemctl start minetest-server
This should allow your server to continue running after closing the terminal session.

And to have your server appear in the servers list, edit your minetest.conf file. Specifically this part should be changed to "true":

Code: Select all

#    Automaticaly report to the serverlist.
#    type: bool
# server_announce = false
If you don't know where your minetest.conf file is run the command:

Code: Select all

locate minetest.conf
it should be within your server installation directory.
Thank you for the explaination. I am going to test it out soon and will let you know the result. :).

User avatar
linushsao
Member
Posts: 418
Joined: Mon Jan 27, 2014 12:56
IRC: linushsao
In-game: linus
Location: Taipei,Taiwan(R.O.C)
Contact:

Re: How to create a server on Debian

by linushsao » Post

Googler wrote:Hmm.Thank you linushsao. I think I understand part of it. I am now able to set-up the server and connect to the server via IP. I wonder how do I make my server appear at http://www.minetest.net/servers/. To add on, where can I edit my server settings such as name and maximum players? Additionally, I notice that my server went offline whenever I close Putty, how do I make my server 24/7?
1. to make your server announce to http://www.minetest.net/servers/

the answer is at bottom of http://www.minetest.net/servers/

Code: Select all

server_announce = true
server_name = My server
server_description = A server that I made.
server_url = <URL to server webpage or forum topic>
add those code in yout minetest.conf with some tweak,for example,my marsu game's announce setting in minetest.conf is

Code: Select all

server_announce = true
server_name = LinusHSAO's UNOFFICE MarsSurvive Server
server_description = A hard core Survival game
server_url = https://goo.gl/rTGYa5
if you're successful,you will see the info at bottom when minetestserver is starting...

Code: Select all

  __   
2016-06-26 23:13:35: ACTION[Main]:   _____ |__| ____   _____/  |_  ____   _______/  |_ 
2016-06-26 23:13:35: ACTION[Main]:  /     \|  |/    \_/ __ \   __\/ __ \ /  ___/\   __\
2016-06-26 23:13:35: ACTION[Main]: |  Y Y  \  |   |  \  ___/|  | \  ___/ \___ \  |  |  
2016-06-26 23:13:35: ACTION[Main]: |__|_|  /__|___|  /\___  >__|  \___  >____  > |__|  
2016-06-26 23:13:35: ACTION[Main]:       \/        \/     \/          \/     \/        
2016-06-26 23:13:35: ACTION[Main]: World at [/home/linus/.minetest/worlds/marsu]
2016-06-26 23:13:35: ACTION[Main]: Server for gameid="marsu" listening on 0.0.0.0:30016.
2016-06-26 23:13:35: WARNING[Server]: Undeclared global variable "unified_inventory" accessed at ...u/mods/technic/technic/machines/register/recipes.lua:54
2016-06-26 23:13:35: ACTION[Server]: Announcing to servers.minetest.net

notic that info,it means your minetestserver is announcing

Code: Select all

2016-06-26 23:13:35: ACTION[Server]: Announcing to servers.minetest.net
2. keep your server online all day.

in my server it'll not offline when i close putty,have you ever add "&" in the end of luanching command?

but it's ok. install "screen" in your debian server(apt-get install screen).if you are very sure your luanch-script is ok, you could do like this:

Code: Select all

screen -t PAGE_NAME -d -m YOUR_SERVER_LUANCHING_SCRIPT


screen will keep your scipt running,or you could first run screen,than run your luanch-script in screen.

no matter you close your terminal like putty,your luanch-script will keep running in screen.

pls man screen or google screen,you will find many useful info.

alif
New member
Posts: 5
Joined: Mon May 08, 2023 11:42

Re: How to create a server on Debian

by alif » Post

AccidentallyRhine wrote: โ†‘
Tue Jun 21, 2016 05:41
Hello, Googler since you are using Debian (I assume Jessie) please use the systemd service which should have been automatically created if you installed from the repo. That is:

Code: Select all

systemctl start minetest-server
This should allow your server to continue running after closing the terminal session.
On my Ubuntu system, which is very similar to Debian, attempting to start the service via systemctl fails because "No world path specified or found", which seems logical since the ExecStart directive doesn't specify any:

Code: Select all

ExecStart=/usr/lib/minetest/minetestserver --config /etc/minetest/minetest.conf --logfile /var/log/minetest/minetest.log
I can of course modify that line, but I was wondering if there's a way to specify the world via minetest's own configuration files, and leave the systemd unit alone?

User avatar
Komodo
Member
Posts: 163
Joined: Tue Jan 11, 2022 13:33
GitHub: MeseCraft
In-game: Komodo
Location: God Bless America
Contact:

Re: How to create a server on Debian

by Komodo » Post

I used to run that package too. But debian Minetest server is very out of date, it was too out of date for MeseCraft and a lot of players on current clients. I can share my walk through steps on compiling and setting up a service if you are interested. Just reply to this comment and I can post it tomorrow when I have more time.
๐ŸŒŽ Website | ๐ŸŒฒ MeseCraft Game | ๐Ÿ“ฐ News | ๐Ÿ–Œ๏ธ ContentDB

Theremin
New member
Posts: 2
Joined: Wed May 03, 2023 21:06

Re: How to create a server on Debian

by Theremin » Post

Komodo wrote: โ†‘
Wed May 10, 2023 01:29
I used to run that package too. But debian Minetest server is very out of date, it was too out of date for MeseCraft and a lot of players on current clients. I can share my walk through steps on compiling and setting up a service if you are interested. Just reply to this comment and I can post it tomorrow when I have more time.
Komodo if you have the time to do such a thing I would be grateful! I also believe it would be of great help for anyone else going down this road to know what awaits them ^ ^

(I have been battling with the Debian Minetest package in my lab for the better part of a week.. )

User avatar
Komodo
Member
Posts: 163
Joined: Tue Jan 11, 2022 13:33
GitHub: MeseCraft
In-game: Komodo
Location: God Bless America
Contact:

Re: How to create a server on Debian

by Komodo » Post

I moved my guide on how to setup a Minetest/MeseCraft server on Debian/Ubuntu to here:

https://www.mesecraft.com/host/
Last edited by Komodo on Thu Jul 06, 2023 18:55, edited 1 time in total.
๐ŸŒŽ Website | ๐ŸŒฒ MeseCraft Game | ๐Ÿ“ฐ News | ๐Ÿ–Œ๏ธ ContentDB

User avatar
Komodo
Member
Posts: 163
Joined: Tue Jan 11, 2022 13:33
GitHub: MeseCraft
In-game: Komodo
Location: God Bless America
Contact:

Re: How to create a server on Debian

by Komodo » Post

did that work?
๐ŸŒŽ Website | ๐ŸŒฒ MeseCraft Game | ๐Ÿ“ฐ News | ๐Ÿ–Œ๏ธ ContentDB

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests