Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [FuzzyStatic/nitrox-server](https://github.com/FuzzyStatic/nitrox-server)

[Nitrox](https://github.com/SubnauticaNitrox/Nitrox) is an open-source, multiplayer modification for the game [Subnautica](https://unknownworlds.com/subnautica/). Visit the official Nitrox website [here](https://nitrox.rux.gg/download). Currently, this container pulls the latest Nitrox Server upon deployment.
[Nitrox](https://github.com/SubnauticaNitrox/Nitrox) is an open-source, multiplayer modification for the game [Subnautica](https://unknownworlds.com/subnautica/). Visit the official Nitrox website [here](https://nitrox.rux.gg/download). Currently, by default this container pulls the latest Nitrox Server upon deployment.

## Usage

Expand All @@ -25,6 +25,7 @@ services:
- "TZ=Etc/UTC" # The timezone to run Nitrox with (default=Etc/UTC)
- "SUBNAUTICA_INSTALLATION_PATH=/subnautica" # The path on the container where 'Subnautica_Data' directory is (default=/subnautica)
- "SUBNAUTICA_SAVE=My World" # Set this to your desired save name (default=My World)
- "NITROX_VERSION=latest" # Set this to change the Nitrox version used, e.g. NITROX_VERSION=1.8.1.0 (default=latest)
- "CUSTOM_NITROX_REPOSITORY=SubnauticaNitrox/Nitrox" # Set this to the fork you want to use (default=SubnauticaNitrox/Nitrox)
ports:
- "11000:11000/udp" # Nitrox
Expand All @@ -40,6 +41,7 @@ docker run -d \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e SUBNAUTICA_INSTALLATION_PATH=/subnautica \
-e NITROX_VERSION=latest \
-p 11000:11000/udp \
-v /path/to/nitrox:/config \
-v /path/to/subnautica:/subnautica \
Expand All @@ -58,6 +60,7 @@ Container images are configured using parameters passed at runtime (such as thos
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
| `-e SUBNAUTICA_INSTALLATION_PATH=/subnautica` | Subnautica game data (on the container). |
| `-e NITROX_VERSION=latest` | Nitrox server version. |
| `-v /config` | Nitrox server data storage location. |
| `-v /subnautica` | Subnautica game data goes here. |

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
- "TZ=Etc/UTC" # The timezone to run Nitrox with (default=Etc/UTC)
- "SUBNAUTICA_INSTALLATION_PATH=/subnautica" # The timezone to run Nitrox with (default=/subnautica)
- "SUBNAUTICA_SAVE=My World" # Set this to your desired save name (default=My World) (Optional)
- "NITROX_VERSION=latest" # Set this to change the Nitrox version used, e.g. NITROX_VERSION=1.8.1.0 (default=latest)
- "CUSTOM_NITROX_REPOSITORY=SubnauticaNitrox/Nitrox" # Set this to the fork you want to use (default=SubnauticaNitrox/Nitrox)
ports:
- "11000:11000/udp" # Nitrox
Expand Down
15 changes: 12 additions & 3 deletions install-nitrox.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
#!/bin/bash

# Download the latest release
echo "Downloading latest Nitrox release..."
# Download Nitrox
echo "Downloading Nitrox release..."
mkdir --parents /config/packages
cd /config/packages
curl --silent https://api.github.com/repos/"${CUSTOM_NITROX_REPOSITORY:-"SubnauticaNitrox/Nitrox"}"/releases/latest \

shopt -s nocasematch;
if [[ "${NITROX_VERSION:-"latest"}" =~ "latest" ]]
then
NITROX_URL=https://api.github.com/repos/"${CUSTOM_NITROX_REPOSITORY:-"SubnauticaNitrox/Nitrox"}"/releases/latest
else
NITROX_URL=https://api.github.com/repos/"${CUSTOM_NITROX_REPOSITORY:-"SubnauticaNitrox/Nitrox"}"/releases/tags/"${NITROX_VERSION:-"latest"}"
fi

curl --silent "$NITROX_URL" \
| grep -wo "https.*linux_x64.zip" \
| wget --output-document ./nitrox.zip --quiet --input-file -

Expand Down
Loading