Install Docker on VPS and Build the Same Dev Environment from Your iPhone
Introduction
Once you’ve got a VPS, the next step is setting up your development environment. With Docker, you can replicate the exact same configuration as your local PC on the VPS. A single docker compose up brings everything up — database, backend, frontend, all at once.
And this is where Claush’s background processing truly shines. Installing Docker or building images can take anywhere from a few minutes to tens of minutes. There’s no reason to stare at the terminal the whole time. Just tell Claush “notify me on Slack when it’s done,” pocket your iPhone, and walk away.
Installing Docker on Your VPS
For Ubuntu/Debian-based VPS instances, install with the following commands:
# Remove old versions (start clean)
sudo apt remove docker docker-engine docker.io containerd runc 2>/dev/null
# Install required packages
sudo apt update && sudo apt install -y ca-certificates curl gnupg
# Add Docker's GPG key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
# Add the repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list
# Install Docker
sudo apt update && sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
Installation takes a few minutes. Give Claush the instruction and wait for the notification.
“Install Docker and notify me on Slack when it’s done.”
Why Background Processing + Notifications Matter
Installing Docker alone only takes a few minutes. But real-world development involves much longer tasks.
| Task | Estimated Time |
|---|---|
| Docker installation | 2–5 min |
| Image pull (postgres, nginx, etc.) | 1–3 min |
| Image build (from Dockerfile) | 5–30+ min |
| npm install / pip install | 3–10 min |
| CI/CD pipeline run | 10–60 min |
Staring at the terminal during all of these is a waste of time.
With Claush, one sentence handles it all:
“Run docker compose build, then compose up -d, and notify me on Slack when everything is done.”
Put your iPhone in your pocket, grab a coffee. The moment the notification arrives, you’re ready to continue.
Launching Your Dev Environment with Docker Compose
In real projects, docker-compose.yml manages multiple services at once.
# docker-compose.yml example
services:
app:
build: .
ports:
- "3000:3000"
depends_on:
- db
db:
image: postgres:16
environment:
POSTGRES_PASSWORD: password
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata:
Starting everything is a single command:
docker compose up -d
You can delegate this to Claush too:
“Run docker compose up -d, verify all containers are running, then notify me.”
Your Local Environment, Replicated on the VPS
The biggest advantage of Docker is environment reproducibility:
- What works locally will work on the VPS, guaranteed
- Share the exact same environment with teammates
- OS-agnostic (same on Ubuntu, Debian, anywhere)
And with Claush, you can manage all of that environment setup from a single iPhone.
Summary
| Details | |
|---|---|
| What to do | Install Docker on VPS, set up environment with docker-compose.yml |
| Time-consuming tasks | Installation, image builds, npm install, etc. |
| How to use Claush | “Do X, then notify me on Slack when done” — delegate it all |
| Benefits | Same env as local, operated from iPhone, zero waiting time |
The more time-consuming the task, the more it belongs in Claush’s background processing. While it runs, do something else — and pick up right where you left off when the notification arrives.