Minus Games

Minus Games is a Suite to Distribute Games from a server to a client. It consists of the 5 applications:

To get everything up and running see the Quick Start Guide

The Project can be found on GitHub

FAQ

What is the main use case?

The main use case is to distribute games and save files from the server to the clients in a home server environment.

What is the main advantage of Minus Games?

Minus Games does not just keep the game files in sync with the server, it is also capable to sync save files.

What was the main motivation to create Minus Games?

I wanted a way to sync save games between my Steamdeck and my Desktop PC for games that are not managed by Steam or other game launchers.

What is the main way to use the Minus Games?

The main way is to start configure the server and put the games in the designated game folder. After that, let the server search for new files by calling the /finder/rerun-finder endpoint.

The server will scan for new games and make them available for the client. The client now can download the games and run them.

If the game has a known engine like Unity. It will check for save files. The sync of the save files is done by the client. For a full Quick Start see the Quick Start Guide

Quickstart

Step 1: Set up the Minus Games Server

Setup

For a quick and easy installation, it is recommended to have the minus_games_server executable, the data, and the games folder in one directory.

The server can be configured by command line args or by a .env file. An example .env file can look like this:

# default ip is 127.0.0.1 
# IP=0.0.0.0 
# default port is 8415
# PORT=8415
DATA_FOLDER=data
GAMES_FOLDER=games

This would result in an initial layout like this.

.
├── minus_games_server      # Main executable
├── .env                    # Server configuration file
├── games                   # Documentation files (alternatively `doc`)
    ├── Game 1              # Every game has its own folder
    ├── Game 2              
    ├── ...               
├── data                    # Folder for the games metadata (created by the finder or the server)
├── users                   # Folder for the user configuration

After setting up the games and the config, you can simply run the server with ./minus_games_server (or .\minus_games_server.exe under Windows).

This will run the server and expose the OpenAPI and the Swagger UI under http://[your-server]:[your-port]/swagger-ui -> defaults to http://localhost:8415/swagger-ui.

Add Game

To add a game, copy the main folder of the game into the games folder. After that, you can visit the swagger-ui and run the finder/rerun-finder endpoint. Alternatively, you can use the minus_games_finder to create the needed metadata.

Step 2: Set up the Minus Games Gui

The GUI can be set up in nearly the same way as the server. The easiest way to configure the GUI is by adding a .env file. It is also possible to configure everything within the GUI under Settings.

Example .env file:

# When running under linux a wine be used and set up by setting the WINE_EXE and WINE_PREFIX environment variable.
# The server url defaults to localhost if not specified
# SERVER_URL="http://localhost:8415"
CLIENT_GAMES_FOLDER=client_games
CLIENT_FOLDER=client_data

The order in witch the configuration is applied is:

  1. Command line args
  2. .env file
  3. Config File

Higher priority settings will overwrite lower priority settings.

This setup will result in a GUI folder layout like this:

.
├── minus_games_client      # Main executable
├── .env                    # Client configuration file
├── client_games            # Documentation files (alternatively `doc`)
    ├── Game 1              # Every game has its own folder
    ├── Game 2              
    ├── ...               
├── client_data             # Folder for the games metadata (created by the finder or the server)

To run the GUI, make sure the server is running and that the server points at the server. The GUI can run downloaded games offline, but it will not be possible to sync saves or download games.

Now run the GUI with:

./minus_games_gui

# Or under windows
#.\minus_games_gui.exe

To Download a game run and sync it just select the first option. The Gui will lookup the games that are already installed and the games that are available on the server. Now you can select a game from a that list and run it.

Minus Games Server

Configuration Options

OptionDescriptionDefaultEnvironment VariableCommand Line Argument
ipThe IP address to bind to.127.0.0.1IP--ip
portThe port number to listen on.8415PORT--port
games_folderThe folder where games are stored.Current directoryGAMES_FOLDER--games-folder
data_folderThe folder where data is stored.Data folderDATA_FOLDER--data-folder
cache_folderThe folder where cache is stored (optional).NoneCACHE_FOLDER--cache-folder
config_fileThe configuration file to use (optional).NoneNone--config-file

Minus Games Client

Configuration Options

OptionDescriptionDefaultEnvironment VariableCommand Line Argument
server_urlThe URL of the server.http://127.0.0.1:8415SERVER_URL--server-url
client_folderThe folder where client data is stored.Client folderCLIENT_FOLDER--client-folder
wine_exeThe path to the Wine executable (optional).NoneWINE_EXE--wine-exe
wine_prefixThe path to the Wine prefix (optional).NoneWINE_PREFIX--wine-prefix
verboseEnable verbose output.falseVERBOSE-v or --verbose
offlineRun in offline mode.falseOFFLINE-o or --offline
client_games_folderThe folder where client games are stored.Current directoryCLIENT_GAMES_FOLDER--client-games-folder
usernameThe username for authentication (optional).NoneMINUS_GAMES_USERNAME--username
passwordThe password for authentication (optional).NoneMINUS_GAMES_PASSWORD--password
actionThe action to perform.NoneNoneSubcommands like list, download, sync, etc.

Actions

ActionDescriptionCommand Line ArgumentAdditional Value Needed
ListLists all available games.listNone
ListJsonLists all available games in JSON format.list-jsonNone
DownloadDownloads the specified game.downloadgame
SyncSynchronizes information for all games.syncNone
SelectDownloadPrompts the user to select a game to download.select-downloadNone
RunGameRuns the specified game.run-gamegame
RunGameSyncedRuns the specified game with synchronization.run-game-syncedgame
SyncRunGameSynchronizes and runs the specified game.sync-run-gamegame
SelectGamePrompts the user to select a game.select-gameNone
DeleteGameDeletes the specified game, optionally purging it.delete-gamegame, purge
SelectDeleteGamePrompts the user to select a game to delete, optionally purging it.select-delete-gamepurge
MenuDisplays the main menu.menuNone
RepairRepairs the specified game.repairgame
SelectRepairPrompts the user to select a game to repair.select-repairNone
DownloadSyncsDownloads synchronization data for all games.download-syncsNone
DownloadSyncDownloads synchronization data for the specified game.download-syncgame
UploadSyncsUploads synchronization data for all games.upload-syncsNone
ScanForGamesScans for installed games.scan-for-gamesNone
SelectGameToPlayPrompts the user to select a game to play (only on Unix systems).select-game-to-playNone

Minus Games Gui

Configuration Options

The Minus Games Gui uses the same options as the Minus Games Client and if the mode is set to Cli the Gui will behave like the client.

OptionDescriptionDefaultEnvironment VariableCommand Line Argument
fullscreenWhether to run in fullscreen mode.falseMINUS_GAMES_GUI_FULLSCREEN--fullscreen
modeThe mode to run the GUI in.GuiMINUS_GAMES_GUI_MODE--mode
themeThe theme of the GUI.LightMINUS_GAMES_GUI_THEME--theme
server_urlThe URL of the server.http://127.0.0.1:8415SERVER_URL--server-url
client_folderThe folder where client data is stored.Client folderCLIENT_FOLDER--client-folder
wine_exeThe path to the Wine executable (optional).NoneWINE_EXE--wine-exe
wine_prefixThe path to the Wine prefix (optional).NoneWINE_PREFIX--wine-prefix
verboseEnable verbose output.falseVERBOSE-v or --verbose
offlineRun in offline mode.falseOFFLINE-o or --offline
client_games_folderThe folder where client games are stored.Current directoryCLIENT_GAMES_FOLDER--client-games-folder
usernameThe username for authentication (optional).NoneMINUS_GAMES_USERNAME--username
passwordThe password for authentication (optional).NoneMINUS_GAMES_PASSWORD--password

Minus Games Finder

Configuration Options

OptionDescriptionDefaultEnvironment VariableCommand Line Argument
games_folderThe folder where games are stored.Current directoryGAMES_FOLDER--games-folder
data_folderThe folder where data is stored.Data folderDATA_FOLDER--data-folder
cache_folderThe folder where cache data is stored (optional).NoneCACHE_FOLDER--cache-folder
keep_existing_configsWhether to keep existing configurations.trueKEEP_EXISTING_CONFIGS--keep-existing-configs
cleanup_data_folderWhether to clean up the data folder.falseCLEANUP_DATA_FOLDER--cleanup-data-folder
filterA filter to apply (optional).NoneFILTER--filter

Minus Games Updater

Configuration

OptionDescriptionDefaultEnvironment VariableCommand Line Argument
server_urlThe URL of the server.NoneSERVER_URL--server-url
toThe path to update the client to.NoneTO--to
for_osThe operating system for the update.Currently Running OSFOR_OS--for-os
usernameThe username for authentication (optional).NoneMINUS_GAMES_USERNAME--username
passwordThe password for authentication (optional).NoneMINUS_GAMES_PASSWORD--password