This guide is for end users who want to set up their own Ubuntu server with stackctl.
- Ubuntu 22.04 or 24.04
- Docker Engine and Docker Compose v2
gitandgo(required by the current installer script)- A domain name for each environment (recommended)
- A user with
sudoaccess
This uses the repo installer script, which builds stackctl locally and installs templates.
curl -fsSL https://raw.githubusercontent.com/imran110219/stackctl/main/install.sh | bashNotes:
- The installer needs
gitandgo. - The binary is installed to
~/.local/bin/stackctlby default. - Templates are installed to
~/.stackctl/templatesby default. - If
~/.local/binis not in yourPATH, add it:
export PATH="$HOME/.local/bin:$PATH"Optional environment variables for the installer:
STACKCTL_REPOto override the repo URL.STACKCTL_HOMEto change install root (default~/.stackctl).STACKCTL_BIN_DIRto change the binary install directory.
If your organization provides a stackctl .deb package, you can install it like this:
sudo dpkg -i stackctl_*.deb
sudo apt-get -f installIf you have an APT repository configured for stackctl, use:
sudo apt-get update
sudo apt-get install stackctl- Install Docker Engine and ensure the daemon is running.
- Add your user to the
dockergroup (optional but common):
sudo usermod -aG docker "$USER"- Log out and log back in so group changes take effect.
stackctl setupThe setup wizard guides you through:
- Choosing an environment (
dev,qa, orprod) — existing environments are flagged with[exists] - Setting a domain (smart defaults:
dev.example.comfor dev,qa.example.comfor qa,example.comfor prod) - Setting an admin email
- Selecting optional modules (dependencies are auto-resolved)
- Running pre-flight system checks (Docker, disk space, port availability, etc.)
- Initializing, enabling modules, and applying in one step
After completion you can choose "Setup Another Environment" to configure additional environments without restarting the wizard.
- Initialize each environment:
stackctl init --env dev --domain dev.example.com --email admin@example.com
stackctl init --env qa --domain qa.example.com --email admin@example.com
stackctl init --env prod --domain example.com --email admin@example.com- Set secrets in each environment:
sudo -E $EDITOR /srv/stack/dev/.env
sudo -E $EDITOR /srv/stack/qa/.env
sudo -E $EDITOR /srv/stack/prod/.env- Apply the configuration:
stackctl apply --env dev
stackctl apply --env qa
stackctl apply --env prodCLI:
stackctl enable jaeger --env qa
stackctl disable jaeger --env qa
stackctl apply --env qaInteractive module manager:
stackctl modules --env qaThe module manager lets you browse modules grouped by category, toggle them with space, search with /, view details with d, save with s, and save + apply with a. Dependency resolution is automatic (enabling dozzle auto-enables socket-proxy).
CLI:
stackctl status --env prodInteractive dashboard:
stackctl dash # overview of all environments
stackctl dash --env prod # jump directly to prodThe dashboard provides a live view with 5-second auto-refresh showing:
- Overview tab: all environments with container counts and status (OK/DEGRADED/NOT DEPLOYED)
- Environment tab: per-container table with service name, state, health, CPU, memory, and ports
- Detail tab: full container info with quick actions —
rto restart,lto view logs,xto open a shell
Edit .env secrets directly:
sudo -E $EDITOR /srv/stack/prod/.envInteractive config editor:
stackctl config --env prodThe config editor provides:
- Scrollable list of variables grouped by section (Core, Databases, Security, Backup)
- Secret masking — passwords are hidden by default; press
uto unmask - Password generation — press
gto generate a secure 32-character password - Validation — press
vto check for missing required fields, placeholder values, and short passwords - Automatic restart detection — after saving, shows which services need restarting and offers to apply immediately
stackctl backup --env prod- Config and compose:
/srv/stack/<env> - Data volumes:
/srv/data/<env> - Backups:
/srv/backups/<env>
Press ? in any TUI screen to see a full keyboard shortcut reference.
Common shortcuts across all TUI tools:
| Key | Action |
|---|---|
ctrl+c |
Quit immediately |
? |
Toggle help overlay |
j / k or arrows |
Navigate up/down |
h / l or arrows |
Navigate left/right |
enter |
Confirm / select |
esc |
Go back / cancel |
space |
Toggle selection |
tab |
Switch tabs (dashboard) |
/ |
Search (module manager) |
q |
Quit current tool |
permission deniedunder/srv: run the command withsudoor fix directory ownership.- Docker not running:
sudo systemctl start docker - Templates not found: set
STACKCTL_TEMPLATESto the templates directory. - TUI renders incorrectly: ensure your terminal supports 256 colors and Unicode.
- Remove the binary and templates:
rm -f ~/.local/bin/stackctl
rm -rf ~/.stackctl- Remove server data (destructive):
sudo rm -rf /srv/stack /srv/data /srv/backups