Configuration
Configuration files, paths, and parameters for the OpsSquad node
The OpsSquad node stores its configuration in YAML files. This guide covers the configuration structure, file locations, and available parameters.
File Locations
Configuration file locations depend on how you installed the node:
System Installation (Root)
| File | Location |
|---|---|
| Node Binary | /usr/local/lib/opssquad/opssquad-connectivity-layer |
| Configuration | /etc/opssquad/node.yaml |
| Logs | /var/log/opssquad/node.log |
| Service | /etc/systemd/system/opssquad-connectivity-layer.service |
User Installation (Non-Root)
| File | Location |
|---|---|
| Node Binary | ~/.local/lib/opssquad/opssquad-connectivity-layer |
| Configuration | ~/.config/opssquad/node.yaml |
| Logs | ~/.local/log/opssquad/node.log |
Configuration File Structure
The node.yaml file is automatically generated during installation but can be modified manually if needed.
Basic Structure
app:
node_id: "your-node-id"
token: "your-token"
logging:
level: "info"
file: "/var/log/opssquad/node.log"Parameters Reference
App Section
| Parameter | Description | Required |
|---|---|---|
app.node_id | The unique identifier for this node (provided by dashboard) | Yes |
app.token | The authentication token for communicating with the platform | Yes |
Logging Section
| Parameter | Description | Default |
|---|---|---|
logging.level | Log verbosity level | info |
logging.file | Absolute path to the log file | Platform-dependent |
Available Log Levels:
| Level | Description |
|---|---|
debug | Verbose output including internal operations |
info | Standard operational messages |
warn | Warnings and potential issues |
error | Error messages only |
Example Configurations
Minimal Configuration
The minimum required configuration:
app:
node_id: "node_abc123def456"
token: "tok_live_xxxxxxxxxxxxx"Full Configuration
A complete configuration with all options:
app:
node_id: "node_abc123def456"
token: "tok_live_xxxxxxxxxxxxx"
logging:
level: "debug"
file: "/var/log/opssquad/node.log"Environment Variables
You can override configuration values using environment variables. This is useful for containerized deployments or CI/CD pipelines.
| Variable | Overrides |
|---|---|
OPSSQUAD_NODE_ID | app.node_id |
OPSSQUAD_TOKEN | app.token |
OPSSQUAD_LOG_LEVEL | logging.level |
OPSSQUAD_LOG_FILE | logging.file |
Example:
export OPSSQUAD_NODE_ID="node_abc123def456"
export OPSSQUAD_TOKEN="tok_live_xxxxxxxxxxxxx"
export OPSSQUAD_LOG_LEVEL="debug"
opssquad node startModifying Configuration
1. Stop the Node
opssquad node stop2. Edit the Configuration
Open the configuration file in your editor:
# System installation
sudo nano /etc/opssquad/node.yaml
# User installation
nano ~/.config/opssquad/node.yaml3. Validate the Configuration
opssquad node validate4. Restart the Node
opssquad node startValidating Configuration
Use the validate command to check your configuration:
opssquad node validateThis checks:
- YAML syntax is valid
- Required fields (
node_id,token) are present - File paths are accessible
- Log directory is writable
Troubleshooting Configuration
Common Issues
Invalid YAML syntax: YAML is sensitive to indentation. Use spaces (not tabs) and ensure consistent indentation.
Check YAML syntax:
# Install yamllint if needed
pip install yamllint
# Validate your config
yamllint /etc/opssquad/node.yamlMissing Configuration File
If the configuration file is missing, re-run the installation:
opssquad node install --node-id="your-id" --token="your-token"Permission Denied
Ensure the node has read access to the configuration file:
# System installation
sudo chmod 600 /etc/opssquad/node.yaml
sudo chown root:root /etc/opssquad/node.yaml
# User installation
chmod 600 ~/.config/opssquad/node.yamlNext Steps
- Platform Support - See supported operating systems and architectures.
- Troubleshooting - Solutions to common issues.