Overview
TheMainConfig class is the central configuration system for FreeTAKServer. It provides a singleton instance that manages all server configuration through multiple sources:
- Default values
- YAML configuration file
- Environment variables
- Built-in defaults
- YAML configuration file (
FTSConfig.yaml) - Environment variables (highest priority)
Configuration Methods
FreeTAKServer supports three methods for configuration:YAML Configuration File
The default configuration file location is/opt/fts/FTSConfig.yaml. You can override this with the FTS_CONFIG_PATH environment variable.
Environment Variables
All configuration options can be set via environment variables. Environment variables override YAML settings.Programmatic Access
System Configuration
Core system settings that control server behavior.string
default:"FreeTAKServer-2.2.1"
Server version information (read-only)
string
default:"3"
TAK API version supported (read-only)
string
default:"auto-generated"
Unique identifier for this FreeTAKServer node. Auto-generated as 32-character alphanumeric string if not specified.Environment variable:
FTS_NODE_IDstring
default:"vnkdjnfjknfl1232#"
Secret key used for cryptographic operations and session management. Change this in production!Environment variable:
FTS_SECRET_KEYboolean
default:"true"
Enable API optimizations for better performanceEnvironment variable:
FTS_OPTIMIZE_APIinteger
default:"100"
Number of milliseconds to wait between each iteration of the main event loop.
- Decreasing this value increases CPU usage and server performance
- Increasing this value decreases CPU usage and server performance
FTS_MAINLOOP_DELAYinteger
default:"1024"
Buffer size in bytes for receiving data from clientsEnvironment variable:
FTS_DATA_RECEPTION_BUFFERinteger
default:"4"
Maximum time in seconds to wait for data receptionEnvironment variable:
FTS_MAX_RECEPTION_TIMEstring
default:"info"
Logging level for the server. Valid values:
debug, info, warning, error, criticalEnvironment variable: FTS_LOG_LEVELstring
Message sent to clients upon successful connection. Set to
None to disable.Environment variable: FTS_CONNECTION_MESSAGEinteger
default:"0"
Radius in meters within which users will receive emergency notifications. Set to
0 for unlimited range.Environment variable: FTS_EMERGENCY_RADIUSNetwork Configuration
Network addresses and port settings for various services.integer
default:"8087"
TCP port for unencrypted CoT (Cursor on Target) serviceEnvironment variable:
FTS_COT_PORTinteger
default:"8089"
TCP port for SSL/TLS encrypted CoT serviceEnvironment variable:
FTS_SSLCOT_PORTinteger
default:"8080"
HTTP port for TAK API service (unencrypted)Environment variable:
FTS_HTTP_TAK_API_PORTinteger
default:"8443"
HTTPS port for TAK API service (encrypted)Environment variable:
FTS_HTTPS_TAK_API_PORTinteger
default:"19023"
Port for the REST API serviceEnvironment variable:
FTS_API_PORTstring
default:"0.0.0.0"
IP address for the REST API service to bind to. Use
0.0.0.0 to listen on all interfaces.Environment variable: FTS_API_ADDRESSinteger
default:"9000"
Port for federation serviceEnvironment variable:
FTS_FED_PORTstring
default:"auto-detected"
IP address used for data package service. Auto-detected by default. Must be set correctly for private data packages to work.Environment variable:
FTS_DP_ADDRESSstring
default:"auto-detected"
IP address that clients should use to connect. Auto-detected by default. Should match the IP used in TAK device connection settings.Environment variable:
FTS_USER_ADDRESSstring
default:"127.0.0.1"
IP address for CLI access
list
default:"[127.0.0.1]"
List of IP addresses allowed to access the CLI interfaceEnvironment variable:
FTS_CLI_WHITELIST (colon or comma separated)Routing and Integration
Configuration for the internal message routing and integration system.integer
default:"3"
Number of routing worker processes to spawn for handling messagesEnvironment variable:
FTS_NUM_ROUTING_WORKERSinteger
default:"19030"
Port for routing proxy to subscribe to requestsEnvironment variable:
FTS_ROUTING_PROXY_SUBSCRIBE_PORTstring
default:"127.0.0.1"
IP address for routing proxy subscriberEnvironment variable:
FTS_ROUTING_PROXY_SUBSCRIBE_IPinteger
default:"19032"
Port for routing proxy to publish responsesEnvironment variable:
FTS_ROUTING_PROXY_PUBLISHER_PORTstring
default:"127.0.0.1"
IP address for routing proxy publisherEnvironment variable:
FTS_ROUTING_PROXY_PUBLISHER_IPinteger
default:"19031"
Port for routing proxy to send requests to workersEnvironment variable:
FTS_ROUTING_PROXY_SERVER_PORTstring
default:"127.0.0.1"
IP address for routing proxy request serverEnvironment variable:
FTS_ROUTING_PROXY_SERVER_IPinteger
default:"19033"
Port for integration manager to receive worker responsesEnvironment variable:
FTS_INTEGRATION_MANAGER_PULLER_PORTstring
default:"127.0.0.1"
Address for integration manager pullerEnvironment variable:
FTS_INTEGRATION_MANAGER_PULLER_ADDRESSinteger
default:"19034"
Port for integration manager to publish messagesEnvironment variable:
FTS_INTEGRATION_MANAGER_PUBLISHER_PORTstring
default:"127.0.0.1"
Address for integration manager publisherEnvironment variable:
FTS_INTEGRATION_MANAGER_PUBLISHER_ADDRESSFilesystem Paths
Paths for data persistence, logs, and certificates.string
default:"/opt/fts"
Root directory for all FreeTAKServer persistent dataEnvironment variable:
FTS_PERSISTENCE_PATHstring
default:"/opt/fts/FTSDataBase.db"
Path to the SQLite database fileEnvironment variable:
FTS_DB_PATHboolean
default:"true"
Whether to save Cursor on Target (CoT) messages to the databaseEnvironment variable:
FTS_COT_TO_DBstring
default:"/opt/fts/Logs"
Directory for server log filesEnvironment variable:
FTS_LOGFILE_PATHstring
default:"/opt/fts/FreeTAKServerDataPackageFolder"
Directory for storing uploaded data packagesEnvironment variable:
FTS_DATAPACKAGE_PATHstring
default:"/opt/fts/certs"
Directory containing SSL/TLS certificatesEnvironment variable:
FTS_CERTS_PATHstring
default:"/opt/fts/certs/clientPackages"
Directory for backing up client certificate packagesEnvironment variable:
FTS_CLIENT_PACKAGES_PATHstring
default:"/opt/fts/enterprise_sync"
Directory for TAK Enterprise Sync data
string
default:"/opt/fts/ExCheck"
Root directory for ExCheck (checklist) dataEnvironment variable:
FTS_EXCHECK_PATHstring
default:"/opt/fts/ExCheck/template"
Directory for ExCheck templatesEnvironment variable:
FTS_EXCHECK_TEMPLATE_PATHstring
default:"/opt/fts/ExCheck/checklist"
Directory for ExCheck checklistsEnvironment variable:
FTS_EXCHECK_CHECKLIST_PATHstring
default:"auto-detected"
Root path of the FreeTAKServer installationEnvironment variable:
FTS_MAINPATHstring
default:"/opt/fts/user_persistence.txt"
Path to user persistence file
Component Paths
Configuration for locating core and extended components.string
default:"{MainPath}/core"
Path to core componentsEnvironment variable:
FTS_CORE_COMPONENTS_PATHstring
default:"FreeTAKServer.core"
Import root for core componentsEnvironment variable:
FTS_CORE_COMPONENTS_IMPORT_ROOTstring
default:"{MainPath}/components/core"
Path to internal componentsEnvironment variable:
FTS_INTERNAL_COMPONENTS_PATHstring
default:"FreeTAKServer.components.core"
Import root for internal componentsEnvironment variable:
FTS_INTERNAL_COMPONENTS_IMPORT_ROOTstring
default:"{MainPath}/components/extended"
Path to external/extended componentsEnvironment variable:
FTS_EXTERNAL_COMPONENTS_PATHstring
default:"FreeTAKServer.components.extended"
Import root for external componentsEnvironment variable:
FTS_EXTERNAL_COMPONENTS_IMPORT_ROOTExample Configurations
Development Setup
Production Setup
Docker/Container Setup
Configuration Validation
FreeTAKServer validates paths specified in configuration to ensure they are accessible and writable. If a path cannot be accessed, the server will exit with an error message.Path Sanitization
All paths ending withPATH or DIR in the YAML configuration are automatically sanitized and validated:
- Normalized to prevent directory traversal
- Checked for existence
- Checked for write permissions
Best Practices
The
MainLoopDelay setting directly impacts CPU usage vs. responsiveness. Test different values to find the right balance for your deployment.- Use environment variables for sensitive configuration like secret keys
- Keep YAML configuration files outside the web root
- Regularly back up your persistence path (
/opt/ftsby default) - Use appropriate log levels:
debugfor development,infoorwarningfor production - Ensure all paths have proper filesystem permissions