I'm making the foolish assumption that you are using Ubuntu 16.04, either the server or desktop version, though this will also work on Debian, I believe.
First, setup openssh-server on your server.
Type this in the terminal:
Code: Select all
sudo apt-get install openssh-server
Next, on the server machine type in this command
Code: Select all
ifconfig
Mine is 192.168.0.116
On a client machine, type this into a terminal:
Code: Select all
ssh user@ip
for me, this is ssh laser@192.168.0.116.
it will now prompt you for your password on the server for the user laser. Type your password in, and press enter.
Once you are logged in, update the packages
Code: Select all
sudo apt-get update && sudo apt-get upgrade
Code: Select all
sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev; cd; git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ..; cmake . -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1; make -j$(nproc); cd ../bin; ./minetest; echo -e "\n\n\e[1;33mYou can run Minetest again by double-clicking \"minetest\" in the \"bin\" folder of the \"minetest\" folder in your home folder.\nYou can install mods in ~/minetest/mods, too.\e[0m"
Next, on the server type this in: crontab -e
It will show something like this:
Code: Select all
Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
@reboot /home/USER/minetest/bin/minetest --server --port 30000 --world WORLD_NAME
It should look something like this:
Code: Select all
Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
@reboot /home/laser/minetest/bin/minetest --server --port 30000 --world creative
Now, you're finished! Go ahead, and tweak the worlds/mods however you like, then reboot the server. It should be running on the reboot. Find your public IP using this site: http://www.whatismypublicip.com/
Now to login, set the ip to the public IP address, and the port to the port you assigned for port forwarding. That's all you need to know for the basic setup! Thanks for reading!