have my server ready to launch so that friends and family can enjoy the game, but I am having a small problem trying to figure out how to keep the server running 24/7.
It is hosted on Linux Ubuntu
I have tried starting the server via terminal using Putty , server shuts down as soon as I close putty.
WinSCP gives the same problem, shuts down when I shut down my home computer (since putty nor winscp are running with open terminals)
The best solution I have found so far, is leaving telent terminal open on my iPhone. So far, server has stayed online 13 hours with no, but this is only if there are players in the game.
So, I tried leaving one idle player in a game last night, to see if I would wake up and have terminal still running, the terminal times out with an error message about staying idle, so I assume the player should have been moving, and since it just stood in game, the terminal shut down the connection automatically. The terminal was still up and running on my iPhone when this happened.
So now I am totally clueless on how to keep it running 24/7.
Any assistance would be greatly appreciated!
New Server not staying connected 24/7
-
- Moderator
- Posts: 4095
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
Re: New Server not staying connected 24/7
First, minetestserver does not shut down automatically if there are no players in-game.
What you want to keep the server running in the background is something like tmux.
Create a tmux instance, start your server inside then detach and it will still be running.
What you want to keep the server running in the background is something like tmux.
Create a tmux instance, start your server inside then detach and it will still be running.
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: New Server not staying connected 24/7
1) Write a script that starts the server with the right arguments (code source)
2) Set it up as daemon (command source)
3) Consider putting minetestserver inside a forever loop, for the case when it crashes. Also run a command to notify about recent crashes (or when they occur in fast intervals).
Code: Select all
#!/bin/bash -x
./minetestserver --gameid minetest --worldname world
Code: Select all
setsid myscript.sh >/path/to/logfile 2>&1 < /dev/null &
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
Re: New Server not staying connected 24/7
Thank you sfan and Krock!!!
I went with TMUX as it was already installed on my server, and I now have the game running 24 / 7 without having to use my own terminals on comp or phone.
I had never heard of tmux before, so far, this program rocks!
I went with TMUX as it was already installed on my server, and I now have the game running 24 / 7 without having to use my own terminals on comp or phone.
I had never heard of tmux before, so far, this program rocks!
- Festus1965
- Member
- Posts: 4181
- Joined: Sun Jan 03, 2016 11:58
- GitHub: Festus1965
- In-game: Festus1965 Thomas Thailand Explorer
- Location: Thailand ChiangMai
- Contact:
Re: New Server not staying connected 24/7
seams you started the server in a terminal in putty or somehow ...Mardarth wrote: I have tried starting the server via terminal using Putty , server shuts down as soon as I close putty.
!
or the login with putty is then off, closing runnding instances ...
as my minetest-server IS running 24/7 on ubuntu ... in a terminal, that i can see what happens
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)
If urgend, you find me in Roblox (as CNXThomas)
Re: New Server not staying connected 24/7
Hi Festus, Putty is what I was using, which was closing running instances when I closed putty.
I started the minetest server using TMUX yesterday, and the server has been running fine ever since with no downtime.
I started the minetest server using TMUX yesterday, and the server has been running fine ever since with no downtime.
Who is online
Users browsing this forum: No registered users and 17 guests