Skip to content

Instantly share code, notes, and snippets.

@bredo228
Last active January 12, 2024 11:03
Show Gist options
  • Save bredo228/ac063763f6acf35532716d66c2313821 to your computer and use it in GitHub Desktop.
Save bredo228/ac063763f6acf35532716d66c2313821 to your computer and use it in GitHub Desktop.
Resonite Linux headless instructions

Resonite: Running headless sessions under Linux

Before we start

This guide is on how to run a Resonite headless session on a Linux system without a GUI. Instructions here will still apply to systems using one - as long as you have access to a terminal, you're set.

Properly supported distros by this guide:

  • Debian (12 / bookworm as of 2024-01-12)
  • Ubuntu (22.04 as of 2024-01-12)
  • Arch (up to date as of 2024-01-12)

You may have luck with distros based on the ones above; whether you need to make changes or not to configuration depends on the changes that have been made to packagemirrors etc.

Requirements

  1. A computer running Linux (whether you do this in a virtual machine, linux container or on a physical machine is up to you)
  2. Access to a user with root permissions - either through sudo (or a similar utility such as doas) or access to the root user
  3. The "Discoverer" tier on Patreon or higher

Installation: Prerequisites for Resonite

Find the distribution you're using in this list (or the closest one to it) to install the software required to install and run Resonite.

screen is optional but is highly recommended

Debian

Making required repository changes

  1. Open /etc/apt/sources.list in your preferred text editor with root permissions - eg sudo vim /etc/apt/sources.list

  2. Find all the lines that contain links to repositories (as an example, they will look like deb https://deb.debian.org/debian bookworm main non-free-firmware by default as of Debian 12). If non-free (not non-free-firmware) is not present, add it to the end of all the lines.

    You should end up with something like this (comments removed):

    deb http://mirror.fsmg.org.nz/debian/ bookworm main non-free-firmware non-free
    deb-src http://mirror.fsmg.org.nz/debian/ bookworm main non-free-firmware non-free
    
    deb http://security.debian.org/debian-security bookworm-security main non-free-firmware non-free
    deb-src http://security.debian.org/debian-security bookworm-security main non-free-firmware non-free
    
    deb http://mirror.fsmg.org.nz/debian/ bookworm-updates main non-free-firmware non-free
    deb-src http://mirror.fsmg.org.nz/debian/ bookworm-updates main non-free-firmware non-free
    
  3. Save and close the file.

  4. Run sudo dpkg --add-architecture i386

  5. Update your package lists by running sudo apt update

Installing

Run sudo apt install mono-complete steamcmd screen curl -y. You will need to accept the Steam license agreement during the install.

You should now have all the prerequisites installed.

Ubuntu

  1. Run sudo dpkg --add-architecture i386
  2. Update your package lists by running sudo apt update
  3. Install the required software by running sudo apt install mono-complete steamcmd screen curl -y. You will need to accept the Steam license agreement during the install.

You should now have all the prerequisites installed.

Arch

Prep

  1. Open /etc/pacman.conf in your favourite text editor as root. eg sudo vim /etc/pacman.conf.

  2. Scroll down and find these two lines:

    #[multilib]
    #Include = /etc/pacman.d/mirrorlist
    
  3. Delete the # at the start of these two lines to uncomment them if they're not uncommented already.

  4. Save and exit the file

  5. Run sudo pacman -Sy to update the package lists.

The easy ones

Run sudo pacman -Sy mono screen base-devel git curl to update your package lists and install mono, screen, curl, base-devel and git (base-devel and git are needed for the next step)

SteamCMD

SteamCMD on Arch requires that it be installed from the AUR.

  1. In your home directory, run git clone https://aur.archlinux.org/steamcmd.git
  2. Type cd steamcmd to change into the steamcmd directory
  3. Run makepkg -si and follow the prompts in order to build and install steamcmd

Installing Resonite

The install

Change to your home directory by running cd ~.

Create a file called launch.sh by running touch launch.sh. Open it in your favourite text editor.

Paste in this example shell script:

#!/bin/sh
# Resonite launch script. CC0, 2024

# Put your Steam username and password here.
# I'd recommend using an alternative Steam account with Steam Guard disabled.
# Before doing anything with the headless, launch Resonite from the account you're using here and accept any license agreements.

STEAM_USERNAME="steamusername"
STEAM_PASSWORD="steampassword"

# You will need to message the Resonite bot /headlessCode to get the headless beta code.

RESONITE_BETA_CODE="betacode"

# Directory for the headless installation. Change this if you want to put the headless somewhere else.
# Defaults to ~/Resonite
RESONITE_DIRECTORY="${HOME}/Resonite"

# Install / update Resonite
steamcmd +login ${STEAM_USERNAME} ${STEAM_PASSWORD} +force_install_dir ${RESONITE_DIRECTORY} +app_update 2519830 -beta headless -betapassword ${RESONITE_BETA_CODE} +quit

cd ${RESONITE_DIRECTORY}/Headless

mono Resonite.exe

A gist containing just this script can be found here

Edit STEAM_USERNAME, STEAM_PASSWORD and RESONITE_BETA_CODE to the correct values. Edit RESONITE_DIRECTORY if you wish.

Save and close the file.

Run chmod +x launch.sh to make the script executable

Run ./launch.sh to download the headless client and run it for the first time. Once you see yourcomputername World 0 in the console, type shutdown to close the headless client.

Config file

cd into the Config directory of the headless - by default, ~/Resonite/Headless/Config

Copy the default config file and name it Config.json - cp DefaultConfig.json Config.json

Edit the config file in your favourite text editor and change it as needed. You can find information here

Save and close the file.

Running the headless

To run the headless, open a screen session by typing screen.

In the directory where launch.sh is, run ./launch.sh.

The headless should now start.

To detach from the screen session, press CTRL+A then hit the D key on your keyboard.

To reattach to the screen session, type screen -r in your console.

Info

This guide is licensed under Creative Commons CC0. do whatever with it as you wish.

Last edit: 2024-01-13 (add link to config gist)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment