Jump to content

ANEURISM IV/Dedicated servers

From Vellocet Developer Community

A dedicated server runs the world without a player occupying the host computer. This guide uses a Linux x86-64 machine, Bash, and SteamCMD. Run the server under a normal Linux user account that owns its installation and data directories.

The examples install the preview branch for version 20-preview1. Players can select preview in Steam under ANEURISM IV → Properties → Betas.

Install the server

Install SteamCMD using Valve's instructions for your Linux distribution. Then create separate directories for the game files and saved data:

umask 077
mkdir -p "$HOME/aneurism/server" "$HOME/aneurism/data"
steamcmd +force_install_dir "$HOME/aneurism/server" \
  +login anonymous +app_update 2832030 -beta preview validate +quit

If Steam reports that the account has no subscription, replace anonymous with your Steam account name and complete the Steam Guard prompts. Leave your Steam password out of the command.

The dedicated-server download uses Steam App ID 2832030. The installed steam_appid.txt must contain the game's App ID, 2773280. These IDs have different purposes. If that file is missing or has another value, validate the installation again.

Set the owner and startup settings

Create ~/aneurism/server.env:

cat > "$HOME/aneurism/server.env" <<EOF
ANIV_COMMUNITY_OWNER_STEAM_ID=YOUR_STEAM_ID64
ANIV_SERVER_NAME='My ANEURISM server'
ANIV_MAX_PLAYERS=32
ANIV_MAP=aneurismiv
ANIV_ROTATION=persistent-world
ANIV_SERVER_PASSWORD=''
ANIV_DATA_ROOT='$HOME/aneurism/data'
EOF
chmod 600 "$HOME/aneurism/server.env"

Open the file in a text editor and replace YOUR_STEAM_ID64 with your personal 17-digit SteamID64. Use your account's numeric ID, not a profile nickname or a server's Steam ID. You can find your Steam ID in Steam account details.

The owner is recorded when the database is first created. Keep the same owner setting on later starts. Changing the environment variable doesn't transfer ownership.

Set ANIV_MAP explicitly. aneurismiv selects ANEURISM IV; misery selects Misery. The configuration guide explains the remaining settings.

Start and join

Load the environment file and start the server in the foreground:

set -a
. "$HOME/aneurism/server.env"
set +a
cd "$HOME/aneurism/server"
./aniv_server.x86_64 -batchmode -nographics -logFile -

The log appears in the terminal. Steam login and relay allocation can take up to three minutes. Wait for the map to load, then open ANEURISM IV on your gaming computer, refresh Community, and join your server.

A running process alone doesn't confirm that the server is ready. If it never appears or exits during startup, check the log and the troubleshooting guide.

Keep it running with systemd

After the foreground launch works, press Ctrl+C and wait for the process to exit before starting a service. The following user service uses the same files and sends logs to the system journal.

Create the directory:

mkdir -p "$HOME/.config/systemd/user"

Save this as ~/.config/systemd/user/aniv.service:

[Unit]
Description=ANEURISM IV community server
StartLimitIntervalSec=300
StartLimitBurst=3

[Service]
Type=simple
WorkingDirectory=%h/aneurism/server
EnvironmentFile=%h/aneurism/server.env
ExecStart=%h/aneurism/server/aniv_server.x86_64 -batchmode -nographics -logFile -
Restart=on-failure
RestartSec=15
TimeoutStopSec=120
SendSIGKILL=no
UMask=0077

[Install]
WantedBy=default.target

Start it with:

systemctl --user daemon-reload
systemctl --user enable --now aniv.service
systemctl --user status aniv.service
journalctl --user -u aniv.service -n 100 --no-pager

To keep the user service running after logout and start it at boot, have a machine administrator enable lingering for your Linux account:

sudo loginctl enable-linger "$USER"

Use these commands for routine operation:

systemctl --user stop aniv.service
systemctl --user start aniv.service
systemctl --user restart aniv.service
journalctl --user -u aniv.service -f

The service waits for shutdown without forcing a kill. If stopping times out, inspect the process and log before updating files or making a backup. A manual stop keeps the server stopped even though crash recovery is enabled.

Network access

Allow the server to reach Steam and HTTPS services. Community gameplay uses Steam Relay; leave unsolicited inbound traffic blocked. You don't need to forward UDP 7777, 27015, or 27016.

Steam uses local UDP ports 27015 and 27016. They must be free for this process. For multiple servers on one machine, give each instance a separate network namespace or virtual machine, as well as its own data directory. Changing a gameplay port doesn't change these Steam service ports.

Community administration happens through the connected game client.

Optional persistent Steam identity

Anonymous Steam login works for normal hosting. Its server identity can change after a restart. To use a persistent identity, create a game server login token at Steam Game Server Account Management for App ID 2773280. Use a separate token for each server that runs at the same time.

The executable accepts -gslt. For a foreground launch, load server.env as above, then enter the token at a hidden prompt:

cd "$HOME/aneurism/server"
read -r -s -p 'Steam game server login token: ' ANIV_GSLT
printf '\n'
./aniv_server.x86_64 -batchmode -nographics -logFile - -gslt "$ANIV_GSLT"
unset ANIV_GSLT

This keeps the token out of shell history, but the running process's arguments can still expose it to users with sufficient machine access. Keep tokens out of shared logs, screenshots, and configuration examples. The systemd example above uses anonymous login.

A rejected or malformed token stops startup. The server won't retry that launch anonymously. The login token controls the server's Steam identity; your personal ANIV_COMMUNITY_OWNER_STEAM_ID still controls ownership.