Configuration
Configure StavenCTL services and system settings.
StavenCTL stores all runtime settings in a single configuration file.
Configuration File
/etc/stavenctl/config.confThe installer automatically generates this file during installation.
Configuration Reference
Panel
Controls the web interface.
WEB_HOST=0.0.0.0
WEB_PORT=3000| Key | Description |
|---|---|
WEB_HOST | Address the web panel listens on. |
WEB_PORT | Port used by the web interface. |
Panel Server
Controls the backend API server.
SERVER_PORT=8080| Key | Description |
|---|---|
SERVER_PORT | Port used by the StavenCTL backend server. |
Agent
Identifies and authenticates the server with the panel.
NODE_ID=374a3f4b-15e6-4f0e-ad7c-95b67d7405b4
AGENT_TOKEN=hp_tok_xxxxxxxxxxxxxxxxx| Key | Description |
|---|---|
NODE_ID | Unique identifier for this server. |
AGENT_TOKEN | Authentication token used by the agent. |
Metrics
Controls how often the agent collects system statistics.
TRAFFIC_INTERVAL=2
SYSTEM_INTERVAL=2| Key | Description |
|---|---|
TRAFFIC_INTERVAL | Network traffic collection interval (seconds). |
SYSTEM_INTERVAL | CPU, memory, and disk collection interval (seconds). |
Database
Connection settings for PostgreSQL.
DATABASE_URL=postgres://username:password@127.0.0.1:5432/database?sslmode=disable| Key | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string used by the backend server. |
Redis
Cache and message broker configuration.
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0| Key | Description |
|---|---|
REDIS_HOST | Redis server hostname or IP address. |
REDIS_PORT | Redis server port. |
REDIS_PASSWORD | Redis authentication password (leave empty if disabled). |
REDIS_DB | Redis database index. |
Configuration Permissions
For security, restrict access to the configuration file.
sudo chown root:root /etc/stavenctl/config.conf
sudo chmod 600 /etc/stavenctl/config.confComponent Overview
| Component | Description |
|---|---|
| Panel | Serves the StavenCTL web dashboard. |
| Server | Processes API requests and business logic. |
| Agent | Collects system metrics and manages the server. |
| Metrics | Defines how frequently monitoring data is collected. |
| PostgreSQL | Stores all persistent application data. |
| Redis | Provides caching, sessions, queues, and fast messaging. |
Sample Configuration
The following example shows a typical config.conf generated by the installer.
########################################
# StavenCTL Configuration
########################################
########################################
# Panel
########################################
WEB_HOST=0.0.0.0
WEB_PORT=3000
########################################
# Panel Server
########################################
SERVER_PORT=8080
########################################
# Agent
########################################
# Unique server identifier
NODE_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# Authentication token issued by the panel
AGENT_TOKEN=hp_tok_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
########################################
# Metrics
########################################
# Network traffic collection interval (seconds)
TRAFFIC_INTERVAL=2
# System metrics collection interval (seconds)
SYSTEM_INTERVAL=2
########################################
# Database
########################################
DATABASE_URL=postgres://stavenctl:password@127.0.0.1:5432/stavenctl?sslmode=disable
########################################
# Redis
########################################
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0Copy the Configuration
To back up or edit the configuration manually:
sudo cp /etc/stavenctl/config.conf ~/config.conf.backup
sudo nano /etc/stavenctl/config.confAfter making changes, restart the services.
sudo systemctl restart stavenctl-server
sudo systemctl restart stavenctl-agent
sudo systemctl restart stavenctl-nginx