How to create a server on Debian

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

How to create a server on Debian

by Googler » Sat Jun 18, 2016 02:17

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.

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
*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 ...

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
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: 331
Joined: Mon Jan 27, 2014 12:56
IRC: linushsao
In-game: linus

Re: How to create a server on Debean

by linushsao » Sat Jun 18, 2016 03:10

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 » Sat Jun 18, 2016 04:41

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: 331
Joined: Mon Jan 27, 2014 12:56
IRC: linushsao
In-game: linus

Re: How to create a server on Debean

by linushsao » Sat Jun 18, 2016 10:16

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:

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
[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:
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
[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:
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
[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:
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
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 » Mon Jun 20, 2016 04:51

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
AnxiousInfusion
Member
 
Posts: 146
Joined: Sun Aug 02, 2015 05:43
GitHub: AnxiousInfusion[GitLab]
IRC: AnxiousInfusion
In-game: AnxiousInfusion

Re: How to create a server on Debian

by AnxiousInfusion » 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:
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
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":
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
#    Automaticaly report to the serverlist.
#    type: bool
# server_announce = false


If you don't know where your minetest.conf file is run the command:
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
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 » Fri Jun 24, 2016 06:17

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:
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
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":
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
#    Automaticaly report to the serverlist.
#    type: bool
# server_announce = false


If you don't know where your minetest.conf file is run the command:
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
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: 331
Joined: Mon Jan 27, 2014 12:56
IRC: linushsao
In-game: linus

Re: How to create a server on Debian

by linushsao » Sun Jun 26, 2016 15:30

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/
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
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

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
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...
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
  __   
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
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
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:
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
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.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 1 guest

cron