How to setup a dedicated server for Avorion
Publisher: Psychz Networks, March 16,2021Avorion is a procedural co-op space platform for players to build their own space ships out of dynamically scalable blocks. Fight space battles, explore, mine, trade, wage wars, and build your own empire to save your galaxy from being torn apart by an unknown enemy.
In the following article, we will configure Avorion on a Linux Ubuntu 18 platform.
- System Confirguration
- Port Configuration
- Update Ubuntu
- Installing Avorion
- Running Avorion
- Save and Stop Server
Recommended System Configuration
- Requires a 64-bit processor and operating system
- OS: Ubuntu 12.04 or higher
- Processor: Intel i5 @ 3.3 GHz or AMD equivalent
- Memory: 6 GB RAM
- Storage: 3 GB available space
Port Configuration
The UDP and TCP ports that will engage for the game must be forwarded to the machine that runs the game. These ports will need to be opened for the game to run by default:
27000 - UDP & TCP
27003 - UDP
27020 - UDP
27021 - UDP
Update Ubuntu 18 for latest libraries
# sudo apt-get update
Output
Get:2 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [1,228 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,913 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [394 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [256 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted Translation-en [34.3 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,718 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [1,561 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [363 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1,109 kB]
Fetched 8,828 kB in 19s (462 kB/s)
Reading package lists... Done
If you are using 64-bit distribution, you need to install a package named lib32gcc1 or ia32-libs. This is because Steam is compiled for i386 architecture only.
# sudo dpkg --add-architecture i386
# sudo apt-get install lib32z1 libncurses5:i386 libbz2-1.0:i386 lib32gcc1 lib32stdc++6 libtinfo5:i386 libcurl3-gnutls:i386
# sudo apt-get install steamcmd
Output
Building dependency tree
Reading state information... Done
Suggested packages:
steam:i386
The following NEW packages will be installed:
steamcmd:i386
0 upgraded, 1 newly installed, 0 to remove, and 141 not upgraded.
Need to get 1,143 kB of archives.
After this operation, 4,071 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu bionic/multiverse i386 steamcmd i386 0~20130205-1 [1,143 kB]
Fetched 1,143 kB in 1s (1,804 kB/s)
Preconfiguring packages ...
Selecting previously unselected package steamcmd:i386.
(Reading database ... 68542 files and directories currently installed.)
Preparing to unpack .../steamcmd_0~20130205-1_i386.deb ...
Unpacking steamcmd:i386 (0~20130205-1) ...
Setting up steamcmd:i386 (0~20130205-1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Installing Avorion Server
We will now install the game server. You need to login into your Steam account to download the game files. 565060 is Avorion AppID on the steam server.
Run the following command from the steam directory. Note: avorion_server is the folder name that you can replace as per your requirement.
# ./steamcmd.sh +login anonymous +force_install_dir avorion_server +app_update 565060 validate +exit
Output
Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Update state (0x11) preallocating, progress: 65.89 (79286483 / 120337650)
Warning: failed to init SDL thread priority manager: SDL not found
Update state (0x61) downloading, progress: 62.83 (75606880 / 120337650)
Update state (0x61) downloading, progress: 98.26 (118240498 / 120337650)
Success! App '565060' fully installed.
Creating a Galaxy and running server
You need to create a Galaxy after a fresh install of the game. Use the following code to create a Galaxy.
Note: You need to be inside the directory where you have stored your Avorion game files
# ./server.sh --galaxy-name my_galaxy --admin psychz_net --datapath ~/avorion_server/galaxy
Where
1. <GALAXYNAME>: name of your galaxy
2. <ADMIN>: your SteamID to make sure you are the admin of the server
3. <GALAXY_PATH>: the folder where the galaxies should be stored
Output:
Server is VAC Secure!
Game Server Steam ID: 90144120851566598
Game Port: 27000
Steam Port: 27021
Steam Query Port: 27020
Query Port: 27003
Steam Networking initialized.
Warning: No RCON password set. RCON disabled.
Found 0 mods in "/root/avorion_server/galaxy/my_galaxy/modconfig.lua".
name: Avorion Server
seed: bv9a2fdHhF
port: 27000
max online players: 10
save interval: 600
broadcast interval: 5
max loaded sector time: 300
weak update: yes
worker threads: 3
generator threads: 2
script background threads: 2
difficulty: Veteran
scenario: Normal
tutorial: no
collision: 1
access list: Blacklist
multiplayer: yes
vac secure: yes
listed: no
steam networking: yes
send crash reports: yes
Backup creation enabled. Path: "/root/.avorion/backups"
Please ensure that the server has write-access to that path.
administrators: 'psychz_net
Commands file: /root/avorion_server/galaxy/my_galaxy/commands.txt
Initializing sector database...
Initializing faction database...
Starting up 3 worker threads...
Starting up 2 script background threads..
Loading groups...
Loading script data...
Galaxy initialized.
Server startup complete.
Save and Stop sever
To stop the server, make sure you use /save command to save all your progress, followed by /stop command to stop the server.
/save
Output
Triggered saving of all server data.
All sectors saved successfully.
/stop
Output
Server is shutting down.
Saving settings...
Saving script values...
Saving factions...
Saving sectors...
Saving groups...
Saving galaxy script data...
Saving settings...
waiting for unfinished sector generation jobs...
waiting for unfinished sector save jobs...
shutting down rcon...
shutting down networking...
cleaning up communicators...
waiting for sector database termination...
waiting for faction database termination...
shutting down galaxy...
shutting down faction database...
shutting down sector database...
cleaning up timers...
Server shutdown successful.
Congratulations!! You have successfully installed and launched Avorion on your Linux server. You can invite your friends or other online players by sharing your public IP address so they can look up your server online and join the game. An Avorion server can be joined by selecting the Multiplayer option on the main menu, selecting a character, and entering the server's IP and port.
A list of servers you have recently played is saved under "Join via IP" in Multiplayer.
We hope you have found this guide helpful and could successfully deploy Avorion on your Ubuntu server. Please click on the up-vote button to show your appreciation.