Skip to main content

Configuration

tip

Check out configuration.ts for all possible environment variables incase we forgot to update this page.

All configuration properties of your GameVault server are passed as environment variables or via a .env file. The following tables describe the available properties, their default values, explanations, and possible values.

Configuration Properties

This page describes the various configuration properties used in the application. These properties can be configured in the environment variables or in a .env file.

SERVER

PropertyDescriptionDefaultPossible Values
PUIDThe User-Identifer that should be used.1000Any user id (number)
PGIDThe Group-Identifer that should be used.1000Any group id (number)
SERVER_PORTThe port the server should use. (Only use this when running the server natively)8080Any non-reserved free port (1024 to 49151)
SERVER_LOG_LEVELThe log level of the server.infodebug, info, warn, error, fatal, off
SERVER_LOG_FILES_ENABLEDIf the server should also write the logs to the VOLUMES_LOGS directory via rolling file logger.falsetrue, false
SERVER_REQUEST_LOG_FORMATThe morgan log format for incoming HTTP RequestsCustom Log Formatshort, combined and many more
SERVER_CORS_ALLOWED_ORIGINSAllowed CORS origins for the server.All OriginsA comma-separated list of origins
SERVER_REGISTRATION_DISABLEDIf registration is enabled or not.falsetrue, false
SERVER_ONLINE_ACTIVITIES_DISABLEDWether or not the server should listen to online activities like "ONLINE", "BUSY", "PLAYING" etc. If this is set to true, all users will always be shown as offline.falsetrue, false
SERVER_ACCOUNT_ACTIVATION_DISABLEDIf accounts need to be activated by an admin before using them.falsetrue, false
SERVER_ADMIN_USERNAMEAutomatically grants Admin Role to User with this Username on register, or startup.-Any username
SERVER_ADMIN_PASSWORDResets the admin user password to this password on startup. Only used for password reset in case of lockout. ⚠️ CAUTION: This won't register a new account for you!-Any password (No Length Validation)
SERVER_API_DOCS_ENABLEDEnables the API Specification Documenation on /api/docs, /api/docs-json & /api/docs/yaml.falsetrue, false
SERVER_MAX_DOWNLOAD_BANDWIDTH_IN_KBPSMaximum bandwidth for downloads on this server in KB/s. ⚠️ CAUTION: Too high number may crash the server upon game download.1000000 (10 GB/s)Any Number

VOLUMES

PropertyDescriptionDefaultPossible Values
VOLUMES_FILESFolder inside container used for game files./filesAny valid folder path
VOLUMES_IMAGESFolder inside container used for images./imagesAny valid folder path
VOLUMES_LOGSFolder inside container used for logs./logsAny valid folder path
VOLUMES_SQLITEDBFolder inside container used for SQLITE database. (Not needed id you use POSTGRESQL as database system)/dbAny valid folder path

DB

PropertyDescriptionDefaultPossible Values
DB_SYSTEMThe database system used (POSTGRESQL or SQLITE).POSTGRESQLPOSTGRESQL, SQLITE
DB_HOSTThe host of the database (not needed for SQLITE).localhostAny valid host name
DB_PORTThe port of the database (not needed for SQLITE).5432Any valid port number
DB_USERNAMEThe username for the database (not needed for SQLITE).defaultAny valid username
DB_PASSWORDThe password for the database (not needed for SQLITE).defaultAny valid password
DB_DATABASEThe database name (not needed for SQLITE).gamevaultAny valid database name
DB_SYNCHRONIZEForce synchronizes the database with the entities. ⚠️ CAUTION: This could break your db!falsetrue, false
DB_DEBUGLog all SQL Statements sent to the database.falsetrue, false

RAWG_API

