stardew-multiplayer-docker/README.md

85 lines
3.5 KiB
Markdown
Raw Normal View History

2019-04-09 17:02:27 +00:00
# Stardew Valley Multiplayer Docker Compose
This project aims to autostart a Stardew Valley Multiplayer Server as easy as possible.
2021-01-20 16:27:38 +00:00
## Side Note
- Updating to most recent version requires a rebuild: `docker-compose build --no-cache`
- Although I'm trying to put out updates, I don't have the time for testing, so I recommend forking and fixing things on your own.
2021-01-23 20:04:33 +00:00
- Ansible and Terraform will not be supported anymore
- Thanks to the brilliant configuration script from Novex and the genius baseimage from jlesage this now looks a bit better
2021-01-20 16:27:38 +00:00
2019-04-13 00:29:00 +00:00
## Setup
### Docker-Compose
2019-04-09 17:04:45 +00:00
```
2019-04-09 17:02:27 +00:00
git clone https://github.com/printfuck/stardew-multiplayer-docker
docker-compose up
2019-04-09 17:04:45 +00:00
```
2021-01-23 20:04:33 +00:00
### Ansible !deprecated!
2019-04-13 00:29:00 +00:00
Create an inventory file with your hosts
```
ansible -i <your_inventori> playbook.yml
```
2021-01-23 20:04:33 +00:00
### Terraform (with Hetzner Cloud) !deprecated!
2019-04-13 00:29:00 +00:00
2020-04-23 16:40:11 +00:00
Enter your API Token in `terraform/vars.auto.tfvars` and modify the resource section in `main.tf` to your liking, then run the following script:
2019-04-13 00:29:00 +00:00
```
./terra.sh
```
## Game Setup
2019-04-09 17:02:27 +00:00
2021-01-23 21:37:08 +00:00
Intially you have to create or load a game once via VNC or Web interface. After that the Autoload Mod jumps into the previously loaded savegame everytime you restart or rebuild the container. The AutoLoad Mod config file is by default mounted as a volume, since it keeps the state of the ongoing SaveGame, but you can also copy your existing SaveGame to the `Saves` volume and define the SaveGame's name in the environment variables.
2019-04-12 21:39:04 +00:00
2020-04-23 16:40:11 +00:00
### VNC
Use a vnc client like `TightVNC` on Windows or plain `vncviewer` on any Linux distribution to connect to the server. You can modify the VNC Port and IP address and Password in the `docker-compose.yml` file like this:
2019-04-09 17:02:27 +00:00
2020-04-23 16:40:11 +00:00
Localhost:
```
# Server is only reachable on localhost on port 2342...
ports:
- 127.0.0.1:2342:5900
# ... with the password "insecure"
environment:
- VNCPASS=insecure
```
2019-04-12 21:39:04 +00:00
2021-01-23 20:04:33 +00:00
### Web Interface
2021-01-23 21:37:08 +00:00
On port 5800 inside the container is a web interface. This is a bit easier and more accessible than just the VNC interface. Although you will be asked for the vnc password, I wouldn't recommend exposing the port to the outside world.
![img](https://store.eris.cc/uploads/859865e1ab5b23fb223923d9a7e4806b.PNG)
2021-01-23 20:04:33 +00:00
2020-04-23 16:40:11 +00:00
## How it works
2019-04-12 21:39:04 +00:00
2021-01-23 21:37:08 +00:00
The game will be pulled from my servers (I'll assume you already own the game - since you're looking for a multiplayer - so please don't rip it from there) and the modloader (SMAPI) will be pulled from Github when building the container. You can control the mods's settings with environment variables in the `docker-compose.yml` file.
2020-04-07 02:43:42 +00:00
## Used Mods
* [AutoLoadGame](https://www.nexusmods.com/stardewvalley/mods/2509)
* [Always On](https://community.playstarbound.com/threads/updating-mods-for-stardew-valley-1-4.156000/page-20#post-3353880)
* [Unlimited Players](https://www.nexusmods.com/stardewvalley/mods/2213)
2021-01-23 20:04:33 +00:00
* some more ...
2020-04-07 02:43:42 +00:00
2020-04-07 02:51:45 +00:00
## Troubleshooting
### Error Messages in Console
2020-04-07 04:19:12 +00:00
Usually you should be able to ignore any message there. If the game doesn't start or any errors appear, you should look for messages like "cannot open display", which would most likely indicate permission errors.
2020-04-07 02:51:45 +00:00
### VNC
2020-04-07 04:19:12 +00:00
Access the game via VNC to initially load or start a pregenerated savegame. You can control the Server from there or edit the config.json files in the configs folder.
2020-04-07 02:51:45 +00:00
2020-04-23 16:40:11 +00:00
### Performance
2020-04-07 02:51:45 +00:00
2020-04-23 16:40:11 +00:00
I'd recomend a VPS/Machine with at least four logical CPUs and 4GB Ram, otherwise there will be horrible lags. The minimum configuration I'd consider playable with two to four players would be two logical CPUs and 1GB of Ram.