Important
As of 2024-01-01, dread hunger is no longer supported by the developer and cannot be purchased from steam. This means you must already own the game on steam or otherwise have access to the files in order to be able to build this image.
A docker image for running a dedicated server for the game Dread Hunger.
To build the docker image for this server and run it locally:
- Install docker if you haven't already.
- Clone this repository:
git clone https://github.com/Laura7089/dread-hunger-docker.git. - Copy (or otherwise link) the
LinuxServerdirectory from your game installation1 into the cloned repository. - Build the image:
docker build -t dread-hunger .(don't forget that last.!). This may needsudo. - Run the server:
docker run --rm -p 7777:7777/udp dread-hunger2. This may also needsudo.
Note
For players to connect over the internet, you must have some way for other players to see your server. How to do this is out of the scope of this README, but usually involves port forwarding, a peer-to-peer VPN or using a dedicated server machine.
To connect to the server from the game:
- Run the server as above.
- Open the game.
- Open the map table, and create a lobby.
- Assemble your players in the lobby.
- When you're ready, light the boiler and sail the ship out of the harbour as normal.
- You will be presented with a prompt for an IP address. Enter the IP address for the machine that is hosting your server (see above). If you've changed the port, enter your custom port instead of the default value.
- You and your players should connect. Enjoy!
The server is configured using docker environment variables which map onto the config as defined in the server announcement post. They are:
| Docker Variable Name | Game Config Name | Range | Default Value |
|---|---|---|---|
MAP |
N/A | One of Approach_Persistent, Departure_Persistent or Expanse_Persistent |
Approach_Persistent |
MAX_PLAYERS |
maxplayers |
1-8 | 8 |
DAYS_BEFORE_BLIZZARD |
daysbeforeblizzard |
2-7 | 3 |
DAY_MINUTES |
dayminutes |
5-16 | 9 |
PREDATOR_DAMAGE |
predatordamage |
0.25-3 | 1 |
COLD_INTENSITY |
coldintensity |
0.25-3 | 1 |
HUNGER_RATE |
hungerrate |
0.25-3 | 1 |
COAL_BURN_RATE |
coalburnrate |
0.1-2 | 1 |
THRALLS |
thralls |
0-8 | 2 |
You should pass these when you're running the game server with the -e command line flag, for example:
docker run --rm -p 7777:7777/udp -e MAX_PLAYERS=3 -e DAYS_BEFORE_BLIZZARD=3 dread-hungerIf you wish to change the port the server listens on, you should do that with the docker ports system:
docker run --rm -p 7777:7777/udp dread-hunger # run with the default port of 7777
docker run --rm -p 1234:7777/udp dread-hunger # run on port 1234Warning
You should always remap the port to 7777 inside the container (on the right hand side of the :), and always include /udp otherwise you will not be able to connect.
The contents of this repo (except the banner image) are licensed under the GNU Affero General Public License. Dread Hunger is the property of Digital Confectioners; no credit is taken for the software in this image.
Footnotes
-
Unfortunately, because the Dread Hunger Team chose to distribute the server files using a client update rather than adding them as a separate app to steam, this image cannot automate downloading the server files with
steamcmdand so a copy of the client or at least the server files within is required. If you know this is incorrect, please open an issue. ↩ -
The game server is stateless so the
--rmflag is safe and keeps your container history clear. ↩
