> How SPX is configured from config file? All [[Documentation/Server/Overview|SPX Server]] configurations can be found in `config.json` in the root SPX folder. --- ## Authentication ### `general.username` / `general.password` Controls user authentication for SPX. - **username**: The login username - **password**: Encrypted password (stored in unreadable format) **Behavior:** - If `username` is present but `password` is left blank, the app will ask for login policy (see [[Guides/Getting Started/First Launch|First Launch]]) - When both are entered, the password is saved encrypted and login is required to start a session - Password encryption ensures security even if config file is accessed ## Server Identification ### `general.hostname` Identifies the SPX instance for logging purposes. ```json "hostname": "My main machine" ``` **Use cases:** - Distinguishing multiple instances in logs - Identifying instances in multi-server setups - Mostly for future use and logging ## Localization ### `general.langfile` File reference in `locales`-folder for a JSON file containing UI strings in that language. ```json "langfile": "english.json" ``` The `locales` folder is scanned at server start and files are shown in the configuration as language options. **Available Languages:** - English (default) - Dutch (v1.0.12) - Chinese (v1.1.0) - Swedish (v1.1.2) - Portuguese (v1.1.2) - Japanese (v1.3.0) - German (v1.3.3) > If you're interested in translating SPX user interface to your local language, see [SPXLocaleEditor](https://github.com/TuomoKu/SPXLocaleEditor) repository for a browser-based utility. ## Logging ### `general.loglevel` Controls the verbosity of log messages. **Values:** - `error` - Least logging (errors only) - `warn` - Warnings and errors - `info` - Default value (informational messages) - `verbose` - Recommended for troubleshooting - `debug` - Most log data (for deep analysis) **Default:** `info` Log messages are shown in the SPX console window and stored in log files in the logfolder. The active file is named `access.log`. > **Tip:** Remember to set log level back to `info` after troubleshooting, as heavy logging will increase disk usage and may affect software performance. ### `general.logfolder` Path to the folder where log files are stored. ```json "logfolder": "X:/SPX/LOG/" ``` ## Network Settings ### `general.port` The port number on which SPX server listens. ```json "port": "5656" ``` **Default:** `5656` Change this if the port is already in use or you need multiple instances. ## File Paths ### `general.dataroot` Path to the folder where [[Documentation/Graphics Controller/Project Settings|projects]] and [[Documentation/Graphics Controller/Rundown Settings|rundowns]] are stored. ```json "dataroot": "X:/SPX/DATAROOT/" ``` **Structure:** - Projects are subfolders in the dataroot folder - Rundowns are JSON files in project subfolders - Project settings are stored in `profile.json` within each project folder ## Template Source ### `general.templatesource` (Added in v1.0.9) For [[Documentation/Renderer/Workflows/CasparCG - AMCP|CasparCG]] playout, [[Documentation/Graphic Templates/Overview|templates]] can be loaded from the filesystem or via HTTP connection provided by SPX. **Supported values:** - `spx-ip-address` - Automatically use SPX's IP address and HTTP protocol for playing out templates from SPX's template folder (default) - `casparcg-template-path` - Playout templates from target CasparCG server's file system template-path (see `caspar.config` file) - `http://<ip-address>` - Manually entered address when automatically generated IP is not usable (e.g., Docker containers, VM hosted instances) > [!note] `templatesource` only affects CasparCG playout, not [[Documentation/Renderer/Web Render|web playout]]. Also, `file://` protocol is more restrictive in using external data sources and can yield JavaScript errors, such as CORS. ## Preview Settings ### `general.preview` (Version 1.1.0+) Controls which event on the [[Documentation/Graphics Controller/Rundown Settings|rundown]] triggers a preview in the [[Documentation/Renderer/Preview & Program|preview renderer]]. **Values:** - `selected` - Preview will play whenever a focus is changed on the rundown (default) - `none` - Preview will not be triggered - ~~`next`~~ - Preview will play the next item from the rundown when an item is played (coming later) Any output [[Documentation/Renderer/Overview|renderer]] is treated as a preview renderer if `preview=true` parameter is present in the renderer URL. ## Renderer Display ### `general.renderer` (Version 1.1.0+) Option to have the [[Documentation/Graphics Controller/Local Renderer|local renderer]] in traditional position at the top right corner of SPX UI or taken out to a floating window. **Values:** - `normal` - Inline renderer view (default) - `popup` - Renderer in a floating window "popup" > [!note] Popup blocker may prevent popup from working as expected. ### `general.resolution` (Version 1.3.0+) Affects output from SPX [[Documentation/Renderer/Resolutions|renderer viewport size]]. **Values:** - `HD` - 1920 x 1080 pixels (16:9) - Default - `4K` - 3840 x 2160 pixels (16:9) - `AUTO` - Full output height and width of the browser viewport rendering the template > [!note] Templates will also need to support the set size and aspect ratio. Most templates are implemented or optimized for 16:9 aspect ratio and 1920x1080 output size. ## Browser Launch ### `general.launchBrowser` Controls whether the browser is automatically opened when the server starts. ```json "launchBrowser": false ``` **Default:** `false` Set to `true` to automatically open the browser on every server start. ## Advanced Options ### `general.disableConfigUI` Disables the web-based configuration interface. ```json "disableConfigUI": true ``` When enabled, configuration must be done manually by editing the config file. ### `general.apikey` API key for external [[Documentation/Control Interfaces/REST/Overview of SPX API|API]] access (if required). ```json "apikey": "" ``` ### `general.disableLocalRenderer` Disables the [[Documentation/Graphics Controller/Local Renderer|local renderer]] preview. ```json "disableLocalRenderer": false ``` ### `general.disableSeveralControllersWarning` Disables warning when multiple controllers are detected. ```json "disableSeveralControllersWarning": false ``` ## Global Extras ### `globalExtras` Additional user interface controls, or [[Documentation/Graphics Controller/Plugins & Extensions|plugins]], shown below the preview window in all projects (as opposed to project-specific extras). ```json "globalExtras": { "customscript": "/ExtraFunctions/demoFunctions.js" } ``` > [!warning] Global extras will be replaced by [[Documentation/Graphics Controller/Plugins & Extensions|Plugins]] in future versions, since they are easier to install and maintain. ## Restart Required > [!warning] The SPX server process must be restarted whenever changes are made to the configuration file. --- ## Read Next - [[Documentation/Renderer/Workflows/CasparCG - AMCP|CasparCG Setup]] - Configure CasparCG servers - [[Documentation/Renderer/Overview|Renderer Overview]] - Understanding SPX renderers - [[Documentation/Graphics Controller/Application Configuration|Application Configuration]] - UI configuration options - [[FAQ/Troubleshooting|Troubleshooting]] - Common configuration issues