Difference between revisions of "Setting up a server"
Jump to navigation
Jump to search
(Add autostarter.bad) |
m (Copy editing) |
||
Line 4: | Line 4: | ||
#*'''Note''': It is recommended to leave the port at the default (30000) | #*'''Note''': It is recommended to leave the port at the default (30000) | ||
#Find out your internal IP of the computer you are running the server on | #Find out your internal IP of the computer you are running the server on | ||
− | #*'''Linux''': open a terminal and type | + | #*'''Linux''': open a terminal and type <code>ifconfig</code> and hit enter |
− | #*'''Windows''': Start> | + | #*'''Windows''': Start → Run … → <code>cmd.exe</code> → <code>ipconfig</code> |
#Check the port forwarding settings on your router | #Check the port forwarding settings on your router | ||
#*forward your chosen port for both TCP and UDP (30000 if you left it default) to the internal IP | #*forward your chosen port for both TCP and UDP (30000 if you left it default) to the internal IP | ||
Line 11: | Line 11: | ||
#To see how to '''run''' a server, please read the section below | #To see how to '''run''' a server, please read the section below | ||
#Let your friends know your external IP | #Let your friends know your external IP | ||
− | #Add | + | #Add <code>server_announce = 1</code> to your minetest.config to announce it to a public server list. |
== Running a Server == | == Running a Server == | ||
Line 18: | Line 18: | ||
#Open a terminal. | #Open a terminal. | ||
− | #Type in | + | #Type in <code>YOUR/MINETEST/DIRECTORY/bin/minetestserver</code> or just drop the minetestserver executable (located in <code>/Minetest/bin/</code>) into the terminal '''(PLEASE READ THE NOTES BELOW!)''' |
− | #*If you want to specify a specific game ID, the game ID choices are located in /Minetest/games/. Add in | + | #*If you want to specify a specific game ID, the game ID choices are located in <code>/Minetest/games/</code>. Add in <code>--gameid '''thegameid'''</code> to the end of the command. |
− | #*If you get the error | + | #*If you get the error “Multiple worlds are available.”, the world choices are located in <code>/Minetest/worlds/</code>. Add in <code>--worldname '''theWorld'''</code> to the end of the command. |
− | #If your server crashes, then look at the debug.txt in /Minetest/bin/ | + | #If your server crashes, then look at the <code>debug.txt</code> in <code>/Minetest/bin/</code> |
#Enjoy running a Minetest server! | #Enjoy running a Minetest server! | ||
Line 31: | Line 31: | ||
=== Windows === | === Windows === | ||
− | #Open command prompt by going in the Minetest installation folder, then in the | + | #Open command prompt by going in the Minetest installation folder, then in the “bin” folder, hold Shift, do a right click on a empty file (not on minetest.exe), click “Open command window here”. |
− | #Type this | + | #Type this: <code>minetest.exe --server</code>. |
− | #*If you get the error | + | #*If you get the error “Multiple worlds are available.”, use <code>minetest.exe --server --worldname '''world_name'''</code> instead, where <code>'''world_name'''</code> is the name of the world. |
− | #If your server crashes, then look at the debug.txt in /Minetest/bin/ | + | #If your server crashes, then look at the <code>debug.txt</code> in <code>/Minetest/bin/</code> |
#Enjoy running a Minetest server! | #Enjoy running a Minetest server! | ||
Revision as of 16:06, 27 May 2014
Setting up a Server
- Start your server on your desired port
- Note: It is recommended to leave the port at the default (30000)
- Find out your internal IP of the computer you are running the server on
- Linux: open a terminal and type
ifconfig
and hit enter - Windows: Start → Run … →
cmd.exe
→ipconfig
- Linux: open a terminal and type
- Check the port forwarding settings on your router
- forward your chosen port for both TCP and UDP (30000 if you left it default) to the internal IP
- In addition, alter any firewalls you may have to pass the traffic at that port
- To see how to run a server, please read the section below
- Let your friends know your external IP
- Add
server_announce = 1
to your minetest.config to announce it to a public server list.
Running a Server
Linux
- Open a terminal.
- Type in
YOUR/MINETEST/DIRECTORY/bin/minetestserver
or just drop the minetestserver executable (located in/Minetest/bin/
) into the terminal (PLEASE READ THE NOTES BELOW!)- If you want to specify a specific game ID, the game ID choices are located in
/Minetest/games/
. Add in--gameid thegameid
to the end of the command. - If you get the error “Multiple worlds are available.”, the world choices are located in
/Minetest/worlds/
. Add in--worldname theWorld
to the end of the command.
- If you want to specify a specific game ID, the game ID choices are located in
- If your server crashes, then look at the
debug.txt
in/Minetest/bin/
- Enjoy running a Minetest server!
For easy use you can create an file named minetestserver.sh, add the lines below and put it in your /Minetest/bin/ folder. To run the server, just run the file in a terminal.
#!/bin/bash -x ./minetestserver --gameid minetest --worldname world
Windows
- Open command prompt by going in the Minetest installation folder, then in the “bin” folder, hold Shift, do a right click on a empty file (not on minetest.exe), click “Open command window here”.
- Type this:
minetest.exe --server
.- If you get the error “Multiple worlds are available.”, use
minetest.exe --server --worldname world_name
instead, whereworld_name
is the name of the world.
- If you get the error “Multiple worlds are available.”, use
- If your server crashes, then look at the
debug.txt
in/Minetest/bin/
- Enjoy running a Minetest server!
If you don't like to start the crashed server, simply start the server out of a batch file which contains the following code:
@echo off :crash minetest.exe --server --worldname world_name goto crash