Looking for server Install guide for VPS Linux/ubuntu.

Post Reply
jwpwns
Member
Posts: 62
Joined: Sat Feb 08, 2014 22:22

Looking for server Install guide for VPS Linux/ubuntu.

by jwpwns » Post

I plan on playing minetest again i want to make a server. I have tried in the past but could never get it to work now that it is years later does anyone know a good step by step guide to install a server on a linux/ubuntu VPS?

User avatar
Noneatme
New member
Posts: 2
Joined: Tue Feb 06, 2018 08:08
GitHub: Noneatme
IRC: Noneatme
In-game: Noneatme
Location: Germany

Re: Looking for server Install guide for VPS Linux/ubuntu.

by Noneatme » Post

I would like to use this thread to ask my questions too. I don't want to create an extra thread for this.
I am also looking for a "new" install guide. As far as I read, to get a working minetest-server executable for version 0.4.16 I have to compile the server on my own.
Many mods are already requiring version 0.4.16, so any older server version is okay, but not useful.
The packages for Ubuntu 16.04 LTS in the ubuntu PPA are outdated, and can't be used if you want to install mods because it won't install server version 0.4.16, only 0.4.14+repack. (or 0.4.13+repack, not sure) I use my linux server on a daily productive base, so I will upgrade my Ubuntu LTS version only to 18.04 LTS when it's out.

After hours of struggeling and reading almost every topic, I managed to compile the server using the 1-line script to build the client first and then the server using -DBUILD_SERVER=TRUE. Now, I'm stuck at the 5.0.0-dev Version and don't know how to change the version, because I don't know if all the pre-requisites for compling another branch works with the script or not. Can't there be just a .deb for the 0.4.16 server?

Thanks for any help.

sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

Re: Looking for server Install guide for VPS Linux/ubuntu.

by sfan5 » Post

Because people keep doing it incorrectly and asking for a script, here's one.

First step, choosing the Minetest version:

Code: Select all

export branch=$(printf "Enter Minetest version: " >&2;read r;echo "$r")
It will ask you to enter a Minetest version. You can enter any numeric version, but you probably want either of these:
  • master: Latest development state (5.7.0-dev)
  • stable-5: Stable release in the 5.x (5.6.0)
After you've done that just paste the one-line script into your terminal:

Code: Select all

