Deutsche Version
Back to Overview
Path: /etc/server-tools/config (or ST_CONFIG_FILE environment variable)
All variables start with the ST_ prefix and have sensible defaults.
The config file is loaded via source. When running as root, Server Tools checks owner and permission: the file must be owned by root and must not be world-readable or group-writable.
| Variable |
Default |
Description |
ST_CONFIG_FILE |
/etc/server-tools/config |
Config file path |
ST_AUDIT_LOG |
/var/log/server-tools-audit.log |
Audit log file |
ST_AUDIT_LOGGING |
true |
Enable audit logging |
| Variable |
Default |
Description |
ST_INSTALL_DIR |
/usr/local/lib/server-tools |
Target directory for the installed libraries |
ST_BIN_DIR |
/usr/local/bin |
Target directory for the binary and shortcuts |
These two variables are primarily meant for tests and packaging, not everyday use - they control where install/uninstall operate, not where the tool's own configuration lives. Regular users should leave them unchanged.
| Variable |
Default |
Description |
ST_WEBSERVER |
apache |
Backend for VHost management: apache or nginx |
ST_APACHE_SITES_AVAILABLE |
/etc/apache2/sites-available |
Only used with ST_WEBSERVER=apache |
ST_APACHE_SITES_ENABLED |
/etc/apache2/sites-enabled |
Only used with ST_WEBSERVER=apache |
ST_NGINX_SITES_AVAILABLE |
/etc/nginx/sites-available |
Only used with ST_WEBSERVER=nginx |
ST_NGINX_SITES_ENABLED |
/etc/nginx/sites-enabled |
Only used with ST_WEBSERVER=nginx |
ST_WEBSERVER applies globally to the whole installation, not per VHost. Switching it after the first VHost was created doesn't migrate existing VHosts - manual migration is required. SSL management and vhost audit currently only work with apache.
| Variable |
Default |
Description |
ST_CREDENTIAL_DIR |
/root/db-credentials |
Credential storage location |
ST_CREDENTIAL_FILE_PERMISSIONS |
600 |
File permissions for credentials (600 or 400) |
ST_MYSQL_CONFIG_FILE |
/root/.my.cnf |
MySQL root credentials |
ST_DEFAULT_CHARSET |
utf8mb4 |
Default character set |
ST_DEFAULT_COLLATION |
utf8mb4_unicode_ci |
Default collation |
ST_PASSWORD_LENGTH |
25 |
Generated password length (12-64) |
ST_PASSWORD_MIN_LENGTH |
12 |
Minimum password length (min. 8) |
| Variable |
Default |
Description |
ST_BACKUP_DIR |
/root/server-tools-backups |
General backup directory |
ST_DB_BACKUP_DIR |
/root/db-backups |
DB dump directory |
ST_AUTO_BACKUP |
true |
Auto-backup before delete operations |
ST_BACKUP_RETENTION_DAYS |
30 |
Retention period in days (1-365) |
| Variable |
Default |
Description |
ST_DEFAULT_PHP_VERSION |
8.3 |
Default PHP version |
ST_PHP_VERSIONS_TO_SCAN |
7.4 8.0 8.1 8.2 8.3 8.4 |
FPM socket scan |
ST_APACHE_SERVER_ADMIN |
webmaster@localhost |
ServerAdmin entry |
ST_ALLOWED_DOCROOT_PATHS |
/var/www:/srv/www |
Allowed document root paths |
ST_APACHE_LOG_DIR |
/var/log/apache2 |
Apache log directory |
ST_LOGROTATE_DAYS |
14 |
Max log age |
ST_LOGROTATE_ROTATE |
52 |
Rotation count (~1 year) |
ST_PROXY_PRESERVE_HOST |
true |
ProxyPreserveHost default for reverse proxy VHosts |
| Variable |
Default |
Description |
ST_CERTBOT_EMAIL |
(empty) |
Let's Encrypt email |
ST_DNS_PROVIDER |
(empty) |
DNS provider for wildcard SSL |
ST_DNS_CREDENTIALS_FILE |
(empty) |
DNS API credentials file |
| Variable |
Default |
Description |
ST_USER_DEFAULT_SHELL |
/bin/bash |
Default shell for new users |
| Variable |
Default |
Description |
ST_LOG_LINES |
50 |
Default number of log lines |
ST_MYSQL_LOG_FILE |
/var/log/mysql/error.log |
MySQL error log path |
# /etc/server-tools/config
# Webserver
ST_WEBSERVER="nginx"
ST_NGINX_SITES_AVAILABLE="/etc/nginx/sites-available"
ST_NGINX_SITES_ENABLED="/etc/nginx/sites-enabled"
# Database
ST_DEFAULT_CHARSET="utf8mb4"
ST_DEFAULT_COLLATION="utf8mb4_unicode_ci"
ST_PASSWORD_LENGTH=30
# Apache
ST_DEFAULT_PHP_VERSION="8.3"
ST_APACHE_SERVER_ADMIN="admin@example.com"
ST_PROXY_PRESERVE_HOST=true
# Backup
ST_AUTO_BACKUP=true
ST_BACKUP_RETENTION_DAYS=60
# SSL
ST_CERTBOT_EMAIL="admin@example.com"
ST_DNS_PROVIDER="cloudflare"
# SSH Users
ST_USER_DEFAULT_SHELL="/bin/bash"