Reusable VPS setup scripts and Docker Compose stacks used in my Tony Teaches Tech YouTube tutorials.
These resources are designed to help beginners prepare fresh Ubuntu or Debian servers for self-hosting, Docker deployments, and general server administration.
| Script | Purpose |
|---|---|
setup-docker.sh |
Prepares a fresh Ubuntu or Debian VPS for Docker-based self-hosting. |
| Stack | Purpose |
|---|---|
ghost-website-stack |
Runs Ghost, Matomo, Uptime Kuma, and Kutt behind Caddy. |
Each stack includes its own README with setup instructions.
The Docker VPS Bootstrap Script prepares a fresh VPS with a safer baseline configuration for Docker deployments.
It automates many of the first steps you should usually perform before deploying apps like WordPress, Ghost, Vaultwarden, Nextcloud, and other self-hosted services.
- Creates a new non-root user
- Adds the new user to the
sudogroup - Applies basic SSH hardening
- Updates system packages
- Installs core utilities, including
htop - Enables unattended security updates
- Installs and starts Fail2Ban
- Configures UFW firewall rules
- Installs Docker Engine, Buildx, and the Docker Compose plugin from Docker's official apt repository
- Adds the new user to the
dockergroup
Run this as root on a fresh Ubuntu or Debian VPS:
curl -fsSL https://raw.githubusercontent.com/tonyflo/ttt-vps-scripts/main/setup-docker.sh | bashAfter running the script, reconnect as the new user, then confirm Docker and Docker Compose are working:
docker --version
docker compose version
docker run --rm hello-worldI recommend following the manual guide to:
- Add a swap file if your VPS has limited RAM
- Set up SSH key authentication
- Disable password-based SSH login
Full guide: