[Guide] Create and maintain a server on Windows

User avatar
CraigyDavi
Member
 
Posts: 575
Joined: Sat Aug 10, 2013 13:08
Location: Hampshire, UK
GitHub: davisonio
IRC: davisonio or CraigyDavi
In-game: davisonio or CraigyDavi

[Guide] Create and maintain a server on Windows

by CraigyDavi » Sat Mar 29, 2014 12:06

I have decided to make my own guide about how to create a Minetest server. This guide will not only tell you how to create a server but also how to maintain the server so that it is actually playable. Yes I do know there are a few guides already, but some of them are outdated and in not enough detail. This guide will be based on running it on windows, if you use Linux it is slightly different.

CREATING A SERVER


Step 1 – What you need to run the server:
  • To run the server there are a few things you will need.
  • A computer which is powerful enough to run the server
  • A router with port forwarding capabilities (most routers have this)
  • Reliable internet connection
  • Recent minetest installation which is functioning properly
  • Single-Player world which is to be used for the server
Also you need to think about: Do I have the time to run the server? Do I have enough technical knowledge? Do I have enough knowledge about minetest? If you answered no to the question/questions then you might want to reconsider your ideas on running a server.

Step 2 – Forwarding the ports:
Forwarding the ports is necessary; it allows people from all corners of the globe to access the server. Most people trip up at this point in creating a server but it is actually very simple. These steps do vary, depending on the brand of router you use.

Firstly, You need to find out your default gateway and access your router settings.
  • Open up command prompt and type ipconfig /all
  • Find where it says Default Gateway
    Image
  • Open up your browser and go to http://yourdefaultgateway (obviously replace mydefaultgateway with your actual default gatway).
  • You will now be at your router settings. This is what mine looks like:
    Image
    Now you need to do the port forwarding.
  • Get to the settings. The port forwarding settings may be in the advanced settings.
  • If you are prompted for passwords try using “admin” or “password”. My password was on the back of the router.
    Image
  • You need to get to the port forwarding settings. They may be under the firewall settings. It may also be called “Forward a new game/application.
  • Make sure you use UDP and port 30000 (thirty thousand) The port used in the port range should translate to the same ports. Click apply.
    Image
  • You also need to make sure that you assign the port range to point to the right device (your computer hosting the server). This may be on a different settings page or it may be on the same settings page.
    Image
The port forwarding is done. Make sure all the settings have been set. It may take a few minutes for the ports to be forwarded and it may require a restart of the computer.

Step 3 – Editing the server settings:
In order to customise the server you need to change the settings. Just copy these settings into your minetest.config file and set them to what you like.

Do you want the server will appear on the public server list at servers.minetest.net.
Code: Select all
server_announce = true

What do you want the name of the server to be?
Code: Select all
server_name = Minetest Server

The address of the server. You can leave this blank unless you are using a sub-domain or a domain.
Code: Select all
server_address =

The port which the server will listen on. This will be the same port you forwarded.
Code: Select all
port = 30000

If you have a webpage or forum thread, you can put the link here.
Code: Select all
server_url = http://minetest.net

A short description of the server.
Code: Select all
server_description = Join this amazing server!

Message of the day. Shown in the chat when someone joins.
Code: Select all
motd = Welcome to this amazing minetest server!

Do you want to disable PvP? By default, PvP is enabled, which means players can hurt and kill each other using melee weapons.
Code: Select all
enable_pvp = false

Do you want people to die or be immortal?
Code: Select all
enable_damage = true

If set to true players will have an infinite amount of items (creative mode).
Code: Select all
creative_mode = false

Maximum amount of users who can join the server at a time. Adjust depending on your bandwidth, CPU and RAM available.
Code: Select all
max_users = 15

Enable rollback functions (can slow down the server):
Code: Select all
enable_rollback_recording = true

Map generation stuff:
Code: Select all
mg_flags = trees, caves, v6_biome_blend, v6_jungles, dungeons

Stop players from connecting with an empty password.
Code: Select all
disallow_empty_password = true

Where new players will spawn and where players will re-spawn after death. If no static spawn point is set, then players will have a slightly randomized spawn location.
Code: Select all
static_spawnpoint = 0, 16, 0


Step 4 – Creating the server launcher:
The server launcher will start the server window and enable people to join the world it will also put the server on the public server list if you have enabled it in the settings.

  • Go to the bin folder in your minetest directory
  • Rightclick on the minetest application and select Create Shortcut
Image
  • Then rightclick on the shortcut and select Properties
Image
  • Put quotes around what there is already in the target box. It should look something like this:
Code: Select all
"C:\Users\YourName\Documents\minetest-0.4.9\bin\minetest.exe"

  • Then add this at the end of the target box (make sure that the name of the world does not contain spaces or symbols):
Code: Select all
--server --worldname TheWorldName

  • It should now look like this:
Code: Select all
"C:\Users\YourName\Documents\minetest-0.4.9\bin\minetest.exe" --server --worldname TheWorldName

  • Click apply and ok.

Step 5 – Starting the server and joining it:
This step tells you how to start the server and then how to join the server afterwards.
Starting the server
  • To start the server all you need to do is click the server launcher you created in the last step. If you have installed minetest in the program files (or any other protected folder) you need to rightclick on the laucher and select Run as Administrator. It should open a window which looks something like this:
    Image
    Joining the server
  • If you have the server window open you should be able to join it easily. Open up the game.
  • You should be able to connect using your external IP. You can find out your external IP by going to http://www.whatsmyip.us. Connect using the port you port forwarded (30000).
    Image
  • If that does not work then you can try connecting using 127.0.0.1. This will tell minetest to connect to a server on your computer. Connect using the port you port forwarded (30000).
    Image
  • You should be able to join the game and so should other people. Enjoy your minetest server!
Image

MAINTAINING A SERVER


Here are a few tips in order to keep your server in a good state. If you have any more tips then suggest them and I can put them here.

Protect areas:
It is always good to install a protection mod, this means people can protect areas they do not want others to ruin. One of the best mods which you can use for this is ShadowNinja’s areas mod. It prevents grefing and stops people from destroying buildings on the server, if you protect the area beforehand.

Remove interact as a default privilege:
Interact privilege lets players dig and place blocks. By default players get it as soon as they join. It is a good idea to disallow players from being able to dig and place blocks as soon as they join or else they can easily destroy blocks without asking a moderator for the privilege.
Make sure this is in minetest.config. They get no interact priv when they join, just shout.
default_privs = shout
You can grant individual players interact using /grant playername interact.

Keeping a server up 24/7:
Minetest servers crash quite frequently so if you want to keep it up 24/7 you will need so way of restarting the minetest server when it crashes. A good application for windows is [url=RestartOnCrash]http://w-shadow.com/blog/2009/03/04/restart-on-crash[/url] Also if you are running a 24/7 server it would be best if you turned off every visual style thing like Aero and screen-savers.

Antivirus Scans:
If you are using antivirus on your computer make sure you exclude the world folder used by the server. Sometimes antivirus scans can corrupt sqlite3 maps.

RUNNING A SERVER – FREQUENTLY ASKED QUESTIONS


+ I have followed the steps and it does not work. Why?


+ When I click the server launcher it immediately closes. Why?


That’s it! I hope you found this guide useful. If I have made any mistakes please tell me.

Information up to date with version 0.4.9
Last edited by CraigyDavi on Tue Apr 22, 2014 16:29, edited 2 times in total.
 

User avatar
Krock
Developer
 
Posts: 3737
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

by Krock » Sat Mar 29, 2014 13:11

Thanks for this guide! This will help alot windows users.

A little addition:
If the Minetest folder is contain in the Program Files (or any other protected folder), then right click on the shortcut and select "Run as Administrator".

System scans by the antivirus can currupt sqlite3 maps, therefore add a scanning-exception for the location, where the world is stored.

If you decide to use the computer as 24/7 server, then make sure, you turned off every visual style thing like Aero and screensavers. Please look at the Watt-consuming of the computer!
Last edited by Krock on Sat Mar 29, 2014 13:15, edited 1 time in total.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
CraigyDavi
Member
 
Posts: 575
Joined: Sat Aug 10, 2013 13:08
Location: Hampshire, UK
GitHub: davisonio
IRC: davisonio or CraigyDavi
In-game: davisonio or CraigyDavi

by CraigyDavi » Sat Mar 29, 2014 14:11

Krock wrote:Thanks for this guide! This will help alot windows users.

A little addition:
If the Minetest folder is contain in the Program Files (or any other protected folder), then right click on the shortcut and select "Run as Administrator".

System scans by the antivirus can currupt sqlite3 maps, therefore add a scanning-exception for the location, where the world is stored.

If you decide to use the computer as 24/7 server, then make sure, you turned off every visual style thing like Aero and screensavers. Please look at the Watt-consuming of the computer!


Thanks, I have added your extra information.
 

User avatar
Bob Hovercraft
Member
 
Posts: 15
Joined: Mon Mar 10, 2014 11:57
Location: Yorkshire, United Kingdom
In-game: Bob_Hovercraft

by Bob Hovercraft » Mon Mar 31, 2014 11:18

Hi Craig,

Great guide, thanks for sharing - I'm staying on your server though! No plans to start up my own so I hope I never need the guide :o)
 

User avatar
CraigyDavi
Member
 
Posts: 575
Joined: Sat Aug 10, 2013 13:08
Location: Hampshire, UK
GitHub: davisonio
IRC: davisonio or CraigyDavi
In-game: davisonio or CraigyDavi

by CraigyDavi » Mon Mar 31, 2014 14:01

Bob Hovercraft wrote:I'm staying on your server though!

Good to hear :D
 

User avatar
kaeza
Moderator
 
Posts: 2156
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Mon Mar 31, 2014 14:58

Krock wrote:If the Minetest folder is contain in the Program Files (or any other protected folder), then right click on the shortcut and select "Run as Administrator".

You should never use that option when running Internet-facing applications (like Minetest), or in general, don't use that option unless STRICTLY required (for any program).

I recommend moving Minetest out of "Program Files" into "My Documents" or "Desktop" and running from there.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
ZachyGames
Member
 
Posts: 144
Joined: Sat Mar 22, 2014 12:14
Location: Youtube

by ZachyGames » Tue Apr 01, 2014 01:07

My Question: I cant load mydefaultgateway site it says google chrome cant find mydefaultgateway PLEASE HELP!
 

User avatar
Enke
Member
 
Posts: 469
Joined: Fri Nov 15, 2013 02:56
Location: The internet
GitHub: NANOsoldierEnke
IRC: Enke
In-game: Enke

by Enke » Tue Apr 01, 2014 02:44

First off, CraigyDavi, Excellent Guide for those of us on Windows. Nice Screenies, good formatting, excellent excellent excellent. This thread should be stickied next to Menche's thread.


ZachyGames wrote:My Question: I cant load mydefaultgateway site it says google chrome cant find mydefaultgateway PLEASE HELP!

mydefaultgateway is not a website, CraigyDavi was using it as an example.

Assuming you are on windows:
1: Open the command line
2: type: "ipconfig" in the command line (no quotes)
3: search the output until you find a line that says "default gateway"
4: Look at the numbers on that line, something like: "192.168.1.1". Note the numbers that you have, I'll refer to it as the "ip"
5: Go into Google Chrome. In the search box type: "http://<ip>", where "ip" is the numbers on the "default gateway" line
Last edited by Enke on Tue Apr 01, 2014 02:47, edited 1 time in total.
Lush8
ExtraVars for Red Eclipse

<Anarchid> my turn was still the most awesome, yielding all the cripples, two captured paranormals, and death rate of about 30%
<ORCACommander> Anarchid: you need to work harder
<ORCACommander> I am hereby putting you under review until you can increase the casualty rate
 

User avatar
CraigyDavi
Member
 
Posts: 575
Joined: Sat Aug 10, 2013 13:08
Location: Hampshire, UK
GitHub: davisonio
IRC: davisonio or CraigyDavi
In-game: davisonio or CraigyDavi

by CraigyDavi » Tue Apr 01, 2014 06:48

Enke wrote:First off, CraigyDavi, Excellent Guide for those of us on Windows. Nice Screenies, good formatting, excellent excellent excellent. This thread should be stickied next to Menche's thread.

Thank you! And thanks to whoever stickied it :)

ZachyGames wrote:My Question: I cant load mydefaultgateway site it says google chrome cant find mydefaultgateway PLEASE HELP!

You replace mydefaultgateway with your actual default gateway which you find out in the previous step.
 

User avatar
PilzAdam
Developer
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
Location: Germany
GitHub: PilzAdam
IRC: PilzAdam
 

twoelk
Member
 
Posts: 1134
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany

by twoelk » Tue Apr 01, 2014 12:57

PilzAdam wrote:.eltit eht ot ']swodniW[' dda dluohs uoY



Indeed I wonder how many minetest servers on windows are out there.

Actually some information on how many Mintest servers are on wich OS might be interesting and might give clues to platform related performance issues.
 

User avatar
CraigyDavi
Member
 
Posts: 575
Joined: Sat Aug 10, 2013 13:08
Location: Hampshire, UK
GitHub: davisonio
IRC: davisonio or CraigyDavi
In-game: davisonio or CraigyDavi

by CraigyDavi » Tue Apr 01, 2014 14:02

PilzAdam wrote:.eltit eht ot ']swodniW[' dda dluohs uoY


Done
 

User avatar
ZachyGames
Member
 
Posts: 144
Joined: Sat Mar 22, 2014 12:14
Location: Youtube

by ZachyGames » Fri Apr 04, 2014 08:29

Can "You" Help me here

Image


BTW WHO NOTICED A ORE IN THE PICTURE IN THE JOINING THE SERVER (Not Coal)
Last edited by ZachyGames on Fri Apr 04, 2014 08:33, edited 1 time in total.
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33
Location: world

by hoodedice » Fri Apr 04, 2014 09:09

You're nearly done there.

Click the Start button. Type 'Run' without quotes in the search box and open Run. Type 'ncpa.cpl' without quotes, and press Enter. Right click your current, working internet connection and click Status. I'm on Windows 8.1, so you would need to look around for the 'IPv4 Address', or something that looks like 192.168.x.xxx . This should be different from what you typed in the browser to open that page you're currently on.

OR

Do the first step in this tutorial. Check the ipv4 address as given out by the command prompt.


Just copy-paste the IPv4 address into the IP Address field in that page you took a screenshot of. The protocol is UDP, and the port is 30000
Last edited by hoodedice on Fri Apr 04, 2014 09:12, edited 1 time in total.
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
 

User avatar
ZachyGames
Member
 
Posts: 144
Joined: Sat Mar 22, 2014 12:14
Location: Youtube

by ZachyGames » Fri Apr 04, 2014 09:45

How to open minetest.config it says windows dont know what program to open it
 

User avatar
Krock
Developer
 
Posts: 3737
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

by Krock » Fri Apr 04, 2014 11:15

ZachyGames wrote:How to open minetest.config it says windows dont know what program to open it

notepad.exe
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
kaeza
Moderator
 
Posts: 2156
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Fri Apr 04, 2014 11:16

ZachyGames wrote:How to open minetest.config it says windows dont know what program to open it

Open it in Notepad manually.

Alternatively, select "Choose program from a list" (or something like that) when prompted, check "Always use this program to open this kind of file", then click OK. From now on, all .conf files will be opened in Notepad.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
CraigyDavi
Member
 
Posts: 575
Joined: Sat Aug 10, 2013 13:08
Location: Hampshire, UK
GitHub: davisonio
IRC: davisonio or CraigyDavi
In-game: davisonio or CraigyDavi

by CraigyDavi » Fri Apr 04, 2014 14:08

ZachyGames wrote:How to open minetest.config it says windows dont know what program to open it

I would recommend using wordpad instead of notepad. It's preinstalled on windows.
 

User avatar
ZachyGames
Member
 
Posts: 144
Joined: Sat Mar 22, 2014 12:14
Location: Youtube

by ZachyGames » Sat Apr 05, 2014 04:41

CraigyDavi wrote:
ZachyGames wrote:How to open minetest.config it says windows dont know what program to open it

I would recommend using wordpad instead of notepad. It's preinstalled on windows.


Thank you your the best
 

User avatar
ZachyGames
Member
 
Posts: 144
Joined: Sat Mar 22, 2014 12:14
Location: Youtube
 

User avatar
Krock
Developer
 
Posts: 3737
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

by Krock » Sat Apr 05, 2014 07:34

ZachyGames wrote:help again!?

http://imgur.com/5ha8VzN.jpg

Dude, I see the location of your minetest.exe already in the picture, look at the field above "Shotcut Key:".
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
TG-MyinaWD
Member
 
Posts: 356
Joined: Thu May 08, 2014 21:22
Location: Far Eden
GitHub: Maddie-Myina
IRC: Maddie-Myina
In-game: .

Re: Guide: How to create and maintain a server - Windows

by TG-MyinaWD » Wed Jun 04, 2014 18:23

Do everyone have 192. as there Default Gateway?
But can someone play with me having my default port?
Since I think my Default is 49301 or 53081.
Since really all I like do is play with a Family Member. so should I just use my Gateway and Whatever My Port should be for them join?
I'm a Transgender no shame about it.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.
 

User avatar
Krock
Developer
 
Posts: 3737
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: Guide: How to create and maintain a server - Windows

by Krock » Thu Jun 05, 2014 14:59

Alt. Tester wrote:Do everyone have 192. as there Default Gateway?
But can someone play with me having my default port?
Since I think my Default is 49301 or 53081.
Since really all I like do is play with a Family Member. so should I just use my Gateway and Whatever My Port should be for them join?

192.168.*.* is a common router network address, which is only accessable fromt he people which are in the same network.

If your family member is in the same network, means: using same router, then you only need to use the "Server" tab in the main menu. Start a world and it'll be playable at the given port within your network.
For this case: No portforward needed.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
TheCrafter
Member
 
Posts: 17
Joined: Thu Jul 10, 2014 15:26
In-game: TheCrafter

Re: Guide: How to create and maintain a server - Windows

by TheCrafter » Thu Jul 10, 2014 17:56

Hi I have this very little problemo. The thing is that my connection always time's out. Why?
Coming SOON.
 

User avatar
Krock
Developer
 
Posts: 3737
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: Guide: How to create and maintain a server - Windows

by Krock » Thu Jul 10, 2014 19:14

TheCrafter wrote:Hi I have this very little problemo. The thing is that my connection always time's out. Why?

Are there any special mods enabled?
Could you post the last 20 lines of debug.txt of your server and client?
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

Next

Return to Servers



Who is online

Users browsing this forum: Enrikoo, Yahoo [Bot] and 8 guests