OpenLogi Configuration File Location: Where Is config.toml Stored?
OpenLogi stores its settings in a plain TOML file located at ~/.config/openlogi/config.toml on macOS and Linux, and at %USERPROFILE%\.config\openlogi\config.toml on Windows, following the XDG Base Directory specification and Windows user-profile conventions.
OpenLogi is an open-source logistics management tool developed by AprilNEA that coordinates physical devices through a shared configuration file. Understanding the exact OpenLogi configuration file location is essential for customizing device mappings, API endpoints, and automation rules that synchronize between the GUI and background agent.
Platform-Specific Configuration File Paths
OpenLogi adheres to standard operating system conventions for storing user-specific application data. The configuration file is always named config.toml and resides in a platform-specific directory:
- macOS and Linux:
$XDG_CONFIG_HOME/openlogi/config.toml(defaults to~/.config/openlogi/config.tomlwhen the XDG environment variable is unset) - Windows:
%USERPROFILE%\.config\openlogi\config.toml
These locations are officially documented in docs/CONFIGURATION.md within the AprilNEA/OpenLogi repository. The application creates this directory automatically on first run if it does not exist.
How OpenLogi Resolves the Config Path
According to the OpenLogi source code, the configuration path resolution is handled in the core library. In crates/openlogi-core/src/config.rs, the application uses the dirs crate to locate the system's configuration directory:
// crates/openlogi-core/src/config.rs (simplified)
use std::path::PathBuf;
use dirs::config_dir;
/// Returns the full path to OpenLogi's config file for the current platform.
fn config_path() -> PathBuf {
let mut base = config_dir().expect("Unable to locate config directory");
base.push("openlogi");
base.push("config.toml");
base
}
Both the GUI frontend and the background agent invoke this same config_path() logic, ensuring they read from and write to an identical location. This shared access model requires atomic write operations to prevent configuration corruption when both components run simultaneously.
Creating and Editing the Configuration File
New users should start with the example configuration shipped in the repository. Copy docs/config.example.toml to your platform-specific path listed above, then customize the physical device keys and API credentials:
# Linux/macOS example
mkdir -p ~/.config/openlogi
cp docs/config.example.toml ~/.config/openlogi/config.toml
The GUI application writes the config.toml file atomically and maintains up to five rotational backups named config.toml.backup.1 through config.toml.backup.5 in the same directory. If you edit the file externally while the GUI is running, the application detects the external modification and rejects the next GUI save operation to prevent overwriting your manual changes.
Reading the Config File Externally
You can programmatically access OpenLogi's settings for integration with shell scripts or automation tools. The following bash script locates and displays the configuration on Unix-like systems:
#!/usr/bin/env bash
# Show the current OpenLogi config (Linux/macOS)
CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/openlogi/config.toml"
if [[ -f "$CONFIG" ]]; then
cat "$CONFIG"
else
echo "Config file not found at $CONFIG"
fi
For Windows PowerShell, substitute the path with $env:USERPROFILE\.config\openlogi\config.toml.
Summary
- OpenLogi uses a single TOML configuration file shared between the GUI and agent components.
- On macOS/Linux, the file resides at
~/.config/openlogi/config.toml; on Windows, it is located at%USERPROFILE%\.config\openlogi\config.toml. - The path resolution logic lives in
crates/openlogi-core/src/config.rsusing thedirs::config_dir()function. - Always base your configuration on
docs/config.example.tomland consultdocs/CONFIGURATION.mdfor schema documentation. - The application maintains automatic backups (up to five versions) and performs atomic writes to prevent data corruption.
Frequently Asked Questions
Where is the OpenLogi configuration file located on Windows?
On Windows, OpenLogi stores its configuration at %USERPROFILE%\.config\openlogi\config.toml, which typically resolves to C:\Users\<YourUsername>\.config\openlogi\config.toml. The application follows this convention rather than the Windows Registry for easier version control and manual editing.
What format does the OpenLogi configuration file use?
OpenLogi uses the TOML (Tom's Obvious, Minimal Language) format for its configuration file. This plain-text format is human-readable and supports sections (tables), key-value pairs, and arrays, making it suitable for defining complex device mappings and API endpoints as shown in docs/config.example.toml.
How do I backup my OpenLogi configuration?
The GUI automatically creates up to five backup copies named config.toml.backup.1 through config.toml.backup.5 in the same directory as the main file. For manual backups, simply copy config.toml from your platform-specific configuration directory (e.g., ~/.config/openlogi/) to a secure location before making experimental changes.
Can I edit the OpenLogi configuration file while the application is running?
Yes, but with caution. While both the GUI and agent can read the file simultaneously, the GUI tracks file modification times. If you edit config.toml externally, the GUI detects this change on its next save attempt and rejects the operation to prevent overwriting your external modifications. Stop the GUI before making manual edits to avoid synchronization conflicts.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →