Server-Side GTM.
Self-hosted.
Automated sGTM installer and CLI for Linux servers.
Free to deploy. Docker, Nginx, and Auto-SSL included.
wget -qO- https://sst.sajjadhossain.net/install.sh | bash
bash <(curl -fsSL https://sst.sajjadhossain.net/single.sh)
Requires Ubuntu 20.04–24.04, Debian 11/12, or AlmaLinux 9.
____ _____ __ __ ____ ____ _____
/ ___|_ _| \/ | / ___/ ___|_ _|
| | _ | | | |\/| | \___ \___ \ | |
| |_| | | | | | | | ___) |__) || |
\____| |_| |_| |_| |____/____/ |_|
====================================================
GTM SST CLI v0.0.5
====================================================
Usage: sst [command] (or gtm-sst)
Deployment:
sst setup Deploy sGTM (Headless or Web Admin UI)
sst setup --no-ui Deploy headless sGTM (Docker + Nginx + SSL)
sst reinstall Fast container/UI recreate (keeps config & SSL)
sst uninstall Remove stack (keeps /etc/gtm-sst/config.env)
Container Management:
sst status (st) Show container status and /healthy check
sst start Start GTM containers
sst stop Stop GTM containers
sst restart (rs) Recreate and restart GTM containers
sst logs Stream live gtm-server logs
sst config (cfg) Update CONTAINER_CONFIG and restart
CLI Maintenance:
sst loader Configure whitelabeled first-party loader & collect
sst harden Install Fail2Ban, auto updates & Nginx limits
sst update (up) Update CLI & Admin UI (zero GTM downtime)
sst version (-v) Show installed and latest available version
sst help Show this help menu
Built for first-party tracking.
Run Google Tag Manager Server-Side on your own infrastructure with full control.
Automated Provisioning.
Installs Docker, Nginx, Let's Encrypt Auto-SSL, 2GB swap, and UFW or Firewalld in one pass. Supports Ubuntu, Debian, and AlmaLinux 9 with SELinux configuration.
Localhost Isolation.
Tagging and preview containers bind to 127.0.0.1 behind Nginx so container ports are never exposed directly.
Preview & Auto-Updates.
Pre-configured /gtm/debug and /gtm/preview proxy routes with Watchtower pulling official Google sGTM images daily.
Headless or Web Admin UI.
Run Docker Compose directly in /opt/gtm-sst, or enable the optional Web Admin UI authenticated via native system login.
Up and tracking in three steps.
No accounts, no license keys, no dependencies to pre-install.
Point Your Subdomains
Create DNS-only A records for sst.yourdomain.com and debug.sst.yourdomain.com pointing to your VPS IP.
Copy Container Config
In your GTM Server Container go to Admin → Container Settings → Manually provision tagging server and copy the base64 config string.
Run One Command
SSH into your VPS as root, paste the installer command, answer the prompts, and verify /healthy returns ok.