Author Topic: Is a dedicated server possible ?  (Read 478 times)

0 Members and 1 Guest are viewing this topic.

Offline shodan

  • 23
Is a dedicated server possible ?
Hi,

I'd like to setup a VM or LXC with a ready to go server

Something one click to start the first and second campaign in co-op with no fuss or errors

Something that will "just work"

Has anyone done such a thing ?

If so, how do you control this server (such as changing the map and seeing the map list etc..  basic dedi server commands)

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Is a dedicated server possible ?
If you want it headless then it's a pretty manual process at the moment, both installing and updating, since there is no Knossos CLI client so you have to do things by hand. But it's quick and easily to bring up and down otherwise. For my Linux standalones on an Ubuntu VPS I just have a systemd unit file for each game to easily stop, start, and restart them.

I have a long term goal of making that a super simple process, since it directly affects me, but it's a long term goal. I can give some more detailed steps that I go through to install/update my servers and send you my systemd unit and multi.cfg files if it would be helpful.

But if you don't need it headless then just use Knossos.NET, go to the Multiplayer tab, and click the "Standalone Server Creator" button at the bottom then select the mod you want to play and the settings you want. Plus you still have the option of starting/stopping it outside of Knossos.NET, and just using Knossos.NET to install the mods/builds and keep things up to date. You can easily create a shortcut/systemd file to launch the standalone.


You don't need to do much to control or maintain it once it's running. There isn't much to control on the "server" part, which is all a standalone is in this case. The first client that connects to the server becomes the "host" and is the one that chooses the main settings, picks the level/map to play, kicks other players, etc.. Anyone else that connects is a standard "client" and is basically just along for the ride.

On Windows there is a standalone GUI for basic control and monitoring of the server. On Linux/Mac there is a web interface, though I personally just don't bother with it. However in either case you don't technically need to use it.

One note, if you set a password on your server (with Knossos.NET or manually with a multi.cfg file), it applies only to the host. That way you can restrict who the host is on your server as the first person to connect (and become host) must know the password. All of the clients connecting after that don't need to know the server password. However the host can also set a different type of password when they join the server, and in that case the clients would need to know what it is to connect.


I don't know if any of that would really fall into the category of "just work". But once you've overcome that initial hurdle of installation and basic setup, it really is easy to stop and start the server as you like and not really be forced to manage anything once it's running.
« Last Edit: December 03, 2024, 02:32:09 pm by taylor »

 

Offline shodan

  • 23
Re: Is a dedicated server possible ?
Thanks for the guidance

My current goal is now to how a Freespace 1 & 2 back-to-back co-op  playthrough for my next LAN party.

I started with two windows computer, each running knossos

I tried in multiplayer local mode (not pxo) to have one start FS1 COOP UP  and the other join it.

They can't see each other, no matter which is server.

I made sure the executable is set to allow both private and public networks on both computers, still no go

Then I logged both of them into PXO, both tried to start a server, the other couldn't join.

I have forwarded UDP port 7808 to one and then the other. Sometimes the firewall probe succeed, often it fails I don't get why it is not reliable

I also so notice that sometimes in PXO mode, I cannot type text into the messagebox , see screenshot



I also started a ubuntu VM, downloaded knossos on it and tried to start a standalone server

I get this error when I press launch

"/tmp/.mount_fs2_opzkfWkh/bin/fs2_open_24_2 error while loading shared libraries: libopenal.so.1: cannot open shared object file: No such file or directory"

I think for the server I would like to make a plain debian headless server run the standalone server but I see I am far from reaching that  !

Is there a way to know what is the full command line that the standalone server creator is trying to run ?

thanks !


 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Is a dedicated server possible ?
Thanks for the guidance

My current goal is now to how a Freespace 1 & 2 back-to-back co-op  playthrough for my next LAN party.

I started with two windows computer, each running knossos

I tried in multiplayer local mode (not pxo) to have one start FS1 COOP UP  and the other join it.

They can't see each other, no matter which is server.

I made sure the executable is set to allow both private and public networks on both computers, still no go

For LAN games it uses mDNS to advertise server availability. This worked great in testing on multiple networks, however many people have had trouble with the games not being visible and I have so far been unable to figure out why.

A workaround is to manually give each client machine the address of a server to check for thereby forcing it to try a specific connection rather than relying on the mDNS advertisement. You can do this in two ways: 1) on the in-game the multi options screen for each client, click the Add button in the IP Address section on the left, or 2) create a text file named tcp.cfg with the address or addresses of the servers you want and copy it to each of the clients.

The tcp.cfg file is just plain text with one IP address and port per line. So if you had 3 possible machines running a server (even if they aren't all running at the same time) you could have a file that looks like this:

Code: [Select]
192.168.1.10:7808
192.168.1.15:7808
192.168.1.25:7808

And once you've got the file you can simply copy it to each of the clients, putting it in the "data" directory for the game.

Quote
Then I logged both of them into PXO, both tried to start a server, the other couldn't join.

I have forwarded UDP port 7808 to one and then the other. Sometimes the firewall probe succeed, often it fails I don't get why it is not reliable

The firewall probe can actually fail several times and then start working. It keeps trying in regular intervals. I recommend waiting 4-5 minutes after the server is created on PXO before trying to connect from a client. If the failure was temporary then it should work itself out within that time period. If it still doesn't work after the wait then it probably isn't going to, even though PXO will keep trying.

Although for your LAN party I would definitely suggest avoiding the use of PXO unless you have no other way of connecting everyone.

Quote
I also so notice that sometimes in PXO mode, I cannot type text into the messagebox , see screenshot

This is a known bug I'm afraid and we haven't worked up a proper solution yet. The issue is that after the PXO lobby screen is created you might sometimes be presented with a popup which takes text input. When that popup closes it disables text input and you're prevented from typing anything in the chat window. The only fix at the moment is to go to another screen, like the server list, and then pack to the lobby screen. Hopefully the troublesome popup isn't shown again and you can chat normally once again.

Quote
I get this error when I press launch

"/tmp/.mount_fs2_opzkfWkh/bin/fs2_open_24_2 error while loading shared libraries: libopenal.so.1: cannot open shared object file: No such file or directory"

Yeah, sorry, this is a packaging glitch. That library is supposed to be included in the AppImage but it appears that the mechanism to do so isn't enabled in the official builds.

Make sure that the "libopenal1" package is installed via apt and hopefully it should start working.

Quote
Is there a way to know what is the full command line that the standalone server creator is trying to run ?

Knossos.NET should use the command line that which ever mod you've selected has set (just like single player), but with the addition of the "-standalone" option which puts it in server mode. If you specify a port number then it will also add the "-port <num>" option. The Debug tab in Knossos.NET should log the full set of command line options that gets used.

The other options in that server creator window are used to populate the multi.cfg file. For a LAN game I recommend making sure that the PXO box is not checked, and in the "Extra options" box enter "+lan_update", which will make sure you have max network performance on the LAN games.

And that multi.cfg is also one that you can pre-populate and copy to your client machines along with the previously mentioned tcp.cfg. Some of the options apply to both servers and clients, and the server options will be ignored on clients so it's safe to include them.

 

Offline shodan

  • 23
Re: Is a dedicated server possible ?
Thanks for your patience

I wrote a detailed response, but server ate my message :(

I am out of time before bed time, so I will be brief

fixed the mdns issue, but turning off all network adapters (usb network to my monitor, virtualbox virtual network, two zero tier adapters), now all 3 computers can see LAN servers

sudo apt install -y libopenal1   | fixed the library issue

I tried a 3 way game with ubuntu VM as server

It ran but stuttering and desync then crash, probably due to software 3d rendering

will -standalone still try to render ?

does -standalone require all game assets ?

When starting the game, server got a popup "ONE OR MORE PLAYERS HAS HACKED DATA FILES"

Each client also saw PILOTNAME HAS HACKED TABLES/DATA  for all 3 other pilots

When I used standalone server creator on linux, seemingly nothing happenned, however the process was running (but could not be found by the client) It was unclear if the server had started or not, visually


What is the LOCK button for ? I could not change ship or loadout until it was pressed, this was confusing for a while

Lastly I tried running the standalone server manually with the command

./bin/FSO-24.2.0/linux/fs2_open_24_2_0_x64.AppImage -parse_cmdline_only -standalone -mod fs1coopup-1.1.1,fsport-mediavps-4.7.2,fsport-3.7.3,MVPS-4.7.3

This failed with message
Aborted (core dumped)

and what are
fsport-mediavps-4.7.2,
fsport-3.7.3,
MVPS-4.7.3

Are some of these redundant ?

How much of these assets are required for a standalone server ?

Thanks !










 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Is a dedicated server possible ?
fixed the mdns issue, but turning off all network adapters (usb network to my monitor, virtualbox virtual network, two zero tier adapters), now all 3 computers can see LAN servers

Thanks for the info. I'll add that to my list and see if I'm able fix it so that it works more reliably.

Quote
will -standalone still try to render ?

does -standalone require all game assets ?

No, standalone doesn't render anything. It also does not require sound effects, music, textures, interface graphics, animations, or movies. However those things tend to be packaged together with things that it does need, which makes it difficult to reduce the number of required packages/files.

The standalone mode doesn't require much CPU power to run, but you will likely need at least 1 GB of free memory/RAM to properly run a mission. A Raspberry Pi 3 or newer, with at least 2 GB of RAM, will run a standalone server quite well (though you would need to compile your own FSO build, for arm64/aarch64). So anything more powerful than that should have no problem running a standalone.

Quote
When starting the game, server got a popup "ONE OR MORE PLAYERS HAS HACKED DATA FILES"

Each client also saw PILOTNAME HAS HACKED TABLES/DATA  for all 3 other pilots

Yes that message will show up for most mods that you use. Only by playing on PXO is it able verify the data is valid. For your LAN game I wouldn't worry about it though. It's an annoying message but is otherwise harmless. Playing on PXO it would prevent your stats from saving, but the hacked data message has no real affect on LAN games.

Quote
When I used standalone server creator on linux, seemingly nothing happenned, however the process was running (but could not be found by the client) It was unclear if the server had started or not, visually

I'd never actually tried to use that feature before yesterday, but I noticed the same thing. There doesn't appear to be an indication that the standalone was started, that it's running, or provide a way to stop it. I'm not sure if that's a bug of just functionality which hasn't been implemented yet.

Quote
What is the LOCK button for ? I could not change ship or loadout until it was pressed, this was confusing for a while

Yeah the message and it's purpose really isn't clear on the UI. The user manual describes it like this:

In cooperative missions, the host of the game must assign all players to ships before players can choose their own ships and weapons. The host is free to drag and drop player names from one ship to another. For example, some players of the game may wish to fly in a particular wing that contains only bombers. The host can move those players into that wing. Once all players have been placed, the host clicks on the “Lock” button in the Ship Selection screen. Once players have been locked, they are free to start making ship and weapon selections. Once players have been locked and are free to choose their ships and weapons, they cannot be unlocked. Any ships that are not claimed by players are flown by AI (computer-controlled).

In team vs. team missions, the team captain for each team must assign players to ships before the ship selection process can begin. The team captain is designated by the host when the teams are initially formed, before the briefing stage begins. Once each team captain assigns players, the captain must click on the “Lock” button, after which all members of his team may select their ships and weapons.

After players have been locked, they are free to select different ships and weapons for themselves (if the host allows them to).


Quote
Lastly I tried running the standalone server manually with the command

./bin/FSO-24.2.0/linux/fs2_open_24_2_0_x64.AppImage -parse_cmdline_only -standalone -mod fs1coopup-1.1.1,fsport-mediavps-4.7.2,fsport-3.7.3,MVPS-4.7.3

This failed with message
Aborted (core dumped)

Not sure about that one. Need more info to help figure something out.

Quote
and what are
fsport-mediavps-4.7.2,
fsport-3.7.3,
MVPS-4.7.3

Are some of these redundant ?

Those are the used mods in dependency order, from the most important to the least important. So everything in that list is required to play and also have it look nice. The standalone server doesn't make use of all of that data, but it still needs it there so that the server and clients are running with the exact same data set.

  

Offline shodan

  • 23
Re: Is a dedicated server possible ?
I just had some success

created a debian lxc headless

I had to install

apt install -y libopenal1 libfreetype6

I mounted my library folder to /knossos

had to enable FUSE support in proxmox


This command started the server, two client joined and started the game

root@freespace:/knossos/library/FS2# ../bin/FSO-24.2.0/linux/fs2_open_24_2_0_x64-FASTDBG.AppImage -parse_cmdline_only -standalone -mod fs1coopup-1.1.1,fsport-mediavps-4.7.2,fsport-3.7.3,MVPS-4.7.3



here is my .conf file

"features: fuse=1" is the important change

root@proxmox:~# cat /etc/pve/nodes/proxmox/lxc/750.conf
arch: amd64
cmode: shell
cores: 8
features: fuse=1
hostname: freespace
memory: 4000
mp0: /mnt/knossos,mp=/knossos
net0: name=eth0,bridge=vmbr0,firewall=0,hwaddr=DE:AD:BE:EF:75:75,ip=dhcp,ip6=man                                                                                                                                                                                     ual,type=veth
ostype: debian
rootfs: local-lvm:vm-750-disk-0,size=64G
swap: 512
unprivileged: 1
lxc.idmap: u 0 100000 65536
lxc.idmap: g 0 100000 44
lxc.idmap: g 44 44 1
lxc.idmap: g 45 100045 65491


I imagine server setup is in

./fs1coopup-1.1.1/data/multi.cfg

very late here, I'll give this more of a try tomorrow