PropertyDescriptionDefaultPossible Values
RAWG_API_URLBase URL of the RAWG API.https://api.rawg.io/apiAny valid URL
RAWG_API_KEYAPI key for the RAWG API.""Any valid RAWG API key
RAWG_API_CACHE_DAYSWhen to renew RAWG API cached data (in days).30Any positive integer
RAWG_API_EXCLUDE_STORESDeprecated in favour of RAWG_API_INCLUDED_STORES. This is a list of stores that the RAWG matching algorithm will exclude. You can specify these stores as a comma-separated list with no spaces. To find the Store IDs, refer to this page. By default, we exclude itch.io to filter out a large number of asset flips.9 (itch.io)Any comma-separated string of store IDs
RAWG_API_INCLUDED_STORESThis is a default list of stores that the RAWG search algorithm will search games on. You can specify these stores as a comma-separated list. You can also enter 0 to search all. To find the RAWG Store IDs, refer to this page. By default, we exclude itch.io (ID 9) to filter out a large number of bad asset flips.1,2,3,4,5,6,7,8,11Any comma-separated string of RAWG Store IDs
RAWG_API_INCLUDED_PLATFORMSThis is a default list of platforms that the RAWG search algorithm will search games on. You can specify these platforms as a comma-separated list. You can also enter 0 to search all. To find the RAWG Platform IDs, refer to this page. By default, we search all platforms (ID 0).0Any comma-separated string of RAWG Platform IDs

GAMES

PropertyDescriptionDefaultPossible Values
GAMES_INDEX_INTERVAL_IN_MINUTESThe index interval, measured in minutes, decides how frequently the server should check for changes in games in the /files directory. This used to be essential before we implemented the filewatcher to the server. Nowadays, it's optional for rare situations where the filewatcher might miss changes. If set to 0, it won't regularly trigger reindexing and solely depend on the filewatcher.60Any number
GAMES_SUPPORTED_FILE_FORMATSComma-Seperated list of supported file-types GameVault should detect.see here".zip,.7z,.rar"
GAMES_SEARCH_RECURSIVEIf indexer should search for games in subfolders.true"true", "false

USERS

PropertyDescriptionDefaultPossible Values
USERS_REQUIRE_EMAILRequire Email Field for new registrations.falsetrue, false
USERS_REQUIRE_FIRST_NAMERequire First Name Field for new registrations.falsetrue, false
USERS_REQUIRE_LAST_NAMERequire Last Name Field for new registrations.falsetrue, false

IMAGE

PropertyDescriptionDefaultPossible Values
IMAGE_MAX_SIZE_IN_KBhe maximum size for image uploads in kilobytes. Set it to 0 to disable image uploads.10000 (10MB)Any number
IMAGE_GOOGLE_API_RATE_LIMIT_COOLDOWN_IN_HOURSThe amount of time to wait when the server reaches the rate limit for the Google Images API.24Any number
IMAGE_SUPPORTED_IMAGE_FORMATSList of supported image formats (MIME Types) on this server, separated by commas.image/bmp, image/jpeg, image/png, image/tiff, image/gif, image/x-iconList of image/* content types.
IMAGE_GC_DISABLEDWhether or not image garbage collection is enabled.truetrue, false
IMAGE_GC_INTERVAL_IN_MINUTESThe interval in minutes for image garbage collection.60Any number

PLUGIN

PropertyDescriptionDefaultPossible Values
PLUGIN_ENABLEDIf set to true, the server will try to load and run plugins listed in the PLUGIN_SOURCES array.falsetrue, false
PLUGIN_SOURCESA list of paths for GameVault plugins to load, separated by commas.-Any list of paths

TESTING

PropertyDescriptionDefaultPossible Values
TESTING_AUTHENTICATION_DISABLEDIf true, the API will accept any auth header. Useful for testing without authentication.falsetrue, false
TESTING_MOCK_FILESIf true, the server will mock all files or ignore filesystem functionalities. Useful for testing without real files.falsetrue, false
TESTING_IN_MEMORY_DBIf true, the server will use an in-memory database. Useful for testing without creating an actual database. Only works with SQLITE.falsetrue, false
TESTING_RAWG_API_DISABLEDIf true, the server will not make any external API calls to RAWG. Useful for testing without depending on the API.falsetrue, false
TESTING_GOOGLE_API_DISABLEDIf true, the server will not make any external API calls to Google. Useful for testing without depending on the API.falsetrue, false