Installation
Complete installation guide for MKS DevEnv
Installation
Complete installation guide for MKS DevEnv on your local machine or VPS.
System Requirements
Minimum Requirements
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 4GB | 8GB+ |
| Disk Space | 20GB | 50GB+ |
| CPU | 2 cores | 4+ cores |
| Docker | v20.10+ | Latest |
| Docker Compose | v2.0+ | Latest |
Operating System
- macOS: 11+ (Big Sur or later)
- Windows: 10/11 with WSL2
- Linux: Ubuntu 20.04+, Debian 11+, or compatible
Installation Methods
Quick Start Installation
Clone the repository:
git clone https://github.com/MKS2508/mks-dev-environment.git
cd mks-dev-environment/dockerCreate environment file:
cp .env.example .envEdit .env with your preferred editor:
# Required passwords
CODE_SERVER_PASSWORD=your_secure_password
RDP_PASSWORD=your_secure_password
VNC_PASSWORD=your_secure_password
# Database
GUACAMOLE_DB_NAME=guacamole_db
GUACAMOLE_DB_USER=guacamole_user
GUACAMOLE_DB_PASSWORD=your_db_password
# SSH (optional but recommended)
SSH_PUBLIC_KEY="ssh-rsa AAAA... your@email.com"
# GitHub (optional)
GITHUB_TOKEN=ghp_xxxxxxxxxxxx
# Display
VNC_RESOLUTION=1920x1080
VNC_DEPTH=24
# Timezone
TZ=America/New_YorkSecurity: Always use strong, unique passwords. The defaults should be changed for production use.
Start all services:
docker compose up -dThis will pull images and start:
- devenv-full (desktop environment)
- guacamole-postgres (database)
- guacamole-guacd (proxy daemon)
- guacamole (web interface)
Initialize Guacamole database:
cd guacamole
chmod +x init.sh
./init.shThis creates the database schema and a default RDP connection.
Verify installation:
# Check all services are running
docker compose ps
# Check service health
docker compose psAll services should show "Up" or "healthy" status.
Access your environment:
- Guacamole: http://localhost:8081/guacamole (guacadmin/guacadmin)
- Code-Server: http://localhost:8443
- RDP: localhost:3389 (root/your RDP password)
- SSH:
ssh root@localhost -p 2222
Coolify VPS Deployment
Deploy to a VPS with automatic HTTPS via Coolify.
Push to GitHub:
git add .
git commit -m "Ready for Coolify deployment"
git push origin masterConnect repository in Coolify:
- Open Coolify dashboard
- Click New Application
- Select Git (GitHub)
- Connect your repository
- Select branch:
master
Configure application:
- Name:
mks-dev-environment - Build Pack: Docker Compose
- Base Directory:
/docker - Docker Compose Location:
/docker-compose.yaml
Configure domains:
| Service | Domain Example |
|---|---|
| devenv | devenv.your-domain.com |
| guacamole | guacamole.your-domain.com |
Traefik will automatically generate SSL certificates.
Add environment variables in Coolify secrets:
CODE_SERVER_PASSWORDRDP_PASSWORDGUACAMOLE_DB_PASSWORDSSH_PUBLIC_KEYGITHUB_TOKEN
Deploy and verify:
- Click Deploy
- Wait for build and health checks
- Access via configured domains
Manual VPS Installation
Deploy directly to a VPS with manual SSL configuration.
Connect to your VPS:
ssh root@your-vps-ipInstall Docker:
curl -fsSL https://get.docker.com | sh
usermod -aG docker $USERLog out and back in for group changes to take effect.
Clone repository:
cd /opt
git clone https://github.com/MKS2508/mks-dev-environment.git
cd mks-dev-environment/dockerConfigure environment:
cp .env.example .env
nano .env
# Edit with your passwords and configurationStart services:
docker compose up -dInitialize Guacamole:
cd guacamole
chmod +x init.sh
./init.shConfigure SSL (optional but recommended):
Using Nginx reverse proxy:
server {
listen 443 ssl;
server_name guacamole.your-domain.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://localhost:8081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}Environment Variables Reference
Required Variables
| Variable | Description | Example |
|---|---|---|
CODE_SERVER_PASSWORD | Code-Server authentication | SecurePass123! |
RDP_PASSWORD | RDP/xrdp authentication | SecurePass123! |
GUACAMOLE_DB_PASSWORD | PostgreSQL password | DbPass456! |
Optional Variables
| Variable | Description | Default |
|---|---|---|
VNC_PASSWORD | VNC authentication (legacy) | devenv |
GUACAMOLE_DB_NAME | Database name | guacamole_db |
GUACAMOLE_DB_USER | Database user | guacamole_user |
SSH_PUBLIC_KEY | Public SSH key | - |
GITHUB_TOKEN | GitHub PAT | - |
VNC_RESOLUTION | Display resolution | 1920x1080 |
VNC_DEPTH | Color depth (16 or 24) | 24 |
TZ | Timezone | Europe/Madrid |
Port Mapping
| Host Port | Container | Service | Notes |
|---|---|---|---|
| 2222 | 22 | SSH | Changed from 22 to avoid conflict |
| 3389 | 3389 | RDP | Standard RDP port |
| 8081 | 8080 | Guacamole | Changed for Coolify compatibility |
| 8443 | 8443 | Code-Server | Standard HTTPS alternative |
Port Conflicts: If you have services running on these ports, update the port mappings in docker-compose.yaml.
Post-Installation Steps
Change Guacamole Admin Password
- Login to Guacamole: http://localhost:8081/guacamole
- Use default credentials:
guacadmin/guacadmin - Go to Settings → Users
- Change the admin password immediately
Configure SSH Key (Optional but Recommended)
# Generate SSH key if you don't have one
ssh-keygen -t ed25519 -C "your@email.com"
# Copy public key
cat ~/.ssh/id_ed25519.pub
# Add to .env
SSH_PUBLIC_KEY="ssh-ed25519 AAAA... your@email.com"
# Restart devenv container
docker compose restart devenvVerify All Services
# Check service status
docker compose ps
# Test endpoints
curl -f http://localhost:8081/guacamole
curl -f http://localhost:8443/healthz
# Check logs
docker compose logs -fUpgrading
To upgrade to the latest version:
# Pull latest changes
git pull origin master
# Rebuild and restart
docker compose up -d --build
# Re-initialize Guacamole if needed
cd guacamole && ./init.shUninstallation
To completely remove DevEnv:
WARNING: This deletes all data, volumes, and configurations!
# Stop all services
docker compose down
# Remove all volumes (DELETES DATA)
docker volume rm $(docker volume ls -q)
# Remove images
docker rmi $(docker images -q mks-devenv-*)Troubleshooting
Port Already in Use
# Find what's using the port
sudo lsof -i :8081
# Stop conflicting service or change port in docker-compose.yamlPermission Denied
# Check Docker permissions
groups $USER
# Add user to docker group
sudo usermod -aG docker $USER
# Re-login for changes to take effectOut of Memory
# Increase Docker memory limit (Docker Desktop settings)
# Or add memory limit to docker-compose.yamlSee Troubleshooting for more help.
Next Steps
- Configuration - Customize your environment
- Deployment - Deploy to production
- CLI - Use command-line tools