This documentation always describes the latest published version. For older versions, see the CHANGELOG.
Server Tools v2 is a modular Bash toolkit for managing Debian/Ubuntu servers. It replaces the monolithic predecessor (v1, single file with ~900 lines) with a clean, testable architecture consisting of 18 specialized libraries and over 7,000 lines of code.
Server Tools v2 automates recurring server administration tasks - from database management to virtual host creation to SSL certificates and SSH user management. Saves an average of 15-30 minutes per administration task.
The tool offers two interfaces:
server-tools db create --name mydb --user myuser)server-tools without arguments)| Aspect | v1 | v2 |
|---|---|---|
| Architecture | Single file (~900 lines) | 18 modular libraries (~7,000 LOC) |
| Language | German (output) | English |
| Webserver | Apache only | Apache or Nginx (config-selected) |
| Input validation | Minimal | Comprehensive (13 types) |
| Audit logging | None | Complete |
| Backups | None | Auto-backup before delete operations |
| Tests | None | 510 BATS tests |
| CI/CD | None | ShellCheck + shfmt + BATS + install smoke test |
| Security | Basic | Comprehensive (escaping, path traversal protection, ACLs) |
| Rollback | None | On failures in multi-step operations |
| Install/Uninstall | - | One shared, tested installer for make and bin/server-tools |
.sql, .sql.gz, .sql.zip)Nginx is an alternative webserver backend, not an add-on: it's switched globally via
ST_WEBSERVER, not per VHost. SSL management and VHost audit currently only support Apache.
/etc/cron.d/ with schedule validationServer Tools v2 follows the Composable Building Blocks pattern: each library consists of atomic functions composed by high-level operations. Full details, all diagrams, and the complete layer model live on the Technical subpage.
| Requirement | Version | Notes |
|---|---|---|
| Operating System | Debian 11+, Ubuntu 20.04+ | Other distros not tested |
| Bash | 5.0+ | Check with bash --version |
| Root access | Required | All operations require root |
| Apache | 2.4+ | Default backend (ST_WEBSERVER=apache) |
| Nginx | 1.18+ | Alternative backend (ST_WEBSERVER=nginx); SSL management and vhost audit don't work here yet |
| MySQL/MariaDB | 5.7+ / 10.3+ | Optional — mysql+mysqldump or mariadb+mariadb-dump |
| OpenSSL | 1.1+ | For password generation |
| UFW / Fail2Ban / acl | Optional | Only needed for the respective modules |
Root access is mandatory. The tool checks
EUID == 0at startup and exits if insufficient privileges are detected.
| Page | Content |
|---|---|
| Installation | Quick install, updating, uninstalling, post-install configuration |
| Configuration | Complete ST_* variable reference, example config |
| Usage | Synopsis, global flags, practical examples, interactive menu |
| CLI Reference | All commands and options as tables |
| Security Concept | Input validation, audit logging, further security measures |
| Troubleshooting | Common problems with symptom → check → solution |
| Technical Details | Architecture, project structure, tests, CI/CD, Makefile targets |
| FAQ | Frequently asked questions |
License: MIT
Source code & issues: github.com/markus-michalski/server-tools-v2
Changelog: CHANGELOG.md on GitHub