CLI Tools

Reset a user's login

php admin/reset-totp.php <username>

Generates a new TOTP secret and 12 recovery codes. Give the user the QR code URI and codes.

Migrate existing accounts

php admin/migrate-secrets.php

Encrypts any plain-text TOTP secrets. Safe to run multiple times.

Deploy manually

sudo bash /var/www/nortonshop.net/deploy.sh              # deploy latest from main
sudo bash /var/www/nortonshop.net/deploy.sh staging       # deploy from staging branch
sudo bash /var/www/nortonshop.net/deploy.sh --rollback    # revert to previous deployment

The deploy script pulls code, backs up the current state, copies files into Docker volumes, syncs the nginx config (both nortonshop.conf and nginx.conf), and restarts nginx if either config file changed.

Docker management

cd /opt/server-stack
docker compose ps              # check container status
docker compose logs -f nginx   # tail nginx logs
docker compose restart php     # restart PHP-FPM
docker compose down            # stop everything
docker compose up -d           # start everything
Back to top