Xonotic Forums
[NEED HELP] Own server - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Support (https://forums.xonotic.org/forumdisplay.php?fid=3)
+--- Forum: Xonotic - Help & Troubleshooting (https://forums.xonotic.org/forumdisplay.php?fid=4)
+--- Thread: [NEED HELP] Own server (/showthread.php?tid=9552)

Own server - FinBiteLeaf - 12-05-2022

Hello. I read in FAQ and text file in /server that to create an own online server i need to "copy the right server_* script...".

So... The question is where do i get the "right server script"?

If i must do it by myself, using coding, then the problem is solved. I just can't do it, i am no coder.

But maybe there is a script template or smth?

I have looked through "gnu screen" manual and have found it very comlicated for a non-tech guy and actually haven't found direct description of how to start a server, not to monitor it. Maybe i have missed smth.

Will be glad to have an advice.

RE: Own server - Freddy - 12-05-2022

The "right server script" is also located in the /server folder. Unless you want to run more than one server instance, you will probably not need to adjust it.

Regarding GNU screen: You don't necessarily need it. I guess that you're using linux, if not the next part will probably not help you much. You just need a software that can daemonize the executable as otherwise the process will be killed when you log out of the session. I prefer to use tmux (https://www.man7.org/linux/man-pages/man1/tmux.1.html, https://coderwall.com/p/purqma/use-tmux-for-a-poor-man-s-daemon), but there is also abduco (https://wiki.archlinux.org/title/Abduco). However, you can also directly use your init to do this. Most distros use Systemd, but here are also a few alternatives:
Systemd: https://linuxhandbook.com/create-systemd-services/
OpenRC: https://stackoverflow.com/questions/65942607/how-create-use-services-with-openrc
Runit: https://wiki.gentoo.org/wiki/Runit

RE: Own server - ballerburg9005 - 12-05-2022

I created a full Linux server tutorial from start to finish:


You basically just buy a VPS for $3 with e.g. Ubuntu, then paste the commands, do a few edits as instructed (e.g. to change server name or password) and then it will just run. You can also use your own hardware, but then of course you would have to install Linux there yourself (which is not that hard) plus don't forget that you need to forward ports on your home router if that's where you are doing it from. Basically, if your server is already running but you don't find it in the list from your PC then it means that your router is acting as a firewall (-> you need port forwarding setup) or if you have no router than there is a firewall on your server you need to disable (or set up such that it will allow the required ports).

Running a server will require some crude understanding of Linux, but with the tutorial it is rather easy.

Regarding the server.cfg: there is already a template shipped with the game. You just have to write a few lines into it, that tells it which game modes to run, what's the server called, what maps are loaded and such. It is very easy and straight forward. If you have a look at the link, in .xonotic/data/server.cfg you will find everything already configured. It is very simple.

Most of the stuff from my link is not 100% required, just better to manage the server. Like you can ssh into the console directly and manage it, and it runs as a dedicated service in systemd, which is "cleaner" than just executing it from cmd.

Considering how easy it is though to run a server, I think it is worth the 2 minutes of effort.

To summarize:

1. Just executing xonotic-linux-dedicated.sh with a minimal server.cfg will already result in a fully functional server
2. if you don't see your server you have to fix your firewall/router

RE: Own server - FinBiteLeaf - 12-08-2022

Thank you! I will look into it a bit later!