Building from Source
Requirements
- Docker
>=20 - git
>=2 - make
>=4 - .NET SDK
6 - A local installation of Stardew Valley (via Steam)
Setup
1. Clone the Repository
Clone the repository with its submodules:
mkdir sdvd-server
cd sdvd-server
git clone --recurse-submodules git@github.com:stardew-valley-dedicated-server/server.git .2. Configure your IDE
Update JunimoServer.csproj to enable autocompletion and build support in your IDE.
3. Set the Game Path
Specify the path to your local Stardew Valley installation:
<GamePath>C:\path\to\Stardew Valley</GamePath>4. Create Configuration
Copy the .env.example file from the repository.
Rename .env.example to .env and configure your server settings:
# Steam Account Details (required for downloading the game server)
STEAM_USERNAME=""
STEAM_PASSWORD=""
# VNC Server (for web-based administration access)
VNC_PASSWORD=""Usage
Build and Start
To build and start the server:
make upView Logs
To see logs:
docker compose logs -fStop the Server
To save and stop the server:
docker compose downMake Commands
The Makefile provides several useful commands:
| Command | Description |
|---|---|
make install | Install development dependencies (commitlint, git hooks) |
make setup | Run first-time Steam authentication and game download |
make up | Build and start all containers |
make down | Stop all containers |
make logs | Follow container logs |
make cli | Attach to interactive server console |
make clean | Remove ALL containers, volumes, and images |
Using git worktrees
Each worktree is a separate folder, so its Compose project name defaults to that folder's name and it gets its own empty volumes. make setup then makes you log into Steam and download the game again (and too many logins can get you rate-limited).
To share your main checkout's volumes across worktrees, pin an explicit project name in the main checkout's .env:
COMPOSE_PROJECT_NAME=sdvd-serverUse your main checkout's folder name — sdvd-server if you followed the clone step above. Claude-created worktrees copy the main .env, so they inherit the same project name and share its volumes automatically; a worktree you add by hand with git worktree add does not get the copy, so set the line in its .env yourself.
Both checkouts then form one Compose project, and because the services use fixed container_names only one can run at a time. make down and make clean from a worktree stop or remove the shared containers and volumes — run them from whichever checkout you actually mean to affect.
Project Structure
server/
├── mod/ # JunimoServer SMAPI mod
│ └── JunimoServer/ # Main mod source
├── docker/ # Docker configuration
├── docs/ # Documentation (VitePress)
├── tests/ # Test infrastructure
│ ├── JunimoServer.Tests/ # E2E test assembly
│ ├── JunimoServer.TestRunner/ # Custom test runner
│ ├── test-client/ # E2E test client (SMAPI mod)
│ └── test-ui/ # Test monitoring web UI
└── tools/ # Utility tools
├── steam-service/ # Steam authentication service
└── discord-bot/ # Discord bot integration