Docker container - glitchfur/NeosVR-Headless-API GitHub Wiki

The Docker container is intended for users of shadowpanther's neosvr-headless containerized headless client. The image that NeosVR-Headless-API provides is based on theirs, and bundles the RPC server with the headless client. Note that you still need to provide details such as the beta name and password, and a Steam login to download the headless client. See the Neos wiki for details on how to obtain the headless client.

This is not a drop-in replacement for the bare headless client container. The headless client still needs to be started manually after starting the container, which is explained below.

Before you begin

You still need to follow the Getting started guide to get NeosVR-Headless-API set up locally on your machine. You will use this to connect to the Docker container as if it were a "remote" host (regardless of whether it will be running on the same machine or not).

Running the container

The image can be obtained with the following command:

$ docker pull ghcr.io/glitchfur/neosvr-headless-api

It is strongly recommended to start the container using the supplied sample Docker Compose file. Download docker-compose.sample.yml to a directory of your choice (also rename it if you'd like). Settings that have to be changed are the environment variables STEAMBETA, STEAMBETAPASSWORD, and STEAMLOGIN. See shadowpanther's repo for information on how to supply these values.

You may add the --port parameter to command if you wish to run the RPC server on a different port, just make sure that you also update the forwarded ports: accordingly.

You can start the Docker container in a detached state like so:

$ docker-compose -f docker-compose.yml up -d

To bring it back down, simply replace up -d with down.

Once the container is started, the headless client will download automatically and the RPC server will start. On your local machine, you can connect to and start a headless client inside the container like this:

from neosvr_headless_api import RemoteHeadlessClient

hc = RemoteHeadlessClient("127.0.0.1", 16881, "/home/steam/neosvr-headless", config="/Config/Config.json")
hc.wait_for_ready()

The NeosVR headless client and config paths refer to their locations inside the container, and likely do not need to be changed. The port will need to be changed if you changed the port the RPC server is running on. The hostname depends on where you are running the container. If it's on the same machine, leave it as is, but if it's not, further tweaks may need to be made to the Docker Compose file to expose it on a network. Do note that at this point in time, using a bare remote headless connection is not secure.

Troubleshooting

Error: ConnectionRefusedError: [Errno 111] Connection refused

The container may still be downloading the headless client. Try again in a minute or so.

.wait_for_ready() never returns

There may be an issue with the headless client configuration. In the Docker Compose file, there is a comment towards the bottom that tells you how to edit the file to start the headless client itself rather than the RPC server. This will let you view the console and catch any errors.

Error: Config file not found!

Relative to your Docker Compose file, the container should have created Config and Logs folders. Put your headless client configuration in the Config folder, named Config.json.

Permission denied when writing to Config or Log folders

If the container created these folders, they were probably created with root permissions and are hence unwriteable. The container drops root permissions when it no longer needs them, so you'll need to make these directories writeable by a standard user:

$ chown -R username:username Config/ Logs/
⚠️ **GitHub.com Fallback** ⚠️