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
# MINUS_GAMES_PORT=8415
MINUS_GAMES_DATA_FOLDER=data
MINUS_GAMES_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
# MINUS_GAMES_SERVER_URL="http://localhost:8415"
MINUS_GAMES_CLIENT_GAMES_FOLDER=client_games
MINUS_GAMES_CLIENT_FOLDER=client_data
The order in witch the configuration is applied is:
- Command line args
- .env file
- 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
Option | Description | Default | Environment Variable | Command Line Argument |
---|---|---|---|---|
ip | The IP address to bind to. | 127.0.0.1 | MINUS_GAMES_IP | --ip <IP> |
port | The port number to listen on. | 8415 | MINUS_GAMES_PORT | --port <PORT> |
games_folder | The folder where games are stored. | ./games | MINUS_GAMES_GAMES_FOLDER | --games-folder <GAMES_FOLDER> |
data_folder | The folder where data is stored. | ./data | MINUS_GAMES_DATA_FOLDER | --data-folder <DATA_FOLDER> |
cache_folder | The folder where cache is stored (optional). | Not specified (effectively None if not set) | MINUS_GAMES_CACHE_FOLDER | --cache-folder <CACHE_FOLDER> |
config_file | The configuration file to use (optional). | Not specified (effectively None if not set) | MINUS_GAMES_CONFIG_FILE | --config-file <CONFIG_FILE> |
Minus Games Client
Configuration Options
Option | Description | Default | Environment Variable | Command Line Argument |
---|---|---|---|---|
server_url | The URL of the server. | http://127.0.0.1:8415 | MINUS_GAMES_SERVER_URL | --server-url <SERVER_URL> |
client_folder | The folder where client data is stored. | ./client | MINUS_GAMES_CLIENT_FOLDER | --client-folder <CLIENT_FOLDER> |
wine_exe | The path to the Wine executable (optional). | Not set (env example: /usr/bin/umu-run ) | MINUS_GAMES_WINE_EXE | --wine-exe <WINE_EXE> |
wine_prefix | The path to the Wine prefix (optional). | Not set (env example: ./wine ) | MINUS_GAMES_WINE_PREFIX | --wine-prefix <WINE_PREFIX> |
verbose | Enable verbose output. | false | MINUS_GAMES_VERBOSE | -v, --verbose |
offline | Run in offline mode. | false (enabled if env var MINUS_GAMES_OFFLINE is set) | MINUS_GAMES_OFFLINE | -o, --offline |
client_games_folder | The folder where client games are stored. | ./client_games | MINUS_GAMES_CLIENT_GAMES_FOLDER | --client-games-folder <CLIENT_GAMES_FOLDER> |
username | The username for authentication (optional). | Not set (empty if env var MINUS_GAMES_USERNAME is set without value) | MINUS_GAMES_USERNAME | --username <USERNAME> |
password | The password for authentication (optional). | Not set (empty if env var MINUS_GAMES_PASSWORD is set without value) | MINUS_GAMES_PASSWORD | --password <PASSWORD> |
action | The action to perform. | None (must be specified) | Not applicable | Subcommands |
Actions
Action | Description | Command Line Argument | Additional Value Needed |
---|---|---|---|
List | Lists all available games. | list | None |
ListJson | Lists all available games in JSON format. | list-json | None |
Download | Downloads the specified game. | download | game |
Sync | Synchronizes information for all games. | sync | None |
SelectDownload | Prompts the user to select a game to download. | select-download | None |
RunGame | Runs the specified game. | run-game | game |
RunGameSynced | Runs the specified game with synchronization. | run-game-synced | game |
SyncRunGame | Synchronizes and runs the specified game. | sync-run-game | game |
SelectGame | Prompts the user to select a game. | select-game | None |
DeleteGame | Deletes the specified game, optionally purging it. | delete-game | game , purge |
SelectDeleteGame | Prompts the user to select a game to delete, optionally purging it. | select-delete-game | purge |
Menu | Displays the main menu. | menu | None |
Repair | Repairs the specified game. | repair | game |
SelectRepair | Prompts the user to select a game to repair. | select-repair | None |
DownloadSyncs | Downloads synchronization data for all games. | download-syncs | None |
DownloadSync | Downloads synchronization data for the specified game. | download-sync | game |
UploadSyncs | Uploads synchronization data for all games. | upload-syncs | None |
ScanForGames | Scans for installed games. | scan-for-games | None |
SelectGameToPlay | Prompts the user to select a game to play (only on Unix systems). | select-game-to-play | None |
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.
Option | Description | Default | Environment Variable | Command Line Argument |
---|---|---|---|---|
fullscreen | Whether to run in fullscreen mode. | false | MINUS_GAMES_GUI_FULLSCREEN | --fullscreen |
mode | The mode to run the GUI in. | Gui | MINUS_GAMES_GUI_MODE | --mode |
theme | The theme of the GUI. | Light | MINUS_GAMES_GUI_THEME | --theme |
server_url | The URL of the server. | http://127.0.0.1:8415 | MINUS_GAMES_SERVER_URL | --server-url <SERVER_URL> |
client_folder | The folder where client data is stored. | ./client | MINUS_GAMES_CLIENT_FOLDER | --client-folder <CLIENT_FOLDER> |
wine_exe | The path to the Wine executable (optional). | Not set (no default) | MINUS_GAMES_WINE_EXE | --wine-exe <WINE_EXE> |
wine_prefix | The path to the Wine prefix (optional). | Not set (no default) | MINUS_GAMES_WINE_PREFIX | --wine-prefix <WINE_PREFIX> |
verbose | Enable verbose output. | false | MINUS_GAMES_VERBOSE | -v , --verbose |
offline | Run in offline mode. | false | MINUS_GAMES_OFFLINE | -o , --offline |
client_games_folder | The folder where client games are stored. | ./client_games | MINUS_GAMES_CLIENT_GAMES_FOLDER | --client-games-folder <CLIENT_GAMES_FOLDER> |
username | The username for authentication (optional). | MINUS_GAMES_USERNAME | --username <USERNAME> | |
password | The password for authentication (optional). | MINUS_GAMES_PASSWORD | --password <PASSWORD> | |
no-gamemoderun | Disable the use of gamemoderun. | false (i.e., gamemoderun is used by default) | MINUS_GAMES_NO_GAMEMODERUN | --no-gamemoderun |
sync | Controls default synchronization behavior (e.g., for run-game). | true | MINUS_GAMES_SYNC | --sync |
help | Print help message or the help of the given subcommand(s). | N/A | N/A | -h , --help |
version | Print version information. | N/A | N/A | -V , --version |
Minus Games Finder
Configuration Options
Option | Description | Default | Environment Variable | Command Line Argument |
---|---|---|---|---|
games_folder | The folder where client games are stored. | ./client_games | MINUS_GAMES_CLIENT_GAMES_FOLDER | --client-games-folder <CLIENT_GAMES_FOLDER> |
data_folder | The folder where client data is stored. | ./client | MINUS_GAMES_CLIENT_FOLDER | --client-folder <CLIENT_FOLDER> |
cache_folder | The folder where cache data is stored (optional). | None | CACHE_FOLDER | --cache-folder |
keep_existing_configs | Whether to keep existing configurations. | true | KEEP_EXISTING_CONFIGS | --keep-existing-configs |
cleanup_data_folder | Whether to clean up the data folder. | false | CLEANUP_DATA_FOLDER | --cleanup-data-folder |
filter | A filter to apply (optional). | None | FILTER | --filter |