Subnautica is an open world survival action-adventure video game developed and published by Unknown Worlds Entertainment. In it, players are free to explore the ocean on an alien planet, known as planet 4546B, after their spaceship, the Aurora, crashes on the planet's surface. Note: NitroxMod version >=1.7.0.0 is required
Subnautica is an open world survival action-adventure video game developed and published by Unknown Worlds Entertainment. In it, players are free to explore the ocean on an alien planet, known as planet 4546B, after their spaceship, the Aurora, crashes on the planet's surface. The multiplayer function is provided by the mod "Nitrox". This mod is still in alpha version and therefore not yet fully stable.
To download the base game, you will need to authenticate against Steam. Because of the normally active Steamgaurd protection, it is important to enter the Steamgaurd code. Once the initial installation is complete, you will need to enter the Steamguard code that will be emailed to you and then reinstall the server.
This will only work if you receive Steamguard codes via mail. The Authenticator app is not supported.
NitroxMod version >=1.5.0.0 is required for this egg
The nitrox server requires only the default Server port.
| Port | default |
|---|---|
| Server | any |
| Name | Tag |
|---|---|
| ghcr.io/ptero-eggs/yolks:dotnet_9 | ghcr.io/ptero-eggs/yolks:dotnet_9 |
The ID corresponding to the game to download.
Your Steam-Account SUername
Your Steam Account Password
Yout Steam Guard Code
Which version of Nitrox to install and use. Use the version e.g. 1.5.0.1 or latest for the newest release
Time between auto saves specified in milliseconds
Disables Auto Save: False / True
The save name for the server.
Password neccessary for connecting to the Server
If specified, players must provide this password to gain access to administrator commands on the server.
Game Mode setting: SURVIVAL, FREEDOM, HARDCORE, CREATIVE
If set to true, the server will try to open port on your router via UPnP
Switch between savegame formats. Possible values: PROTOBUF, JSON
Leave this as is
Leave this as is
#!/bin/bash
# Installation Script
#
# Install dependencies
dpkg --add-architecture i386
apt update
apt -y --no-install-recommends install curl jq unzip libstdc++6 ca-certificates libsdl2-2.0-0:i386
## Get latest Nitrox-Mod build
## get release info and download links
GITHUB_PACKAGE="SubnauticaNitrox/Nitrox"
VERSION=${NITROX_VERSION}
MATCH="Nitrox"
LATEST_JSON=$(curl --silent "https://api.github.com/repos/${GITHUB_PACKAGE}/releases/latest")
RELEASES=$(curl --silent "https://api.github.com/repos/${GITHUB_PACKAGE}/releases")
# arch detection
_arch=$(uname -m)
case "${_arch}" in
x86_64|amd64) ARCH_TAG="linux_x64" ;;
aarch64|arm64) ARCH_TAG="linux_arm64" ;;
*) ARCH_TAG="linux_x64" ;;
esac
select_asset_url() {
local json="$1"
local arch_tag="$2"
url=$(echo "$json" | jq -r --arg arch "$arch_tag" '.assets[] | select(.name != null) | select((.name | test($arch; "i"))) | .browser_download_url' | head -n1)
if [ -z "$url" ]; then
url=$(echo "$json" | jq -r '.assets[] | select(.name | test("linux"; "i")) | .browser_download_url' | head -n1)
fi
if [ -z "$url" ]; then
url=$(echo "$json" | jq -r '.assets[0].browser_download_url')
fi
printf "%s" "$url"
}
if [ -z "${VERSION}" ] || [ "${VERSION}" == "latest" ]; then
RELEASE_JSON="${LATEST_JSON}"
DOWNLOAD_URL=$(select_asset_url "$RELEASE_JSON" "$ARCH_TAG")
else
RELEASE_JSON=$(echo "${RELEASES}" | jq -c --arg VERSION "$VERSION" '.[] | select(.tag_name == $VERSION)' )
if [ -z "$RELEASE_JSON" ]; then
echo "Requested Nitrox version ${VERSION} not found, defaulting to latest"
RELEASE_JSON="${LATEST_JSON}"
fi
DOWNLOAD_URL=$(select_asset_url "$RELEASE_JSON" "$ARCH_TAG")
fi
if [ -z "$DOWNLOAD_URL" ] || [ "$DOWNLOAD_URL" == "null" ]; then
echo "Could not determine Nitrox download URL. Dumping available assets for debugging:"
echo "${RELEASE_JSON}" | jq '.assets[] | {name: .name, url: .browser_download_url}'
exit 1
fi
## download and install steamcmd
cd /tmp
mkdir -p /mnt/server/steamcmd
curl -sSL -o steamcmd.tar.gz https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xzvf steamcmd.tar.gz -C /mnt/server/steamcmd
cd /mnt/server/steamcmd
chown -R root:root /mnt
export HOME=/mnt/server
## Install game using steamcmd
GUARDCODE="${STEAM_GUARDCODE}"
if [ -z $GUARDCODE ]
then
echo ""
echo "### You did not specify a Steam Guardcode"
echo "### A new one should be send to you shortly"
echo "### Enter it in the startup-config after this installation is finished and reinstall the Server"
sleep 10
timeout 60 ./steamcmd.sh +login ${STEAM_USERNAME} ${STEAM_PASSWORD} +quit
exit 1
fi
[ ! -d "$HOME/subnautica" ] && mkdir $HOME/subnautica
./steamcmd.sh +set_steam_guard_code ${STEAM_GUARDCODE} +login ${STEAM_USERNAME} ${STEAM_PASSWORD} +@sSteamCmdForcePlatformType windows +force_install_dir $HOME/subnautica +app_update ${APPID} ${EXTRA_FLAGS} validate +quit
status=$?
if [ $status -ne 0 ]
then
echo ""
echo "### The Download was not successful"
echo "### Probably the entered Guardcode was wrong"
echo "### A new one should be send to you shortly"
echo "### Enter it in the startup-config after this installation is finished and reinstall the Server"
sleep 10
sleep 10
timeout 30 ./steamcmd.sh +login ${STEAM_USERNAME} ${STEAM_PASSWORD} +quit
exit 1
fi
## set up 32 bit libraries
mkdir -p $HOME/.steam/sdk32
cp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so
## set up 64 bit libraries
mkdir -p $HOME/.steam/sdk64
cp -v linux64/steamclient.so ../.steam/sdk64/steamclient.so
## Download and extract Nitrox
[ -d "$HOME/nitrox" ] && rm -rf "$HOME/nitrox"
mkdir -p "$HOME/nitrox"
cd "$HOME/nitrox"
curl -sL "$DOWNLOAD_URL" -o Nitrox.zip
unzip -q Nitrox.zip
rm Nitrox.zip
# move contents from the first directory (e.g., linux-x64) to here
FIRST_DIR=$(find . -mindepth 1 -maxdepth 1 -type d | head -n 1)
if [ -n "$FIRST_DIR" ]; then
mv "$FIRST_DIR"/* "$HOME/nitrox"/
rm -rf "$FIRST_DIR"
fi
## make everything inside nitrox executable
chmod -R +x "$HOME/nitrox" || true
## create config directory
mkdir $HOME/.config
## Create path files to Subnautica Install-Dir. Needed for versions pre 1.6.0
echo "/home/container/subnautica" > $HOME/path.txt
## Create config
if [ -e $HOME/server.cfg ]; then
echo "server settings exists"
else
echo "writing server default settings"
cat <<EOT > $HOME/server.cfg
# Server settings can be changed here
# Set to true to Cache entities for the whole map on next run.
# WARNING! Will make server load take longer on the cache run but players will gain a performance boost when entering new areas.
CreateFullEntityCache=False
# Leave blank for a random spawn position
Seed=
ServerPort=11000
# Measured in milliseconds
SaveInterval=120000
# Command to run following a successful world save (e.g. .exe, .bat, or PowerShell script).
PostSaveCommandPath=
MaxConnections=100
InitialSyncTimeout=300000
DisableConsole=False
DisableAutoSave=False
SaveName=world
ServerPassword=
AdminPassword=PleaseChangeMe
# Possible values: SURVIVAL, FREEDOM, HARDCORE, CREATIVE
GameMode=SURVIVAL
# Possible values: PROTOBUF, JSON
SerializerMode=JSON
# Possible values: NONE, PLAYER, MODERATOR, ADMIN, CONSOLE
DefaultPlayerPerm=PLAYER
#
# Default player stats below here
DefaultOxygenValue=45
DefaultMaxOxygenValue=45
DefaultHealthValue=80
DefaultHungerValue=50.5
DefaultThirstValue=90.5
# Recommended to keep at 0.1f which is the default starting value. If set to 0 then new players are cured by default.
DefaultInfectionValue=0.1
# If set to true, the server will try to open port on your router via UPnP
AutoPortForward=False
EOT
fi| Installation Image | ghcr.io/ptero-eggs/installers:debian | Installation Entrypoint | bash |
|---|