This guide will walk you through deploying Free WMS (Inventory Order Management System) on an Ubuntu VPS using Docker, from scratch.
Designed for .NET developers who are new to Ubuntu/Linux.
- VPS with Ubuntu (22.04 LTS or newer recommended)
- Minimum 2 GB RAM (SQL Server Express needs ~1 GB)
- Minimum 20 GB storage
- Root / sudo access
- Port 5000 open (to access the application)
Connect to your VPS using SSH:
ssh username@your-vps-ip-addressExample:
ssh root@123.123.123.123❓ What is SSH?
SSH is a way to access your VPS terminal remotely, like Remote Desktop but via text.
Update the Ubuntu package manager (apt):
sudo apt updatesudo apt upgrade -yThis refreshes the list of available software and upgrades existing packages.
Docker runs your application inside isolated containers.
# Install Docker prerequisites
sudo apt install -y ca-certificates curl
# Add Docker's official GPG key
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add Docker repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Update again (because new repository was added)
sudo apt update
# Install Docker Engine, CLI, and Compose
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginThis installs Docker and Docker Compose. Docker Compose lets you run multiple containers at once (app + database).
# Start Docker now
sudo systemctl start docker
# Enable Docker to auto-start on system boot
sudo systemctl enable docker# Check Docker version
sudo docker --version
# Check Docker Compose version
sudo docker compose versionExpected output (example):
Docker version 27.0.0, build abc123
Docker Compose version v2.28.0
Clone the Free WMS project from GitHub to your VPS:
# Go to home directory
cd ~
# Clone the repository
git clone https://github.com/go2ismail/Asp.Net-Core-Inventory-Order-Management-System.git
# Enter the project folder
cd Asp.Net-Core-Inventory-Order-Management-SystemMake sure the Docker files exist:
ls -laYou should see these files:
Dockerfile✅ — instructions to build the app containerdocker-compose.yml✅ — configuration to run app + database.dockerignore✅ — files excluded from the Docker build
This is the most important step — it starts the application and the database:
sudo docker compose up -dWhat happens?
docker compose= run based ondocker-compose.ymlconfigurationup= build image (if not exists) + start containers-d= run in background (detached), your terminal stays free
Process:
- Download SQL Server Express image (~300 MB) — first time only
- Build the application image from
Dockerfile— every time code changes - Start SQL Server container — waits until SQL is ready (health check)
- Start API container — after SQL is ready, the app connects to the database
The download/build process may take 3-10 minutes depending on your VPS internet speed.
# List running containers
sudo docker psExpected output:
CONTAINER ID IMAGE STATUS PORTS NAMES
abc123 free-wms-api:latest Up 2 minutes 0.0.0.0:5000->5000/tcp wms-api
def456 mcr.microsoft.com/mssql/server:2022-express Up 2 minutes 1433/tcp wms-sqlserver
Both containers must show status "Up" (not "Exited" or "Restarting").
If something goes wrong, check the logs:
# Application logs
sudo docker logs wms-api
# SQL Server logs
sudo docker logs wms-sqlserver
# Follow real-time logs (Ctrl+C to exit)
sudo docker logs -f wms-apiOpen a browser on your computer and go to:
http://your-vps-ip-address:5000
Example:
http://123.123.123.123:5000
⚠️ IMPORTANT: Make sure port 5000 is allowed in your VPS firewall (usually configured in your cloud provider panel like DigitalOcean, Linode, AWS, etc.).
Default login credentials:
- Email: admin@root.com
- Password: 123456
# Stop containers (app & database still exist, data is safe)
sudo docker compose stop
# Start again
sudo docker compose start
# Stop + remove containers (data stays safe in volumes)
sudo docker compose down
# Stop + remove containers + remove volumes (⚠️ DATA LOST)
sudo docker compose down -vWhen there are code changes on GitHub, update the app:
# Go to project folder
cd ~/Asp.Net-Core-Inventory-Order-Management-System
# Pull latest changes from GitHub
git pull
# Rebuild the app image & restart containers
sudo docker compose up -d --build
--buildtells Docker to rebuild the application image with the latest code.
To backup the SQL Server database:
# Backup to .bak file inside the container
sudo docker exec wms-sqlserver /opt/mssql-tools18/bin/sqlcmd \
-S localhost -U sa -P "YourStrong!Passw0rd" -C \
-Q "BACKUP DATABASE [WHMS-LTE-FS] TO DISK = N'/var/opt/mssql/backup.bak'"
# Copy the backup file from container to VPS host
sudo docker cp wms-sqlserver:/var/opt/mssql/backup.bak ~/backup-wms.bak
# Download backup to your local computer (via SCP)
# From your local computer, run:
# scp root@123.123.123.123:~/backup-wms.bak .# Stop & remove containers + volumes (⚠️ DATA LOST)
cd ~/Asp.Net-Core-Inventory-Order-Management-System && sudo docker compose down -v
# Remove Docker image
sudo docker rmi free-wms-api
# Remove project folder
cd ~ && rm -rf ~/Asp.Net-Core-Inventory-Order-Management-System
# Uninstall Docker (if no longer needed)
sudo apt remove -y docker-ce docker-ce-cli containerd.io docker-compose-pluginsudo docker logs wms-apiUsually because SQL Server isn't ready yet. The health check is already configured, so wait 30-60 seconds.
# Check what's using port 5000
sudo lsof -i :5000
# Stop the process or change the port in docker-compose.ymlMake sure SQL Server is ready:
sudo docker logs wms-sqlserverWait until you see: SQL Server is now ready for client connections.
# Check disk usage
df -h
# Clean up unused Docker data
sudo docker system prune -aAlways use sudo before Docker commands, or add your user to the docker group:
sudo usermod -aG docker $USERThen log out and log back in.
Asp.Net-Core-Inventory-Order-Management-System/
├── Dockerfile ← Build instructions for the app image
├── docker-compose.yml ← Container configuration (app + SQL)
├── .dockerignore ← Files excluded from the build
├── README_DOCKER_DEPLOYMENT.md ← This guide
└── Presentation/
└── ASPNET/
├── appsettings.json ← Dev config (SQL via localhost)
└── appsettings.Docker.json ← Docker config (SQL via service name)
| Command | Description |
|---|---|
sudo docker compose up -d |
Start app + database |
sudo docker compose down |
Stop & remove containers |
sudo docker compose logs -f wms-api |
View real-time app logs |
sudo docker compose up -d --build |
Rebuild & restart after code update |
sudo docker ps |
Check container status |
sudo docker compose stop |
Stop containers (data safe) |
sudo docker compose start |
Start containers again |
Good luck! 🚀
If you have questions, please open an issue on the GitHub repository.