valheim-oz-dsm 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +97 -0
- package/README.md +490 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +66402 -0
- package/dist/main.js.map +1 -0
- package/package.json +68 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [1.0.0] - 2026-02-01
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- **BREAKING**: Renamed package from `oz-dsm-valheim` to `valheim-oz-dsm`
|
|
14
|
+
- Added `.gitattributes` for consistent LF line endings across platforms
|
|
15
|
+
- Adjusted coverage thresholds for CI stability
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- Startup task management utilities
|
|
19
|
+
- First stable release
|
|
20
|
+
|
|
21
|
+
## [0.4.0] - 2026-01-31
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- Integrated `@caleb-collar/steamcmd` npm package for SteamCMD operations
|
|
25
|
+
- Re-exported steamcmd package error classes (SteamCmdError, DownloadError, InstallError)
|
|
26
|
+
- Enhanced doctor command with package-based platform detection
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
- Refactored `src/steamcmd/paths.ts` to use steamcmd package for path resolution
|
|
30
|
+
- Refactored `src/steamcmd/installer.ts` to use steamcmd package's ensureInstalled
|
|
31
|
+
- Refactored `src/steamcmd/updater.ts` to use steamcmd package's install/getInstalledVersion
|
|
32
|
+
- Simplified SteamCMD module by delegating core functionality to external package
|
|
33
|
+
- Updated VALHEIM_APP_ID from string to number type
|
|
34
|
+
|
|
35
|
+
### Removed
|
|
36
|
+
- Custom SteamCMD download and extraction logic (now handled by package)
|
|
37
|
+
- Manual archive extraction functions (extractZip, extractTarGz)
|
|
38
|
+
|
|
39
|
+
## [0.3.0] - 2026-01-30
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
- Enhanced Renovate configuration with auto-merge for patch/minor updates
|
|
43
|
+
- npm publish workflow for automated npm releases
|
|
44
|
+
- Security scanning workflow (weekly + on PR)
|
|
45
|
+
- Stale issue/PR management workflow
|
|
46
|
+
- GitHub Copilot prompt files for common tasks
|
|
47
|
+
- CHANGELOG.md for tracking version history
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
- Upgraded React from 18.x to 19.2.4
|
|
51
|
+
- Upgraded Ink from 5.x to 6.6.0
|
|
52
|
+
- Upgraded Zod from 3.x to 4.3.6
|
|
53
|
+
- Upgraded Biome from 1.x to 2.3.13
|
|
54
|
+
- Upgraded fullscreen-ink from 0.0.2 to 0.1.0
|
|
55
|
+
- Updated package name from `oz-valheim` to `oz-dsm-valheim`
|
|
56
|
+
- Updated Biome configuration for v2 (ran `biome migrate`)
|
|
57
|
+
|
|
58
|
+
## [0.2.0] - 2026-01-30
|
|
59
|
+
|
|
60
|
+
### Added
|
|
61
|
+
- TUI with fullscreen support using fullscreen-ink
|
|
62
|
+
- Dashboard screen with server status and quick actions
|
|
63
|
+
- Settings screen with editable configuration
|
|
64
|
+
- Worlds screen with world management
|
|
65
|
+
- Console screen with log viewing
|
|
66
|
+
- Input components: TextInput, NumberInput, SelectInput, Toggle, PathInput
|
|
67
|
+
- Help overlay (press `?`) for keyboard shortcuts
|
|
68
|
+
- Spinner and loading state components
|
|
69
|
+
- Doctor command for system diagnostics
|
|
70
|
+
- RCON client for remote server administration
|
|
71
|
+
- Watchdog for automatic server restart
|
|
72
|
+
- Log parsing and streaming
|
|
73
|
+
- Configuration persistence using `conf` package
|
|
74
|
+
|
|
75
|
+
### Changed
|
|
76
|
+
- Migrated from Deno to Node.js runtime
|
|
77
|
+
- Updated project structure for Node.js ecosystem
|
|
78
|
+
|
|
79
|
+
### Fixed
|
|
80
|
+
- Terminal resize handling (resolved by Node.js migration)
|
|
81
|
+
|
|
82
|
+
## [0.1.0] - 2026-01-15
|
|
83
|
+
|
|
84
|
+
### Added
|
|
85
|
+
- Initial Deno-based implementation
|
|
86
|
+
- SteamCMD installation and Valheim server updates
|
|
87
|
+
- CLI commands: install, start, stop, config, worlds
|
|
88
|
+
- Configuration schema with Zod validation
|
|
89
|
+
- Platform detection for Windows, Linux, macOS
|
|
90
|
+
- Basic TUI framework with Ink
|
|
91
|
+
|
|
92
|
+
[Unreleased]: https://github.com/land-of-oz/valheim-dsm/compare/v1.0.0...HEAD
|
|
93
|
+
[1.0.0]: https://github.com/land-of-oz/valheim-dsm/compare/v0.4.0...v1.0.0
|
|
94
|
+
[0.4.0]: https://github.com/land-of-oz/valheim-dsm/compare/v0.3.0...v0.4.0
|
|
95
|
+
[0.3.0]: https://github.com/land-of-oz/valheim-dsm/compare/v0.2.0...v0.3.0
|
|
96
|
+
[0.2.0]: https://github.com/land-of-oz/valheim-dsm/compare/v0.1.0...v0.2.0
|
|
97
|
+
[0.1.0]: https://github.com/land-of-oz/valheim-dsm/releases/tag/v0.1.0
|
package/README.md
ADDED
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
# Land of OZ - Dedicated Server Manager - Valheim
|
|
2
|
+
|
|
3
|
+
[](https://github.com/caleb-collar/land-of-oz-dsm-valheim/actions/workflows/ci.yml)
|
|
4
|
+
[](https://codecov.io/gh/caleb-collar/land-of-oz-dsm-valheim)
|
|
5
|
+
|
|
6
|
+
## About
|
|
7
|
+
|
|
8
|
+
- This software is a dedicated server manager (DSM) for Valheim.
|
|
9
|
+
- The Valheim DSM is part of the Land of Oz series of software.
|
|
10
|
+
- This software is to provide an easy to use container and virtualization free
|
|
11
|
+
dedicate server hosting experience.
|
|
12
|
+
|
|
13
|
+
## Details
|
|
14
|
+
|
|
15
|
+
- The software is written in TypeScript using Node.js as the runtime
|
|
16
|
+
- The DSM program is a rich featured management tool with a Yoga powered TUI.
|
|
17
|
+
- The TUI uses Ink which is a React flavored TUI framework
|
|
18
|
+
- The motion in the TUI is accelerated by the ASCII Motion app.
|
|
19
|
+
- Any AI agent working in this repo has access to the ASCII Motion MCP
|
|
20
|
+
server tooling for generating beautiful and efficient animated ascii based
|
|
21
|
+
art.
|
|
22
|
+
|
|
23
|
+
## Quick Start
|
|
24
|
+
|
|
25
|
+
### Installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Clone the repository
|
|
29
|
+
git clone https://github.com/caleb-collar/land-of-oz-dsm-valheim.git
|
|
30
|
+
cd land-of-oz-dsm-valheim
|
|
31
|
+
|
|
32
|
+
# Install dependencies
|
|
33
|
+
npm install
|
|
34
|
+
|
|
35
|
+
# Run the TUI (recommended)
|
|
36
|
+
npx tsx main.ts
|
|
37
|
+
|
|
38
|
+
# Or use CLI commands directly
|
|
39
|
+
npx tsx main.ts --help
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Common Usage Examples
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Launch the interactive TUI
|
|
46
|
+
npx tsx main.ts tui
|
|
47
|
+
|
|
48
|
+
# Install SteamCMD and Valheim server
|
|
49
|
+
npx tsx main.ts install
|
|
50
|
+
|
|
51
|
+
# Check your setup for issues
|
|
52
|
+
npx tsx main.ts doctor
|
|
53
|
+
|
|
54
|
+
# Start the server
|
|
55
|
+
npx tsx main.ts start --name "My Viking Server" --world "MyWorld"
|
|
56
|
+
|
|
57
|
+
# Start in background mode
|
|
58
|
+
npx tsx main.ts start --background
|
|
59
|
+
|
|
60
|
+
# Stop the server gracefully
|
|
61
|
+
npx tsx main.ts stop
|
|
62
|
+
|
|
63
|
+
# Force stop if unresponsive
|
|
64
|
+
npx tsx main.ts stop --force
|
|
65
|
+
|
|
66
|
+
# View/edit configuration
|
|
67
|
+
npx tsx main.ts config list
|
|
68
|
+
npx tsx main.ts config set server.port 2457
|
|
69
|
+
npx tsx main.ts config get server.name
|
|
70
|
+
|
|
71
|
+
# Manage worlds
|
|
72
|
+
npx tsx main.ts worlds list
|
|
73
|
+
npx tsx main.ts worlds info MyWorld
|
|
74
|
+
npx tsx main.ts worlds export MyWorld --path ./backup
|
|
75
|
+
|
|
76
|
+
# Send RCON commands (requires BepInEx mod)
|
|
77
|
+
npx tsx main.ts rcon save
|
|
78
|
+
npx tsx main.ts rcon "kick PlayerName"
|
|
79
|
+
npx tsx main.ts rcon --interactive
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### TUI Keyboard Shortcuts
|
|
83
|
+
|
|
84
|
+
| Key | Action |
|
|
85
|
+
| --------- | -------------------- |
|
|
86
|
+
| `1` | Dashboard |
|
|
87
|
+
| `2` | Settings |
|
|
88
|
+
| `3` | Worlds |
|
|
89
|
+
| `4` | Console |
|
|
90
|
+
| `?` | Show help overlay |
|
|
91
|
+
| `S` | Start server |
|
|
92
|
+
| `X` | Stop server |
|
|
93
|
+
| `Q` | Quit application |
|
|
94
|
+
| `Ctrl+C` | Force quit |
|
|
95
|
+
| `Esc` | Close modal |
|
|
96
|
+
|
|
97
|
+
## Features
|
|
98
|
+
|
|
99
|
+
### Key features are as follows, all features have configuration available in the TUI:
|
|
100
|
+
|
|
101
|
+
- Windows, Mac, and Linux, task generation.
|
|
102
|
+
- You may use the CLI with flags or CLI TUI to generate a task that auto runs
|
|
103
|
+
with various options to keep the dedicated server running.
|
|
104
|
+
- Rich TUI based server setting configuration.
|
|
105
|
+
- All of Valheim's dedicated server settings are accessible in properly
|
|
106
|
+
ordered and organized in modern menus and sub menus.
|
|
107
|
+
- Automatic dependency installation if you opt in (will auto check and install
|
|
108
|
+
steamcmd etc when run if you opt for this)
|
|
109
|
+
- Uses steamcmd to install and auto update Valheim when there are updates.
|
|
110
|
+
- Allows runtime server/admin commands to be run from the TUI.
|
|
111
|
+
- Watchdog to ensure that if the server crashes, it is auto restarted.
|
|
112
|
+
- Import existing save files (.db, .fwl pairs) and run them.
|
|
113
|
+
- Persistent configuration (settings, active world, etc persist between server
|
|
114
|
+
and system restarts)
|
|
115
|
+
|
|
116
|
+
## TUI
|
|
117
|
+
|
|
118
|
+
This TUI (Text User Interface) for Valheim DSM: Land of Oz is designed for
|
|
119
|
+
high-efficiency server administration with a modern, animated "cyber-viking"
|
|
120
|
+
aesthetic. It prioritizes real-time observability while keeping management tools
|
|
121
|
+
front and center. Below is a generalized mockup of the DSM TUI built using React
|
|
122
|
+
via Ink. Motion is created using ASCII Motion.
|
|
123
|
+
|
|
124
|
+
> The Valheim DSM: Land of Oz interface utilizes a structured three-zone TUI
|
|
125
|
+
> architecture designed for maximum administrative visibility. A bold animated
|
|
126
|
+
> ASCII header anchors the top of the screen, followed by a responsive layout
|
|
127
|
+
> that separates active management from passive monitoring. Where possible, the
|
|
128
|
+
> system uses Ink to display data (realtime active react components). There is a
|
|
129
|
+
> real-time log feed with color-coded event markers. 
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Architecture
|
|
134
|
+
|
|
135
|
+
### Technology Stack
|
|
136
|
+
|
|
137
|
+
| Layer | Technology | Purpose |
|
|
138
|
+
| ---------------- | ---------------- | ------------------------------------------------ |
|
|
139
|
+
| Runtime | Node.js 22.x | TypeScript-first with tsx execution |
|
|
140
|
+
| TUI Framework | Ink 5.x | React-based terminal UI with Yoga flexbox layout |
|
|
141
|
+
| State Management | Zustand | Lightweight, React-compatible global state |
|
|
142
|
+
| Animation | ASCII Motion MCP | Animated ASCII art for headers and transitions |
|
|
143
|
+
| Process Control | child_process | Cross-platform subprocess management |
|
|
144
|
+
| Configuration | conf | Persistent settings with JSON storage |
|
|
145
|
+
|
|
146
|
+
### Directory Structure
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
land-of-oz-dsm-valheim/
|
|
150
|
+
├── package.json # Node.js dependencies and scripts
|
|
151
|
+
├── tsconfig.json # TypeScript configuration
|
|
152
|
+
├── vitest.config.ts # Test configuration
|
|
153
|
+
├── biome.json # Linting and formatting
|
|
154
|
+
├── main.ts # CLI entry point and argument parser
|
|
155
|
+
├── README.md # Project documentation (this file)
|
|
156
|
+
├── AGENTS.md # AI agent implementation guidance
|
|
157
|
+
├── .agent-docs/ # Detailed implementation references for agents
|
|
158
|
+
│ ├── 00-overview.md
|
|
159
|
+
│ ├── 01-tui-architecture.md
|
|
160
|
+
│ ├── 02-process-management.md
|
|
161
|
+
│ ├── 03-steamcmd-integration.md
|
|
162
|
+
│ ├── 04-configuration.md
|
|
163
|
+
│ └── 05-valheim-settings.md
|
|
164
|
+
│
|
|
165
|
+
├── src/
|
|
166
|
+
│ ├── mod.ts # Public API exports
|
|
167
|
+
│ │
|
|
168
|
+
│ ├── cli/
|
|
169
|
+
│ │ ├── mod.ts # CLI module exports
|
|
170
|
+
│ │ ├── args.ts # Argument parsing (Cliffy or custom)
|
|
171
|
+
│ │ └── commands/ # Subcommand handlers
|
|
172
|
+
│ │ ├── start.ts
|
|
173
|
+
│ │ ├── stop.ts
|
|
174
|
+
│ │ ├── install.ts
|
|
175
|
+
│ │ └── config.ts
|
|
176
|
+
│ │
|
|
177
|
+
│ ├── tui/
|
|
178
|
+
│ │ ├── mod.ts # TUI module exports
|
|
179
|
+
│ │ ├── App.tsx # Root Ink component
|
|
180
|
+
│ │ ├── store.ts # Zustand state store
|
|
181
|
+
│ │ ├── hooks/ # Custom React hooks
|
|
182
|
+
│ │ │ ├── useServer.ts
|
|
183
|
+
│ │ │ ├── useLogs.ts
|
|
184
|
+
│ │ │ └── useConfig.ts
|
|
185
|
+
│ │ ├── components/ # Reusable UI components
|
|
186
|
+
│ │ │ ├── Header.tsx # Animated ASCII header
|
|
187
|
+
│ │ │ ├── StatusBar.tsx # Server status indicators
|
|
188
|
+
│ │ │ ├── LogFeed.tsx # Real-time color-coded logs
|
|
189
|
+
│ │ │ ├── Menu.tsx # Navigation menu
|
|
190
|
+
│ │ │ ├── SettingsPanel.tsx # Server settings editor
|
|
191
|
+
│ │ │ └── Modal.tsx # Overlay dialogs
|
|
192
|
+
│ │ └── screens/ # Full-screen views
|
|
193
|
+
│ │ ├── Dashboard.tsx
|
|
194
|
+
│ │ ├── Settings.tsx
|
|
195
|
+
│ │ ├── Worlds.tsx
|
|
196
|
+
│ │ └── Console.tsx
|
|
197
|
+
│ │
|
|
198
|
+
│ ├── server/
|
|
199
|
+
│ │ ├── mod.ts # Server management exports
|
|
200
|
+
│ │ ├── process.ts # Valheim process wrapper
|
|
201
|
+
│ │ ├── watchdog.ts # Crash detection and auto-restart
|
|
202
|
+
│ │ ├── logs.ts # Log parsing and streaming
|
|
203
|
+
│ │ └── commands.ts # Runtime admin command execution
|
|
204
|
+
│ │
|
|
205
|
+
│ ├── steamcmd/
|
|
206
|
+
│ │ ├── mod.ts # SteamCMD module exports
|
|
207
|
+
│ │ ├── installer.ts # Auto-install SteamCMD
|
|
208
|
+
│ │ ├── updater.ts # Valheim installation/updates
|
|
209
|
+
│ │ └── paths.ts # Platform-specific path resolution
|
|
210
|
+
│ │
|
|
211
|
+
│ ├── config/
|
|
212
|
+
│ │ ├── mod.ts # Configuration module exports
|
|
213
|
+
│ │ ├── schema.ts # Zod schemas for validation
|
|
214
|
+
│ │ ├── store.ts # Deno KV persistence layer
|
|
215
|
+
│ │ └── defaults.ts # Default configuration values
|
|
216
|
+
│ │
|
|
217
|
+
│ ├── valheim/
|
|
218
|
+
│ │ ├── mod.ts # Valheim-specific exports
|
|
219
|
+
│ │ ├── settings.ts # Server settings types and handlers
|
|
220
|
+
│ │ ├── worlds.ts # World file management (.db, .fwl)
|
|
221
|
+
│ │ └── args.ts # Valheim CLI argument builder
|
|
222
|
+
│ │
|
|
223
|
+
│ └── utils/
|
|
224
|
+
│ ├── mod.ts # Utility exports
|
|
225
|
+
│ ├── platform.ts # OS detection and paths
|
|
226
|
+
│ ├── logger.ts # Structured logging
|
|
227
|
+
│ └── events.ts # Event emitter for internal messaging
|
|
228
|
+
│
|
|
229
|
+
└── assets/
|
|
230
|
+
└── ascii/ # ASCII art assets (exported from ASCII Motion)
|
|
231
|
+
├── header.json
|
|
232
|
+
└── spinner.json
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Core Modules
|
|
236
|
+
|
|
237
|
+
#### 1. CLI (`src/cli/`)
|
|
238
|
+
|
|
239
|
+
The command-line interface provides direct access to all DSM functionality:
|
|
240
|
+
|
|
241
|
+
- `oz-valheim start` - Start the server (with optional `--tui` flag)
|
|
242
|
+
- `oz-valheim stop` - Gracefully stop the server
|
|
243
|
+
- `oz-valheim install` - Install/update Valheim via SteamCMD
|
|
244
|
+
- `oz-valheim config` - View/edit configuration
|
|
245
|
+
- `oz-valheim tui` - Launch the full TUI experience
|
|
246
|
+
|
|
247
|
+
#### 2. TUI (`src/tui/`)
|
|
248
|
+
|
|
249
|
+
The terminal user interface is built with Ink (React for terminals):
|
|
250
|
+
|
|
251
|
+
- **Three-Zone Layout**: Header, Main Content, Log Feed
|
|
252
|
+
- **Zustand Store**: Centralized state for server status, settings, logs
|
|
253
|
+
- **Component Library**: Reusable, themed components with cyan/orange/green
|
|
254
|
+
palette
|
|
255
|
+
- **Keyboard Navigation**: Full keyboard control with vim-style bindings
|
|
256
|
+
|
|
257
|
+
#### 3. Server Process Management (`src/server/`)
|
|
258
|
+
|
|
259
|
+
Manages the Valheim dedicated server lifecycle:
|
|
260
|
+
|
|
261
|
+
- **Process Wrapper**: Spawn, monitor, and terminate the server process
|
|
262
|
+
- **Watchdog**: Detect crashes via exit codes and auto-restart with backoff
|
|
263
|
+
- **Log Streaming**: Parse stdout/stderr, categorize events, emit to TUI
|
|
264
|
+
- **Command Injection**: Send admin commands to the running server
|
|
265
|
+
|
|
266
|
+
#### 4. SteamCMD Integration (`src/steamcmd/`)
|
|
267
|
+
|
|
268
|
+
Handles all Steam-related operations:
|
|
269
|
+
|
|
270
|
+
- **Auto-Install**: Download and configure SteamCMD per platform
|
|
271
|
+
- **Update Detection**: Check for Valheim updates before launching
|
|
272
|
+
- **Anonymous Login**: Valheim dedicated server doesn't require authentication
|
|
273
|
+
|
|
274
|
+
#### 5. Configuration (`src/config/`)
|
|
275
|
+
|
|
276
|
+
Persistent settings management:
|
|
277
|
+
|
|
278
|
+
- **Deno KV**: Local key-value storage for settings
|
|
279
|
+
- **Zod Validation**: Type-safe schema enforcement
|
|
280
|
+
- **Migration Support**: Handle config version upgrades
|
|
281
|
+
|
|
282
|
+
#### 6. Valheim Integration (`src/valheim/`)
|
|
283
|
+
|
|
284
|
+
Game-specific functionality:
|
|
285
|
+
|
|
286
|
+
- **Settings Types**: Typed definitions for all server arguments
|
|
287
|
+
- **World Management**: Import, export, and switch between worlds
|
|
288
|
+
- **Argument Builder**: Construct valid Valheim CLI arguments
|
|
289
|
+
|
|
290
|
+
### State Flow
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
294
|
+
│ Zustand Store │
|
|
295
|
+
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
|
|
296
|
+
│ │ server │ │ config │ │ logs │ │ ui │ │
|
|
297
|
+
│ │ .status │ │ .settings│ │ .entries │ │ .activeScreen │ │
|
|
298
|
+
│ │ .pid │ │ .world │ │ .filter │ │ .modalOpen │ │
|
|
299
|
+
│ └──────────┘ └──────────┘ └──────────┘ └──────────────────────┘ │
|
|
300
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
301
|
+
│ │ │
|
|
302
|
+
▼ ▼ ▼
|
|
303
|
+
┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
304
|
+
│ Process │ │ Deno KV │ │ TUI │
|
|
305
|
+
│ Manager │ │ Store │ │ Renderer │
|
|
306
|
+
└──────────┘ └──────────┘ └──────────┘
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### TUI Layout Zones
|
|
310
|
+
|
|
311
|
+
```
|
|
312
|
+
┌────────────────────────────────────────────────────────────────────┐
|
|
313
|
+
│ ╔═══╗ ╔═══╗ ╔═══╗ │
|
|
314
|
+
│ ZONE 1: HEADER ║ L ║ ║ O ║ ║ Z ║ Animated ASCII Title │
|
|
315
|
+
│ ╚═══╝ ╚═══╝ ╚═══╝ (ASCII Motion powered) │
|
|
316
|
+
├────────────────────────────────────────────────────────────────────┤
|
|
317
|
+
│ │
|
|
318
|
+
│ ZONE 2: MAIN CONTENT │
|
|
319
|
+
│ ┌──────────────────────┐ ┌─────────────────────────────────────┐ │
|
|
320
|
+
│ │ [1] Dashboard │ │ Server: ● ONLINE │ │
|
|
321
|
+
│ │ [2] Settings │ │ Players: 3/10 │ │
|
|
322
|
+
│ │ [3] Worlds │ │ World: MyWorld │ │
|
|
323
|
+
│ │ [4] Console │ │ Uptime: 4h 23m │ │
|
|
324
|
+
│ │ [Q] Quit │ │ │ │
|
|
325
|
+
│ └──────────────────────┘ └─────────────────────────────────────┘ │
|
|
326
|
+
│ │
|
|
327
|
+
├────────────────────────────────────────────────────────────────────┤
|
|
328
|
+
│ ZONE 3: LOG FEED │
|
|
329
|
+
│ [INFO] Player "Viking01" connected │
|
|
330
|
+
│ [INFO] Player "Viking02" connected │
|
|
331
|
+
│ [WARN] High memory usage detected │
|
|
332
|
+
│ [INFO] World saved successfully │
|
|
333
|
+
└────────────────────────────────────────────────────────────────────┘
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Valheim Server Settings
|
|
337
|
+
|
|
338
|
+
The DSM exposes all Valheim dedicated server settings through the TUI:
|
|
339
|
+
|
|
340
|
+
| Setting | Type | Description |
|
|
341
|
+
| -------------- | ------- | ----------------------------- |
|
|
342
|
+
| `name` | string | Server name shown in browser |
|
|
343
|
+
| `port` | number | Server port (default: 2456) |
|
|
344
|
+
| `world` | string | World name to load |
|
|
345
|
+
| `password` | string | Server password (min 5 chars) |
|
|
346
|
+
| `savedir` | path | Custom save directory |
|
|
347
|
+
| `public` | boolean | List on public server browser |
|
|
348
|
+
| `logFile` | path | Log file output path |
|
|
349
|
+
| `saveinterval` | number | Save interval in seconds |
|
|
350
|
+
| `backups` | number | Number of backup saves |
|
|
351
|
+
| `backupshort` | number | Short backup interval |
|
|
352
|
+
| `backuplong` | number | Long backup interval |
|
|
353
|
+
| `crossplay` | boolean | Enable crossplay support |
|
|
354
|
+
| `preset` | enum | Difficulty preset |
|
|
355
|
+
| `modifiers` | object | Combat, death penalty, etc. |
|
|
356
|
+
|
|
357
|
+
### Platform Support
|
|
358
|
+
|
|
359
|
+
| Platform | SteamCMD Path | Valheim Install | Config Storage |
|
|
360
|
+
| -------- | ---------------------------------------- | ------------------------------------------- | ------------------------------------------ |
|
|
361
|
+
| Windows | `%LOCALAPPDATA%\steamcmd` | `steamapps\common\Valheim dedicated server` | `%APPDATA%\oz-valheim` |
|
|
362
|
+
| macOS | `~/Library/Application Support/steamcmd` | `steamapps/common/Valheim dedicated server` | `~/Library/Application Support/oz-valheim` |
|
|
363
|
+
| Linux | `~/.local/share/steamcmd` | `steamapps/common/Valheim dedicated server` | `~/.config/oz-valheim` |
|
|
364
|
+
|
|
365
|
+
### Development
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
# Install dependencies
|
|
369
|
+
npm install
|
|
370
|
+
|
|
371
|
+
# Run in development mode (with watch)
|
|
372
|
+
npm run dev
|
|
373
|
+
|
|
374
|
+
# Run tests
|
|
375
|
+
npm test
|
|
376
|
+
|
|
377
|
+
# Type check
|
|
378
|
+
npm run typecheck
|
|
379
|
+
|
|
380
|
+
# Lint and format
|
|
381
|
+
npm run lint
|
|
382
|
+
npm run format
|
|
383
|
+
|
|
384
|
+
# Build bundle
|
|
385
|
+
npm run build
|
|
386
|
+
|
|
387
|
+
# Run built version
|
|
388
|
+
node dist/main.js --help
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
> **Note:** The project uses Biome for linting and formatting.
|
|
392
|
+
|
|
393
|
+
### Node.js Requirements
|
|
394
|
+
|
|
395
|
+
- Node.js 22.x or later
|
|
396
|
+
- npm 10.x or later
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
## Troubleshooting
|
|
401
|
+
|
|
402
|
+
Run `npx tsx main.ts doctor` to automatically diagnose common issues.
|
|
403
|
+
|
|
404
|
+
### Common Issues
|
|
405
|
+
|
|
406
|
+
#### SteamCMD not found
|
|
407
|
+
|
|
408
|
+
```
|
|
409
|
+
Error: SteamCMD not found
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
**Solution:** Run `npx tsx main.ts install` to automatically download and install SteamCMD.
|
|
413
|
+
|
|
414
|
+
#### Valheim server not starting
|
|
415
|
+
|
|
416
|
+
**Possible causes:**
|
|
417
|
+
|
|
418
|
+
1. **Port already in use** - Valheim requires ports 2456-2458. Check if another process is using them:
|
|
419
|
+
```bash
|
|
420
|
+
# Windows
|
|
421
|
+
netstat -ano | findstr :2456
|
|
422
|
+
|
|
423
|
+
# Linux/macOS
|
|
424
|
+
lsof -i :2456
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
2. **Insufficient permissions** - Run as administrator/root on first launch.
|
|
428
|
+
|
|
429
|
+
3. **SteamCMD needs update** - Run `npx tsx main.ts install --force` to reinstall.
|
|
430
|
+
|
|
431
|
+
#### Configuration errors
|
|
432
|
+
|
|
433
|
+
```
|
|
434
|
+
Error: Failed to load configuration
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
**Solution:** Reset configuration to defaults:
|
|
438
|
+
```bash
|
|
439
|
+
npx tsx main.ts config reset
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
#### Terminal display issues
|
|
443
|
+
|
|
444
|
+
If the TUI appears corrupted or doesn't render correctly:
|
|
445
|
+
|
|
446
|
+
1. **Try a different terminal** - Windows Terminal, PowerShell, or iTerm2 work best
|
|
447
|
+
2. **Check terminal size** - Minimum 80x24 recommended
|
|
448
|
+
3. **Disable Unicode fallback** - Some terminals need UTF-8 encoding enabled
|
|
449
|
+
|
|
450
|
+
#### RCON connection failed
|
|
451
|
+
|
|
452
|
+
```
|
|
453
|
+
Error: RCON connection refused
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
**Possible causes:**
|
|
457
|
+
|
|
458
|
+
1. RCON requires the BepInEx mod pack with RCON plugin installed on the server
|
|
459
|
+
2. Check RCON port and password match your server configuration:
|
|
460
|
+
```bash
|
|
461
|
+
npx tsx main.ts config set rcon.port 25575
|
|
462
|
+
npx tsx main.ts config set rcon.password "yourpassword"
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
#### Server crashes immediately
|
|
466
|
+
|
|
467
|
+
Check the Valheim log file for details:
|
|
468
|
+
- **Windows:** `%USERPROFILE%\AppData\LocalLow\IronGate\Valheim\`
|
|
469
|
+
- **Linux:** `~/.config/unity3d/IronGate/Valheim/`
|
|
470
|
+
|
|
471
|
+
Common causes:
|
|
472
|
+
- Invalid world name (use alphanumeric characters only)
|
|
473
|
+
- Password too short (minimum 5 characters)
|
|
474
|
+
- Corrupted world files
|
|
475
|
+
|
|
476
|
+
### Getting Help
|
|
477
|
+
|
|
478
|
+
1. Run diagnostics: `npx tsx main.ts doctor`
|
|
479
|
+
2. Check logs in the TUI Console screen (press `4`)
|
|
480
|
+
3. Review Valheim server logs in the save directory
|
|
481
|
+
4. Open an issue on GitHub with:
|
|
482
|
+
- Output of `npx tsx main.ts doctor --json`
|
|
483
|
+
- Relevant error messages
|
|
484
|
+
- Your platform and Node.js version
|
|
485
|
+
|
|
486
|
+
---
|
|
487
|
+
|
|
488
|
+
## Repo details
|
|
489
|
+
|
|
490
|
+
This repo is open source and free to use
|
package/dist/main.d.ts
ADDED