Skip to content

Commit

Permalink
Enshrouded configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
mbround18 committed Jan 26, 2024
1 parent 37fa412 commit 6751181
Show file tree
Hide file tree
Showing 11 changed files with 90 additions and 556 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tmp/
docs/
.idea/
16 changes: 8 additions & 8 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 11 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
# --------------- #
FROM steamcmd/steamcmd:ubuntu

ARG WINEARCH=win64
ARG WINE_MONO_VERSION=4.9.4

ENV TZ=America/Los_Angeles
ENV PYTHONUNBUFFERED=1
ENV DISPLAY=:0
ENV DISPLAY=:1
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update \
Expand All @@ -17,7 +19,7 @@ RUN apt-get update \
netcat curl wget zip unzip \
cron sudo gosu dos2unix jq \
tzdata python3 python3-pip \
lib32z1 lib32gcc-s1 lib32stdc++6 \
# lib32z1 lib32gcc-s1 lib32stdc++6 \
&& rm -rf /var/lib/apt/lists/* \
&& gosu nobody true \
&& dos2unix
Expand Down Expand Up @@ -46,28 +48,14 @@ RUN apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic mai
RUN apt-get install -y --install-recommends winehq-stable winbind
ENV WINEDEBUG=fixme-all

# Setup a Wine prefix
ENV WINEPREFIX=/root/.demo
ENV WINEARCH=win64
RUN winecfg

# Install Mono
RUN wget -P /mono http://dl.winehq.org/wine/wine-mono/4.9.4/wine-mono-4.9.4.msi
RUN wineboot -u && msiexec /i /mono/wine-mono-4.9.4.msi
RUN rm -rf /mono/wine-mono-4.9.4.msi

# Install Winetricks
RUN apt-get install -y cabextract
RUN wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
RUN chmod +x winetricks
RUN cp winetricks /usr/local/bin
ADD --chmod=755 https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks /usr/local/bin/winetricks

# Install Xvfb
RUN apt-get install -y xvfb

# Install Visual C++ Redistributable
RUN #wineboot -u && xvfb-run winetricks vcrun2022

# Container informaiton
ARG GITHUB_SHA="not-set"
ARG GITHUB_REF="not-set"
Expand All @@ -93,23 +81,25 @@ ENV PATH="/home/steam/.local/bin:${PATH}"

# Setup a Wine prefix
ENV WINEPREFIX=/home/steam/.wine
ENV WINEARCH=win64
ENV WINEARCH=${WINEARCH}
RUN winecfg

# Install .NET Framework 4.5.2
RUN wineboot -u && winetricks -q dotnet45
# Install Mono
ADD https://dl.winehq.org/wine/wine-mono/${WINE_MONO_VERSION}/wine-mono-${WINE_MONO_VERSION}.msi /mono/wine-mono-${WINE_MONO_VERSION}.msi
RUN wineboot -u && sudo msiexec /i /mono/wine-mono-${WINE_MONO_VERSION}.msi \
&& sudo rm -rf /mono/wine-mono-${WINE_MONO_VERSION}.msi

COPY --chown=${PUID}:${PGID} ./Pipfile ./Pipfile.lock /home/steam/scripts/

RUN pip3 install pipenv \
&& cd /home/steam/scripts \
&& pipenv install --system --deploy --ignore-pipfile \
&& pip3 uninstall -y pipenv \
&& sudo chown -R steam:steam /home/steam

COPY --chown=${PUID}:${PGID} ./scripts /home/steam/scripts

EXPOSE 15636 15637
EXPOSE 27015/udp

RUN echo "source /home/steam/scripts/utils.sh" >> /home/steam/.bashrc

Expand Down
73 changes: 29 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,52 @@
# enshrouded Server
# Enshrouded Server

🌟 Welcome to the ultimate enshrouded Server Setup! 🌍 This GitHub repository is your go-to toolkit 🛠️ for launching a enshrouded server in a snap using Docker! Choose from preset worlds like 'casual' 🏖️, 'normal' 🌆, or 'hard' 🌋, or dive deep into customization with flexible settings 🎛️.
🌟 Welcome to the ultimate enshrouded Server Setup!
🌍 This GitHub repository is your go-to toolkit
🛠️ for launching an enshrouded server in a snap using Docker!

## Disclaimer!

## !!Notice!! Bug with saves, developers of enshrouded working hard to fix!
The developer of this docker does not own the game and therefore cannot test.
The docker was built using the information provided by the developer of the game.
If you are inclined to do so a gift of this game would be
appreciated.`https://steamcommunity.com/id/MBRound18`

With the [recent bug on save corruption](https://www.ign.com/articles/enshrouded-dev-working-to-fix-serious-bugs-including-lost-save-data),
we highly recommend you backup your save files! [Click here to see how to integrate auto backups.](./docs/compose-with-backups.md)
## Dont forget to backup your saves!

we highly recommend you back up your save files! [Click here to see how to integrate auto backups.](./docs/compose-with-backups.md)

## Prerequisites

- Docker
- Docker Compose

## Configuration Options

The server can be configured either through environment variables or by passing arguments directly to the Docker container. The available presets are:
[They were configured based on this article](https://www.gtxgaming.co.uk/best-world-settings-for-enshrouded/)

- `casual`
- `normal`
- `hard`

Additionally, you can customize the following settings:

- `DAY_TIME_SPEED_RATE`: Control the speed of day time.
- `NIGHT_TIME_SPEED_RATE`: Control the speed of night time.
- `EXP_RATE`: Experience points rate.
- (And so on for each configurable option...)

To see a full list of supported configuration options, see the [Environment Configuration Options](./docs/environment_variables.md) page.

## Using Docker Compose

To run the server with Docker Compose, you first need to create a `docker-compose.yml` file in the root of this repository with the following content:

```yaml
version: "3.8"
services:
enshrouded:
image: mbround18/enshrouded-docker:latest
build:
context: .
dockerfile: Dockerfile
platforms:
- linux/amd64
environment:
PRESET: "casual" # Options: casual, normal, hard
# Optionally override specific settings:
# DAY_TIME_SPEED_RATE: '1'
# NIGHT_TIME_SPEED_RATE: '1'
# And so on...
SERVER_NAME: "My Enshrouded Server" # Optional, Name of the server
# PASSWORD: "" # Optional, Password for the server
# SAVE_DIRECTORY: ./savegame # Optional, Save directory for the game
# LOG_DIRECTORY: ./logs # Optional, Log directory for the server
# SERVER_IP: 0.0.0.0 # Optional, IP address for the server
# GAME_PORT: 15636 # Optional, Game port for the server
# QUERY_PORT: 15637 # Optional, Query port for the server
# SLOT_COUNT: 16 # Optional, Number of slots for the server
ports:
- "8211:8211" # Default game port
- "27015:27015" # steam query port
- "15636:15636"
- "15637:15637"
volumes:
- "./data:/home/steam/enshrouded"
- ./data:/home/steam/enshrouded
```
### Running the Server
Expand All @@ -61,17 +57,6 @@ To start the server with your chosen configuration, run:
docker-compose up
```

This command builds the Docker image if necessary and starts the server. The `PRESET` environment variable determines the server's configuration preset. You can also override any specific setting by adding it to the `environment` section of the `docker-compose.yml` file.

### Custom Configuration

If you wish to customize the server beyond the provided presets, simply add or modify the environment variables in the `docker-compose.yml` file. For example, to set a custom experience rate, you would add:

```yaml
environment:
EXP_RATE: "1.5"
```
## Updating Server Settings

To update the server settings after initial setup, modify the `docker-compose.yml` file as needed and restart the server:
Expand All @@ -86,4 +71,4 @@ This process ensures that your server configuration is always up to date with yo
## Contributions

Contributions to this project are welcome! Please submit a pull request or open an issue for any bugs, features, or improvements.
# enshrouded-docker

9 changes: 8 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ services:
platforms:
- linux/amd64
environment:
PRESET: "Normal"
SERVER_NAME: My Enshrouded Server # Optional, Name of the server
# PASSWORD: "" # Optional, Password for the server
# SAVE_DIRECTORY: ./savegame # Optional, Save directory for the game
# LOG_DIRECTORY: ./logs # Optional, Log directory for the server
# SERVER_IP: 0.0.0.0 # Optional, IP address for the server
# GAME_PORT: 15636 # Optional, Game port for the server
# QUERY_PORT: 15637 # Optional, Query port for the server
# SLOT_COUNT: 16 # Optional, Number of slots for the server
ports:
- "8211:8211"
- "27015:27015"
Expand Down
2 changes: 1 addition & 1 deletion palworld.iml → enshrouded.iml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Pipenv (palworld)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Pipenv (enshrouded-docker)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Loading

0 comments on commit 6751181

Please sign in to comment.