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
Headless (No UI): bash <(curl -fsSL https://sst.sajjadhossain.net/single.sh)

Requires Ubuntu 20.04–24.04, Debian 11/12, or AlmaLinux 9.

root - root@server:~ - gtm-sst
  ____ _____ __  __     ____ ____ _____ 
 / ___|_   _|  \/  |   / ___/ ___|_   _|
| |  _  | | | |\/| |   \___ \___ \ | |  
| |_| | | | | |  | |    ___) |__) || |  
 \____| |_| |_|  |_|   |____/____/ |_|  

====================================================
                GTM SST CLI v0.0.4
====================================================

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 setup --with-ui    Deploy sGTM with Web Admin UI

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.

01 / DNS

Point Your Subdomains

Create DNS-only A records for sst.yourdomain.com and debug.sst.yourdomain.com pointing to your VPS IP.

02 / GTM

Copy Container Config

In your GTM Server Container go to Admin → Container Settings → Manually provision tagging server and copy the base64 config string.

03 / DEPLOY

Run One Command

SSH into your VPS as root, paste the installer command, answer the prompts, and verify /healthy returns ok.