(sudo apt-get install -y unzip g{it,cc,++} {c,}make {zlib1g,lib{sqlite3,curl4-openssl,luajit-5.1,leveldb,zstd}}-dev&&cd $(mktemp -dp /var/tmp)&&git clone --depth=1 -b $branch https://github.com/minetest/minetest&&cd minetest&&git clone --depth=1 -b $branch {https://github.com/minetest,games}/minetest_game&&git clone --depth=1 https://github.com/minetest/irrlicht lib/irrlichtmt&&cmake . -D{BUILD_CLIENT=0,{BUILD_SERVER,RUN_IN_PLACE,ENABLE_LEVELDB}=1}&&make -j$(nproc) package&&p=$(echo minetest-*.tar.gz)&&cp "$p" ~&&printf '\n\n\e[1;32mBuild successful, an archive called "%s" was placed in your home folder.\nTo run the server, extract the archive and run the executable inside the 'bin/' folder\e[0m\n' "$p")||printf '\n\n\e[1;31mBuild failed, review log output above to identify and fix the issue.\e[0m\n'
It will ask you for your password once in the beginning.

Once it's done you'll have a .tar.gz archive in your home folder, you can extract it anywhere you'd like and run minetestserver from there like a portable installation.

Code: Select all

(sudo apt-get install -y unzip g{it,cc,++} {c,}make {zlib1g,lib{sqlite3,curl4-openssl,luajit-5.1,leveldb,zstd}}-dev&&cd $(mktemp -dp /var/tmp)&&wget downloads.sourceforge.net/irrlicht/irrlicht-1.8.4.zip -O irr.zip&&unzip -q irr.zip&&git clone --depth=1 -b $branch https://github.com/minetest/minetest&&cd minetest&&git clone --depth=1 -b $branch {https://github.com/minetest,games}/minetest_game&&cmake . -D{BUILD_CLIENT=0,{BUILD_SERVER,RUN_IN_PLACE,ENABLE_LEVELDB}=1,IRRLICHT_INCLUDE_DIR=$PWD/../irrlicht-1.8.4/include}&&make -j$(nproc) package&&p=$(echo minetest-*.tar.gz)&&cp "$p" ~&&printf '\n\n\e[1;32mBuild successful, an archive called "%s" was placed in your home folder.\nTo run the server, extract the archive and run the executable inside the 'bin/' folder\e[0m\n' "$p")||printf '\n\n\e[1;31mBuild failed, review log output above to identify and fix the issue.\e[0m\n'
Last edited by sfan5 on Fri Aug 05, 2022 13:31, edited 9 times in total.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
Noneatme
New member
Posts: 2
Joined: Tue Feb 06, 2018 08:08
GitHub: Noneatme
IRC: Noneatme
In-game: Noneatme
Location: Germany

Re: Looking for server Install guide for VPS Linux/ubuntu.

by Noneatme » Post

sfan5 wrote:Because people keep doing it incorrectly and asking for a script, here's one.

First step, choosing the Minetest version:

Code: Select all

export branch=$(printf "Enter Minetest version: " >&2;read r;echo "$r")
It will ask you to enter a Minetest version. You can enter any numeric version, but you probably want one of these:
  • master: Latest development state (0.5.0-dev)
  • backport-0.4: Backports branch of the 0.4 series (use this for public servers!)
  • stable-0.4: Stable release in the 0.4 series (0.4.16)
[...]
Thanks! I managed to get the 0.4.17-dev Version now. Also, I haven't found anything on the client / server version mismatch settings, are players able to connect with a client version 0.4.16 to a 0.4.17 server?

sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

Re: Looking for server Install guide for VPS Linux/ubuntu.

by sfan5 » Post

Noneatme wrote:Thanks! I managed to get the 0.4.17-dev Version now. Also, I haven't found anything on the client / server version mismatch settings, are players able to connect with a client version 0.4.16 to a 0.4.17 server?
Yes, 0.4.16 and 0.4.17(-dev) are compatible, which is why you should use the backport-0.4 branch for public servers.
Incompatibilities only happen between 0.4.x and 0.5.x.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

jwpwns
Member
Posts: 62
Joined: Sat Feb 08, 2014 22:22

Re: Looking for server Install guide for VPS Linux/ubuntu.

by jwpwns » Post

Edit posted twice for some reason.
Last edited by jwpwns on Tue Feb 06, 2018 16:45, edited 1 time in total.

jwpwns
Member
Posts: 62
Joined: Sat Feb 08, 2014 22:22

Re: Looking for server Install guide for VPS Linux/ubuntu.

by jwpwns » Post

jwpwns wrote:
sfan5 wrote:Because people keep doing it incorrectly and asking for a script, here's one.

First step, choosing the Minetest version:

Code: Select all

export branch=$(printf "Enter Minetest version: " >&2;read r;echo "$r")
It will ask you to enter a Minetest version. You can enter any numeric version, but you probably want one of these:
  • master: Latest development state (0.5.0-dev)
  • backport-0.4: Backports branch of the 0.4 series (use this for public servers!)
  • stable-0.4: Stable release in the 0.4 series (0.4.16)
After you've done that just paste the one-line script into your terminal:

Code: Select all

(sudo apt-get install -y unzip g{it,cc,++} {c,}make zlib1g-dev lib{sqlite3,curl4-openssl,luajit-5.1,leveldb}-dev&&cd $(mktemp -d)&&wget downloads.sourceforge.net/irrlicht/irrlicht-1.8.4.zip -O irr.zip&&unzip -q irr.zip&&git clone https://github.com/minetest/minetest -b $branch&&cd minetest&&git clone https://github.com/minetest/minetest_game -b $branch games/minetest_game&&cmake . -DBUILD_CLIENT=0 -D{BUILD_SERVER,RUN_IN_PLACE,ENABLE_LEVELDB}=1 -DIRRLICHT_INCLUDE_DIR=$PWD/../irrlicht-1.8.4/include&&make -j$(nproc) package&&p=$(echo minetest-*.tar.gz)&&cp "$p" ~&&printf '\n\n\e[1;32mBuild successful, an archive called "%s" was placed in your home folder.\nTo run the server, extract the archive and run the executable inside the 'bin/' folder\e[0m\n' "$p")||printf '\n\n\e[1;31mBuild failed, review log output above to identify and fix the issue.\e[0m\n'
It will ask you for your password once in the beginning.

Thanks for the Info all done but now i get


2018-02-06 11:49:06: WARNING[Main]: Switching to SQLite3 or PostgreSQL is advised, please read http://wiki.minetest.net/Database_backends.
2018-02-06 11:49:06: [ConnectionSend]: 5: Bind failed: Address already in use
2018-02-06 11:49:06: ACTION[Main]: .__ __ __
2018-02-06 11:49:06: ACTION[Main]: _____ |__| ____ _____/ |_ ____ _______/ |_
2018-02-06 11:49:06: ACTION[Main]: / \| |/ \_/ __ \ __\/ __ \ / ___/\ __\
2018-02-06 11:49:06: ACTION[Main]: | Y Y \ | | \ ___/| | \ ___/ \___ \ | |
2018-02-06 11:49:06: ACTION[Main]: |__|_| /__|___| /\___ >__| \___ >____ > |__|
2018-02-06 11:49:06: ACTION[Main]: \/ \/ \/ \/ \/
2018-02-06 11:49:06: ACTION[Main]: World at [/root/minetest-0.4.17-dev-linux/bin/../worlds/world]
2018-02-06 11:49:06: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:30000.
2018-02-06 11:49:07: ERROR[Main]: ServerError: AsyncErr: Failed to bind socket (port already in use?)

jwpwns
Member
Posts: 62
Joined: Sat Feb 08, 2014 22:22

Re: Looking for server Install guide for VPS Linux/ubuntu.

by jwpwns » Post

noting else is running on my vps so not sure why it wont bind to port? it works only if i change the port to lets say 30001

jwpwns
Member
Posts: 62
Joined: Sat Feb 08, 2014 22:22

Re: Looking for server Install guide for VPS Linux/ubuntu.

by jwpwns » Post

nvm got it to work.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests