Will your machine carry a galaxy?
Boxelware publishes one hardware bar, and it is for servers it vouches for. To earn the blue Verified checkmark in the server list, a server needs 16 GB or more of memory available to the game once the operating system has taken its share, and at least four real CPU cores, threads not counted. That is a quality seal for busy public servers, not the least a galaxy will start on; Boxelware gives no figure for a small private one.
- Player count: the default cap is 10 (community wiki). Boxelware itself reminded players in September 2020 that Avorion isn't an MMO, and that a higher number in server.ini is not automatically a good idea.
- Threads: the community wiki suggests one worker thread per hardware thread, and two or more generator threads, which build new sectors as people explore, but fewer than the machine has threads.
- Operating system: Steam lists 64-bit builds for Windows and Linux. We take that to mean an Intel or AMD processor and would steer you away from ARM machines; that is our own reading, not something Boxelware says.
The server that fits
Per the community wiki, Avorion keeps the sectors around players alive in memory and spreads the simulation across threads, so the thing you want is a machine where nothing else competes for them. Our game server hosting gives you a whole physical server for the galaxy, configured to your requirements with the operating system you pick, on a port that is not shared with any other customer at the access switch. For the Verified bar, choose four or more physical cores and 16 GB free after Linux.
- Five cities to put it near your players: Bucharest, Amsterdam, New York, Miami or San Francisco. See our data centers.
- Every server ships with one IPv4 address and an unmetered port, so nobody counts what your players download.
- A machine that is already racked is yours in about 30 minutes, though payment verification can add time; a custom configuration needs 4-24 hours when the parts are on hand.
- On rack servers and blades you also get a remote console you can open yourself after adding a console login in the dashboard, handy if a firewall rule ever locks you out.
- Support by live chat, email and phone, 24/7, and no contract: one month is the default term.
Where the instructions come from
We found no server guide on avorion.net itself: the site's FAQ never mentions dedicated servers, and the Wiki button leads to a community-edited wiki hosted by Fandom, whose server page is flagged as outdated. So this page leans on Boxelware's own Steam patch notes and Boxelware staff answers on its forum first, Valve's SteamCMD page for the install, and labels anything that only the community wiki says.
Up and running in an evening
- Install Ubuntu on the server and log in over SSH with your own account.
- Install SteamCMD from Ubuntu's multiverse repository, as Valve recommends. You will be asked to accept the Steam licence: do that before pasting the next block.
- Create an account just for the game, because Valve says not to run SteamCMD as root.
- Set up the firewall before the game listens: IPv6 first, then SSH, switch it on, then open the game ports.
- Download the server, then run it one time in the foreground with your SteamID.
sudo add-apt-repository multiverse
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install steamcmd
# A home for the game, with no login shell
sudo useradd -m -s /usr/sbin/nologin avsrv
# IPv6 on before rules are added, SSH allowed, firewall on
sudo sed -i 's/^IPV6=.*/IPV6=yes/' /etc/default/ufw
sudo ufw allow OpenSSH
sudo ufw --force enable
# Game ports
sudo ufw allow 27000
sudo ufw allow 27003/udp
sudo ufw allow 27020/udp
sudo ufw allow 27021/udp
# Download Avorion Dedicated Server (app 565060)
sudo -u avsrv -H bash -c 'mkdir -p /home/avsrv/galaxies && /usr/games/steamcmd +force_install_dir /home/avsrv/avorion +login anonymous +app_update 565060 validate +quit'
# Create the galaxy and make yourself its admin
sudo -u avsrv -H bash -c 'cd /home/avsrv/avorion && bash server.sh --galaxy-name frontier --datapath /home/avsrv/galaxies --admin YOUR_STEAMID64'
Put your 17-digit SteamID where it says YOUR_STEAMID64; Boxelware's team says the ID is the 64-bit form. Once the startup text settles, type /save and then /stop. That first run, per the community wiki, writes out the config files for the galaxy, and your galaxy now lives in /home/avsrv/galaxies/frontier. You may read on the same wiki that closing the server's window harms the save; that advice is older than patch 0.17.1, where Boxelware gave the server a clean shutdown on Ctrl-C and on a closed console window alike. Under systemd, systemctl stop sends it that same Ctrl-C.
Letting your players in
- 27000, TCP and UDP: the game itself.
ufw allow 27000above opens both protocols. - 27003, UDP: polling. Boxelware's team said in 2016 that it has to be reachable for people to join over the internet.
- 27020 and 27021, UDP: the two Steam ports. The numbers come from the community wiki; the names (Steam query port, Steam port) from a server log a player posted on Boxelware's forum.
- 27015, TCP: RCON, the remote console. It stays closed here, and you will reach it through SSH instead.
Boxelware added command-line options for the ports in 0.10.2 (run the server with --help to see the names your version accepts), but its team told hosters not to change polling port 27003, so leave that one alone. Planning another galaxy on this box? Boxelware never documented two on one address, and players on its forum who tried ended up giving the second server an IP of its own. So add a second IPv4 address to the server, give the galaxy its own folder, service and server.ini, bind it to the new address (community posts use --ip; check --help), and test it from outside before your friends try.
Keeping it running by itself
A systemd service starts the galaxy whenever the machine boots and revives it if it crashes. Save this as /etc/systemd/system/avorion-galaxy.service:
[Unit]
Description=Avorion galaxy frontier
After=network-online.target
Wants=network-online.target
[Service]
User=avsrv
WorkingDirectory=/home/avsrv/avorion
ExecStart=/bin/bash /home/avsrv/avorion/server.sh --galaxy-name frontier --datapath /home/avsrv/galaxies
# Ctrl-C equivalent, the clean shutdown
KillSignal=SIGINT
TimeoutStopSec=300
Restart=always
RestartSec=15
[Install]
WantedBy=multi-user.target
Make systemd read the new file by running sudo systemctl daemon-reload. After that, sudo systemctl enable --now avorion-galaxy starts it now and at every boot, and journalctl -u avorion-galaxy -f follows its output. Two things to know. The 300-second stop timeout is our own pick, so give a large galaxy more if its save takes longer. And because Restart=always revives the server whenever it exits, an in-game /stop brings it straight back; sudo systemctl stop avorion-galaxy is how you take it down for real.
Your rules: server.ini, admins and RCON
Your galaxy folder holds server.ini, admin.xml, modconfig.lua, the world itself and the logs. Stop the service before you edit server.ini: the community wiki notes the server saves its settings into that file on shutdown, overwriting your changes. From version 1.1.3 on, the server also writes out a documentation file explaining each setting, the most reliable guide for your version. The table below is drawn from the settings list on the community wiki, whose page is flagged outdated.
| Setting | What it changes for you |
|---|---|
| name, description | How the galaxy appears in the server list |
| password | A password your friends type to join |
| maxPlayers | How many can be online at once |
| isListed, useSteam | Public listing; the wiki says listing needs Steam networking |
| saveInterval | How often the galaxy is written to disk |
| rconPassword | Turns RCON on; leave it blank and RCON stays off |
Admins are kept in admin.xml, and since patch 0.10.2 adding --admin again no longer wipes the existing ones, which is why the service above leaves it out. To use RCON, which Boxelware put on TCP 27015 and which speaks both the Rust and Valve protocols, set the password, keep the port closed, and reach it through an SSH tunnel from your own computer, forwarding a local port to 127.0.0.1 port 27015 on the server with your own login. Then run sudo chmod 600 on server.ini, since the password is stored there in plain text, and look at its permissions again after a restart, because the server rewrites that file when it shuts down.
Adding mods your players get automatically
Since Boxelware's 0.23 update, you list Steam Workshop mods in a modconfig.lua file in the galaxy folder. The server downloads them, and anyone who joins receives them without subscribing; patch 2.5.8 made the server better at updating them when it starts. Achievements used to be off on any modded galaxy; since patch 2.3 you can choose to enable Steam achievements with mods active.
Going by the community wiki's example, the file has a mods list with one {workshopid = "..."} entry per server mod and an allowed list for client-side mods your players may run. Every mod the server loads is switched on, so to drop one, comment its line out and restart the service.
Keeping the galaxy safe
You manage the server; we keep the hardware and the network running. So the galaxy backups are yours. Avorion does make hourly emergency backups, but Boxelware's notes are clear that restoring one returns what the players had and starts every NPC faction over. For a copy you can truly go back to, Boxelware's 0.32 beta notes suggest copying the galaxy folder. Doing that with the server stopped, as below, is our addition: nothing is half-written while you copy. Work in one terminal so the file name holds even if midnight passes.
- Name the file:
BACKUP=/root/galaxy-$(date +%F).tar.gz - Stop:
sudo systemctl stop avorion-galaxy - Copy:
sudo tar -C /home/avsrv -czf "$BACKUP" galaxies - Check it opens:
sudo tar -tzf "$BACKUP" | head - Update while it is down: rerun the SteamCMD download line from the setup block, the one containing
+app_update 565060. - Start again:
sudo systemctl start avorion-galaxy - Take it home: your login cannot read /root, so
sudo install -m 600 -o $USER "$BACKUP" ~/makes a copy you own, which you then fetch withscpfrom your computer. - Roll back later: first
sudo test -f "$BACKUP" && echo found(no output means stop and look), then stop the service,sudo mv /home/avsrv/galaxies/frontier /home/avsrv/galaxies/frontier.old,sudo tar -C /home/avsrv -xzf "$BACKUP", and start the service.
The community wiki wants a fresh backup ahead of any update, and it cautions that returning a galaxy from the beta branch to the default branch will most likely corrupt it. If your group also plays other building games, our Space Engineers guide covers a similar setup, and Linux servers lists the distributions we install.
Questions people ask
- Do I need a Steam account on the server?
- No. Avorion Dedicated Server is a free download on Steam, and you download it through SteamCMD's anonymous login (
+login anonymous). You only need your own SteamID, which goes to--adminon the first start. - Where is my galaxy saved?
- In the folder you gave
--datapath, inside a subfolder named after the galaxy, here/home/avsrv/galaxies/frontier. If you leave out--datapath, the community wiki says Linux uses~/.avorion/galaxies. - My friends cannot see the server. What should I check?
- First, the three UDP ports (27003, 27020, 27021) must be open along with 27000. Then that
isListedis true and Steam networking is on in server.ini, and that you edited the file while the service was stopped, or your change was overwritten on shutdown. - Can I try the beta branch?
- Yes, by adding
-beta betato the SteamCMD update command beforevalidate. Take a backup first: the community wiki warns that going back from beta to the default branch will most likely corrupt the galaxy. - Is hosting from my own PC enough?
- For a few friends who play together, often yes: the game ships its own server launcher, and Boxelware's team has noted that it accepts command-line options as well. A separate server pays off once the galaxy should stay open while you are offline.