Need Help Setting Up Dedicated Server

Post Reply
User avatar
L22
Member
Posts: 33
Joined: Fri Jan 18, 2019 03:56
In-game: L22

Need Help Setting Up Dedicated Server

by L22 » Post

I recently took a computer and installed Ubuntu on it so that I could turn it into a dedicated server.
I've spent some time setting it up and can't seem to get it up and running properly. I was able to connect to it earlier by using my private IP, but I think I messed it up and can't get it to work again.

I've already port-forwarded, installed the game, and figured out how to launch the server from the terminal. But even after that I can't connect to it using my public IP.

After a few tries using my public IP and failing each time, I decided to look it up. One thing I did was go into the minetest.conf file and add a line of text "bind_address = " and put my private IP after that. When I did that I got the same results. I could connect to it from a client using my private IP, but not my public one. So I put in my public IP and tried that. After that I think I broke it because I couldn't connect to the server anymore using either IP. Also the terminal started printing a line of text saying something like "could not bind socket, port already in use?" every time I started the server. Shortly after that I removed "bind_address = " from the .conf file, now I can't connect to the server at all.

I'm very new to server hosting on a Linux computer for MineTest, so I'm probably doing this wrong.

Any ideas on what I'm doing incorrectly?

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

Re: Need Help Setting Up Dedicated Server

by Krock » Post

> could not bind socket, port already in use?

This means you're running two Minetest servers at once. Close all `minetest` and `minetestserver` processes and start from there.

First, try to host the game over the GUI (if possible). Then start another Minetest client and join the world using the tab "Join Game" or "Play Online" using the server computer's private IP address. This will work.
Some people report that they can access their own network by connecting to the public IP after forwarding the port in their router - but I could never get that to work. However, people from outside networks were able to connect to the public IP. Join another network or ask friends whether they could try to connect to your server (just in case).

The server configuration lines might look like this: (I don't think you need to configure `bind_address`)

Code: Select all

# Announce to the server list
server_announce = true
# Public IP or DNS name (domain)
server_address = 255.1.255.2
port = 30000
server_name = My Cool Server 123
server_description = """
btw this is a multiline
description
"""
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
L22
Member
Posts: 33
Joined: Fri Jan 18, 2019 03:56
In-game: L22

Re: Need Help Setting Up Dedicated Server

by L22 » Post

Thanks for offering your help.

It's working again. I can connect to it using my private IP. However, even after I changed my internet connection to a different one, I still cannot connect to it using my public IP. I'll try having a friend connect to it later.

Also, the server configuration file you mentioned above, where is it located on Ubuntu?

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

Re: Need Help Setting Up Dedicated Server

by Krock » Post

Probably you didn't port-forward the server correctly. Ensure the port, protocol (UDP) and internal IP (or hostname) are correct.
L22 wrote:Also, the server configuration file you mentioned above, where is it located on Ubuntu?
For system-wide installations it's in ~/.minetest/ ( /home/yourusername/.minetest/ ). Create that minetest.conf file if it does not exist yet.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
L22
Member
Posts: 33
Joined: Fri Jan 18, 2019 03:56
In-game: L22

Re: Need Help Setting Up Dedicated Server

by L22 » Post

Okay. I’ll check my port-forwarding settings.

User avatar
L22
Member
Posts: 33
Joined: Fri Jan 18, 2019 03:56
In-game: L22

Re: Need Help Setting Up Dedicated Server

by L22 » Post

I checked the port settings. Both public and private UDP/TCP are using the same port.
I also have my private IP entered in it’s respective textbox.
I don’t see anything for adding a hostname though.

User avatar
L22
Member
Posts: 33
Joined: Fri Jan 18, 2019 03:56
In-game: L22

Re: Need Help Setting Up Dedicated Server

by L22 » Post

Okay. After some physical reconfiguring of the router setup, I managed to get the server working I think. I’m able to connect to the server with the public IP using the same network that the server is on. The funny thing is that this seems to only work once every time I start the server. After that I can only connect to it using the private IP. I assume this is similar to the situation you mentioned above about connecting to the server on the same WiFi it’s using.

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests