Docker on VPS Bangladesh: Deploy Any App in Minutes
Docker lets you deploy any app on your VPS without fighting with dependencies or conflicting software versions. Here's how to get it working in Bangladesh.
On this page
One of the biggest advantages of a VPS over shared hosting is that you can run Docker. Instead of manually configuring each app's dependencies and hoping nothing conflicts, you package everything into containers that work identically everywhere.
This guide walks through installing Docker on a BDIX VPS from SNBD HOST and deploying a real application using Docker Compose. The same process works on a Singapore VPS or USA VPS โ Docker doesn't care about location.
Why Docker on a VPS?#
Without Docker, running multiple apps on a single VPS means managing competing PHP versions, Python environments, Node.js versions, and system libraries. Something always conflicts eventually.
With Docker:
- Each app runs in its own container with its own dependencies
- Deploy a new app without touching the existing ones
- Roll back to a previous version in seconds
- Move apps between servers by copying a single
docker-compose.ymlfile - Consistent environments: if it works in your local Docker, it works on the VPS
For developers in Bangladesh building multiple projects โ client sites, personal tools, bots, APIs โ Docker on a single BDIX VPS is one of the most efficient setups available.
Step 1: Install Docker#
SSH into your VPS and run the official Docker installation script. On Ubuntu 22.04:
sudo apt update
sudo apt install ca-certificates curl gnupg -y
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
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -yVerify the installation:
docker --version
docker compose versionAdd your user to the docker group so you don't need sudo for every Docker command:
sudo usermod -aG docker $USER
newgrp dockerStep 2: Install Nginx Proxy Manager#
When you run multiple apps on one VPS, you need a reverse proxy to route traffic from your domain to the right container. Nginx Proxy Manager gives you a clean web UI for managing this โ no manual Nginx config files required.
Create a directory for it:
mkdir ~/nginx-proxy && cd ~/nginx-proxy
nano docker-compose.ymlPaste this configuration:
version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '443:443'
- '81:81'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencryptStart it:
docker compose up -dAccess the admin panel at http://YOUR_VPS_IP:81. Default login: admin@example.com / changeme. Change these immediately after first login.
Step 3: Deploy an Application with Docker Compose#
Let's deploy a real app โ a WordPress site as an example. Create a new directory:
mkdir ~/wordpress-site && cd ~/wordpress-site
nano docker-compose.ymlPaste this:
version: '3.8'
services:
db:
image: mysql:8.0
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: strongrootpassword
MYSQL_DATABASE: wordpress
MYSQL_USER: wpuser
MYSQL_PASSWORD: strongwppassword
volumes:
- db_data:/var/lib/mysql
wordpress:
image: wordpress:latest
restart: unless-stopped
depends_on:
- db
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_USER: wpuser
WORDPRESS_DB_PASSWORD: strongwppassword
volumes:
- wp_content:/var/www/html/wp-content
expose:
- "80"
volumes:
db_data:
wp_content:Start it:
docker compose up -dThe WordPress container is now running but not yet publicly accessible. In Nginx Proxy Manager, add a new Proxy Host:
- Domain:
yourwordpresssite.com - Forward Hostname:
wordpress(the service name in docker-compose.yml) - Forward Port:
80 - Enable SSL with Let's Encrypt
Your WordPress site is now live at https://yourwordpresssite.com with SSL, routed through the reverse proxy.
Step 4: Deploy a Node.js App#
For a custom Node.js app, create a Dockerfile in your project directory:
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]And a docker-compose.yml:
version: '3.8'
services:
app:
build: .
restart: unless-stopped
expose:
- "3000"
environment:
NODE_ENV: production
PORT: 3000Build and start:
docker compose up -d --buildAdd a proxy host in Nginx Proxy Manager pointing to your app container on port 3000. Done.
Step 5: Managing Containers#
Common Docker commands you'll use daily:
# View running containers
docker ps
# View logs for a container
docker compose logs -f app
# Restart a container
docker compose restart app
# Pull latest image and redeploy
docker compose pull && docker compose up -d
# Stop everything
docker compose down
# Remove unused images (free up disk space)
docker image prune -aStep 6: Automatic Container Restarts After Reboot#
The restart: unless-stopped directive in the compose file handles this. If your VPS reboots, Docker starts automatically (enabled by default on Ubuntu), and all containers with this policy restart themselves.
Verify Docker starts on boot:
sudo systemctl enable dockerDisk Space Management#
Docker images accumulate over time. Clean up regularly:
# Remove stopped containers, unused networks, dangling images
docker system prune -f
# Check disk usage
docker system dfOn a VPS with NVMe SSD storage (as included in SNBD HOST plans), I/O is fast enough that container startup and image pulls are noticeably quicker than on spinning-disk VPS options.
What You Can Run with This Setup#
With Docker and Nginx Proxy Manager on a single BDIX VPS, you can run:
- Multiple WordPress or PHP sites
- Node.js / Python / Go / Ruby APIs
- Self-hosted tools like n8n, Uptime Kuma, Gitea, Nextcloud
- Telegram and Discord bots
- Database services (PostgreSQL, MySQL, MongoDB)
- Redis for caching
- Custom scraping or automation scripts
All of this on a single เงณ499/mo BDIX VPS. For Bangladeshi developers running multiple projects, this is one of the most cost-efficient setups available.

Written by
Technical Support Dept.
Technical Support Dept is the tech backbone of SNBDHost, sharing clear, practical guides on hosting, performance, and security to help users keep their websites fast, stable, and secure.


