valheim-admin-ui

Valheim Game Server Admin Web UI - VAUI

Usage no npm install needed!

<script type="module">
  import valheimAdminUi from 'https://cdn.skypack.dev/valheim-admin-ui';
</script>

README

Valheim Admin UI

Valheim Game Server Admin Web UI - VAUI

for Windows. Linux/OSX in the future.

Mobile - LoginMobile - CommandsDesktop - Commands

Pull requests

"Bugs ... fixes are really wanted"

Any bugs about this project, feel free to report them at the issues tab. And you are welcome to submit pull requests.

Modes for the Admin UI

  • Standalone, just run by NodeJS (and a service)
  • IIS Server, using iisnode

Installation

As standalone installation

  1. download the files from github to a new C:\Server-Games\ValheimAdminUI folder
    • and open a terminal there
    • install the UI main dependencies: npm i
  2. install all requirements
    • best to download NSSM and SteamCMD to a folder, e.g. C:\Server-Games\ValheimAdminUI\tools
  3. configure, see Paths and commands (and that bin folder)
  4. add a user to be able to login, see to create a password hash and save with a user
  5. Install game and service, see Install the game or service
  6. (setup port forwarding / DynamicDNS)
  7. run it with npm start
  8. open the browser, http://localhost:3000/

Notes

Using DynamicDNS and IIS you may not want to use HTTPS.

  • You would remove the <rule name="Redirect to https"... directive.

Config

Passwords: app/config.passwords.json

Paths and commands: app/config.win32.js and others.

UI translation: public/index.html and public/commands.html

Commands

special environment variables

  • PORT - the Valheim Admin UI port to use (defaults to 3000)
  • PASSWORDFILE - the full file path to a different password "*.json" file
  • CONFIGFILE - the full file path to a different "config.*.js" file

Set a env var on commandline, then run the UI (PORT used as an example):

  • Win (cmd): \> set PORT=3000 && npm start
  • Win (PS): PS> $env:PORT=3000 ; npm start
  • MacOS/LX: $ PORT=3000 npm start

Start server with a specific port

to use a specific port for the web ui:
   npm start -- port 3000
   LINUX:  PORT=3000 npm start

Add users / password

to create a password hash:
   npm start -- enc  newpassword
   npm test  newpassword
to create a password hash and save with a user:
   npm start -- enc  newpassword user.name
   npm test  newpassword user.name
delete a user:
   npm start -- enc  NULL user.name
   npm test  NULL user.name

Install the game or service (to start/stop or keep the game running)

install the "service" or "game":
   npm start -- install service
   npm start -- install game
   npm start -- install no-service    // uninstall service

Requirements

OPTIONAL

  • NVM
    • to handle NodeJS installations and to install NodeJS
  • Microsoft IIS
    • to host VSUI using iisnode
  • iisnode
  • freedns.afraid.org
    • to have the Web UI available on a self hosted server
  • FileZilla Server
    • alias the most important folders: game-logs, admin-ui-logs, world-file-folder, game folder for admin
    • Example folders related to my configuration:
      • ./iisnode
      • C:\Server-Games\valheimserver\config
      • C:\Server-Games\valheimserver\logs
      • C:\Server-Games\valheimserver\valheim_server_Data
      • C:\Server-Games\valheimserver\logs
      • C:\Users\Valheim Game Server\AppData\LocalLow\IronGate\Valheim

License

The code is available at GitHub under the ISC license.

Attribution

  • bcrypt - MIT License
  • fs-extra - MIT License
  • koa - MIT License
  • koa-bodyparser - MIT License
  • koa-router - MIT License
  • koa-session - MIT License
  • koa-static - MIT License
  • node-vdf - ISC License

Possible future ideas for v.2

  • pack using electron for releases (no NodeJS installation, no npm start -- cmd but vaui --cmd usage)
  • use npm's SteamCMD to download SteamCMD
  • use a setup script
  • add a script to use appcmd.exe to add to IIS / include to download iisnode