Abiotic Factor: Difference between revisions
| Line 144: | Line 144: | ||
LogOnlineSession: Display: OSS: Session creation completed. Automatic start is turned on, starting session now. [2024.05.04-16.53.14:337][ 23] LogOnlineSession: Display: OSS: Session creation completed. Automatic start is turned on, starting session now. | LogOnlineSession: Display: OSS: Session creation completed. Automatic start is turned on, starting session now. [2024.05.04-16.53.14:337][ 23] LogOnlineSession: Display: OSS: Session creation completed. Automatic start is turned on, starting session now. | ||
</pre> | </pre> | ||
--- | |||
If you want to transfer your SaveGame from an ingame hosted lobby, you can take a look at your local PC. (%appdata%\Local\AbioticFactor\Saved\SaveGames\YOURMAPNAME). | |||
Start the dedicated server once, to let the server create all neccessary folders. | |||
Upload your local savegame to "abioticserver/AbioticFactor/Saved/SaveGames/Server/Worlds" and change the map name in your startparamter of the server. | |||
--- | |||
I just did a manual 'steamcmd' install, and my run command is | |||
<pre> | |||
WINEDEBUG=-all wine64 /srv/gameserver/fox/abiotic/AbioticFactor/Binaries/Win64/AbioticFactorServer-Win64-Shipping.exe -multihome=192.168.210.210 -useperfthreads -MaxServerPlayers=6 -PORT=7777 -QUERYPORT=27015 -ServerPassword=blahblah -SteamServerName="Together" -WorldSaveName="Together" | |||
</pre> | |||
where "Together" should be replaced by your save name. | |||
--- | |||
I had a problem "wine64: not found" I fixed it by running this. | |||
I'm on an AMD Ryzen running Ubunt 24.04 server. | |||
sudo apt install --install-recommends winehq-stable wine-stable:amd64 wine-stable-amd64:amd64 wine-stable-i386:i386 | |||
--- | |||
I had issues setting up the server on Ubuntu 24 but was able to get past them by doing the following: | |||
# Following the Wine instructions for installing wine on my machine (Apparently it's quite specific to linux distro and hardware) | |||
# Using "wine" in the wine server file instead of "Wine64" | |||
# I got an error loading a DLL at some point and followed the solution on this page: | |||
#* https://forum.manjaro.org/t/wine-could-not-load-kernel32-dll-status-c0000135/69811/2 | |||
# Every time I stop the server I have to restart the machine to get it to run again. No idea why. | |||
To enable DLC content I did the following: | |||
I found the admin.ini file here: | |||
/home//abioticserver/AbioticFactor/Saved/SaveGames/Server | |||
And added my Steam ID to it. | |||
You can lookup your 17 digit Steam ID by opening the Steam app, clicking on your Icon, and going to Account Details. I pasted mine over one of the example IDs in the admin.ini. | |||
=== Linux performance note === | |||
Remove -NoAsyncLoadingThread from parameters for better server performance. | |||
== Dedicated Server in Windows == | == Dedicated Server in Windows == | ||
Revision as of 05:02, 25 September 2026
Dedicated Server in Linux
https://github.com/DFJacob/AbioticFactorDedicatedServer/wiki
https://github.com/DFJacob/AbioticFactorDedicatedServer/issues/3
<markdown>
- **Installing the Abiotic Dedicated Server to Ubuntu**
_Note: Do not run as user root - make a user called anything else and give them sudo permissions Example:_ `sudo useradd -m abiotic` `sudo -u abiotic -s` Now login to that user and go to their home directory `cd ~` to start this guide
- 1. Prepare the server with required packages**
`sudo apt update sudo apt upgrade -y` `sudo apt install software-properties-common lsb-release wget`
- 2. Install Wine**
Add repositories `sudo mkdir -pm755 /etc/apt/keyrings` `sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key`
`sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/dists/$(lsb_release -cs)/winehq-$(lsb_release -cs).sources`
`sudo dpkg --add-architecture i386` `sudo apt update` `sudo apt install --install-recommends winehq-staging` `sudo apt install cabextract winbind screen xvfb`
- 3. Set up SteamCMD**
`sudo add-apt-repository multiverse` `sudo apt-add-repository non-free` `sudo apt update` `sudo apt install steamcmd`
- 4. Install Abiotic server (example location - change it to whatever you like)**
make a directory for server files to live in `mkdir /home/abiotic/abioticserver` download the game via steamcmd forcing it to use the windows files (you'll get an error if you don't do this) `/usr/games/steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir /home/abiotic/abioticserver +login anonymous +app_update 2857200 +quit`
- 5. Configure server**
create the shell script to run your server (we're basically changing the .bat instructions to .sh) `touch /home/abiotic/abioticserver/AbioticFactor/Binaries/Win64/runserver.sh` edit this new file with `sudo nano /home/abiotic/abioticserver/AbioticFactor/Binaries/Win64/runserver.sh` add this to the file and change your password, server name, and world save name if you import any server save from your single player etc. (thank you @sirwillis92 for the changes to this) ```
- !/bin/bash
xvfb-run wine64 /home/abiotic/abioticserver/AbioticFactor/Binaries/Win64/AbioticFactorServer-Win64-Shipping.exe -log -newconsole -useperfthreads -NoAsyncLoadingThread -MaxServerPlayers=6 -PORT=7777 -QUERYPORT=27015 -tcp -ServerPassword=yourpassword -SteamServerName="yourserver" -WorldSaveName="Cascade" ``` save and close it (ctrl+x)
- 6. Forward your ports 7777 and 27015 to your server**
- 7. Start the server by running your runserver.sh**
We can't start the .sh without getting file permissions `chmod +x /home/abiotic/abioticserver/AbioticFactor/Binaries/Win64/runserver.sh` then cross your fingers `/home/abiotic/abioticserver/AbioticFactor/Binaries/Win64/runserver.sh` you'll get a bunch of errors, but it should still work turn it off with ctrl+z
Running this as a script right in your terminal will take over your terminal so I recommend running it as a service. I seem to have to reboot between server launches but that's what LXCs are good at.
### **Run as a service**
- 1. create the service file**
`sudo nano /etc/systemd/system/abiotic.service`
- 2. Fill it with this (edit as necessary for your own setup):**
``` [Unit] Description=Abiotic Factor Server Wants=network-online.target After=network-online.target
[Service] User=abiotic Group=abiotic WorkingDirectory=/home/abiotic/abioticserver/ ExecStartPre=/usr/games/steamcmd +@sSteamCmdForcePlatformType windows +force_install_dir /home/abiotic/abioticserver +login anonymous +app_update 2857200 +quit ExecStart=/home/abiotic/abioticserver/AbioticFactor/Binaries/Win64/runserver.sh Restart=always
[Install] WantedBy=multi-user.target
```
Save it
- 3. Enable the service**
`sudo systemctl enable abiotic`
- 4. Start the service**
`sudo systemctl start abiotic`
Use stop and disable commands to do that respectively.
That's it. It will auto restart on a power cycle and always update the server files to the latest build. </markdown>
Linux run notes
I was able to get it running with xvbf-run wine64
here is a copy of what my shell script looks like:
$ cat examplestart.sh #!/bin/bash xvfb-run wine64 AbioticFactor/Binaries/Win64/AbioticFactorServer-Win64-Shipping.exe -log -newconole -useperfthreads -NoAsyncLoadingThread -MaxServerPlayers=6 -PORT=7777 -QUERYPORT=27015 -ServerPassword=ServerPassword -SteamServerName="ServerName" -WorldSaveName="Cascade"
I end up running into this error though:
LogOnline: Warning: OSS: Async task 'FOnlineAsyncTaskSteamCreateServer bWasSuccessful: 0' failed in 15.001264 seconds which seems to mean that the server is not listed on the steam server list. I am not sure how to fix this, and sine the game doesn't have a direct connect option in-game, me or my friends can't connect [2024.05.04-16.28.35:105][ 0]LogWorld: Bringing up level for play took: 0.265297 LogGameMode: Display: Match State Changed from EnteringMap to WaitingToStart [2024.05.04-16.28.35:208][ 0]LogGameMode: Display: Match State Changed from EnteringMap to WaitingToStart [2024.05.04-16.28.35:381][ 0]LogGameState: Match State Changed from EnteringMap to WaitingToStart [2024.05.04-16.28.35:382][ 0]LogLoad: Took 1.033981 seconds to LoadMap(/Game/Maps/Facility) LogInit: Display: Engine is initialized. Leaving FEngineLoop::Init() [2024.05.04-16.28.35:394][ 0]LogInit: Display: Engine is initialized. Leaving FEngineLoop::Init() [2024.05.04-16.28.35:394][ 0]LogLoad: (Engine Initialization) Total time: 3.48 seconds 0130:fixme:winsock:WS_setsockopt SO_SNDBUF ignoring request to disable send buffering 0130:fixme:winsock:WS_setsockopt SO_SNDBUF ignoring request to disable send buffering 0130:fixme:winsock:WS_setsockopt SO_SNDBUF ignoring request to disable send buffering 0130:fixme:winsock:WS_setsockopt SO_SNDBUF ignoring request to disable send buffering 0130:fixme:winsock:WS_setsockopt SO_SNDBUF ignoring request to disable send buffering LogOnline: Warning: OSS: Async task 'FOnlineAsyncTaskSteamCreateServer bWasSuccessful: 0' failed in 15.001264 seconds [2024.05.04-16.28.50:232][443]LogOnline: Warning: OSS: Async task 'FOnlineAsyncTaskSteamCreateServer bWasSuccessful: 0' failed in 15.001264 seconds 015c:fixme:advapi:ReportEventW (00000000CAFE4242,0x0002,0x0000,0x80000002,0000000000000000,0x0001,0x00000000,00000000198AFC48,0000000000000000): stub
---
I was able to resolve this by adding the -tcp tag to the startup command (i placed it after the QUERYPORT tag. This has now loaded the game server 3 times in a row and is visible in the steam server list
xvfb-run wine64 AbioticFactor/Binaries/Win64/AbioticFactorServer-Win64-Shipping.exe -log -newconole -useperfthreads -NoAsyncLoadingThread -MaxServerPlayers=6 -PORT=7777 -QUERYPORT=27015 -tcp -ServerPassword=ServerPassword -SteamServerName="ServerName" -WorldSaveName="Cascade"
LogOnlineSession: Display: OSS: Session creation completed. Automatic start is turned on, starting session now. [2024.05.04-16.53.14:337][ 23] LogOnlineSession: Display: OSS: Session creation completed. Automatic start is turned on, starting session now.
---
If you want to transfer your SaveGame from an ingame hosted lobby, you can take a look at your local PC. (%appdata%\Local\AbioticFactor\Saved\SaveGames\YOURMAPNAME).
Start the dedicated server once, to let the server create all neccessary folders.
Upload your local savegame to "abioticserver/AbioticFactor/Saved/SaveGames/Server/Worlds" and change the map name in your startparamter of the server.
---
I just did a manual 'steamcmd' install, and my run command is
WINEDEBUG=-all wine64 /srv/gameserver/fox/abiotic/AbioticFactor/Binaries/Win64/AbioticFactorServer-Win64-Shipping.exe -multihome=192.168.210.210 -useperfthreads -MaxServerPlayers=6 -PORT=7777 -QUERYPORT=27015 -ServerPassword=blahblah -SteamServerName="Together" -WorldSaveName="Together"
where "Together" should be replaced by your save name.
---
I had a problem "wine64: not found" I fixed it by running this. I'm on an AMD Ryzen running Ubunt 24.04 server.
sudo apt install --install-recommends winehq-stable wine-stable:amd64 wine-stable-amd64:amd64 wine-stable-i386:i386
---
I had issues setting up the server on Ubuntu 24 but was able to get past them by doing the following:
- Following the Wine instructions for installing wine on my machine (Apparently it's quite specific to linux distro and hardware)
- Using "wine" in the wine server file instead of "Wine64"
- I got an error loading a DLL at some point and followed the solution on this page:
- Every time I stop the server I have to restart the machine to get it to run again. No idea why.
To enable DLC content I did the following:
I found the admin.ini file here:
/home//abioticserver/AbioticFactor/Saved/SaveGames/Server
And added my Steam ID to it.
You can lookup your 17 digit Steam ID by opening the Steam app, clicking on your Icon, and going to Account Details. I pasted mine over one of the example IDs in the admin.ini.
Linux performance note
Remove -NoAsyncLoadingThread from parameters for better server performance.
Dedicated Server in Windows
https://github.com/DFJacob/AbioticFactorDedicatedServer/wiki
https://github.com/DFJacob/AbioticFactorDedicatedServer/wiki/Guide-%E2%80%90-Quickstart
login anonymous force_install_dir <DesiredPath> app_update 2857200 validate
Edit
\(Server Install)\AbioticFactor\Binaries\Win64\RunServer.bat
Open RunServer add the following:
AbioticFactorServer-Win64-Shipping.exe -log -newconsole -useperfthreads -NoAsyncLoadingThread -MaxServerPlayers=6 -PORT=7777 -QueryPort=27015 -ServerPassword=YourServerPassword -AdminPassword=YourAdminPassword -SteamServerName="Your Server Name"
Ensure you replace YourServerPasword and "Your Server Name" with the correct info. If you don't want a password to access the admin menu in-game, remove the -AdminPassword= launch parameter RunServer.bat, this allows you to double click it to run the server.
Run the server and check if a console window appears.
If you didn't use the -AdminPassword launch parameter, you will need to manually add your SteamID (Doesn't work for Xbox or Playstation) to the server config. Close the server and navigate to \(Server Install)\AbioticFactor\Saved\SaveGames\Server\Admin.ini. Edit this file and add your SteamID under [Moderators], eg: Moderator=76561198053306820
Use RunServer again, if you can't see the server in the server browser you may have to port forward 7777 and 27015