Configuration
Environment variables and configuration options for DevEnv Pro
Configuration
Complete guide to configuring DevEnv Pro for your needs.
Environment Variables
Required Variables
Create docker/.env from .env.example:
cd docker
cp .env.example .envPasswords
| Variable | Default | Description |
|---|---|---|
CODE_SERVER_PASSWORD | devenv | Code-Server authentication |
RDP_PASSWORD | devenv | RDP/xrdp authentication |
VNC_PASSWORD | devenv | VNC authentication (legacy) |
Guacamole Database
| Variable | Default | Description |
|---|---|---|
GUACAMOLE_DB_NAME | guacamole_db | PostgreSQL database name |
GUACAMOLE_DB_USER | guacamole_user | Database user |
GUACAMOLE_DB_PASSWORD | guacamole_pass | Database password |
SSH Access
| Variable | Example | Description |
|---|---|---|
SSH_PUBLIC_KEY | ssh-rsa AAAA... | Public key for passwordless SSH |
Generate your key:
cat ~/.ssh/id_rsa.pubGitHub Integration
| Variable | Example | Description |
|---|---|---|
GITHUB_TOKEN | ghp_xxxxxxxxxxxx | GitHub personal access token |
Create at: https://github.com/settings/tokens
Required scopes: repo, read:org, workflow
Display Settings
| Variable | Default | Description |
|---|---|---|
VNC_RESOLUTION | 1920x1080 | Display resolution |
VNC_DEPTH | `24 | Color depth (16 or 24) |
Timezone
| Variable | Default | Description |
|---|---|---|
TZ | Europe/Madrid | Container timezone |
Find your timezone at: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
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 from 8080 for Coolify |
| 8443 | 8443 | Code-Server | Standard HTTPs alternative |
If you have services running on these ports, update the port mappings in docker-compose.yaml.
Volumes
Persistent Data Volumes
| Volume | Purpose | Location |
|---|---|---|
mks-devenv-workspace | Workspace files | /workspace |
mks-devenv-config | App configs | /root/.config |
mks-devenv-vscode | VS Code settings | /root/.vscode |
mks-devenv-vscode-data | Code-Server data | /root/.local/share/code-server |
mks-devenv-claude | Claude Code config | /root/.claude |
mks-devenv-ssh-keys | SSH keys | /root/.ssh |
mks-guacamole-db | Guacamole database | /var/lib/postgresql/data |
Backup and Restore
Backup volumes:
# List volumes
docker volume ls
# Backup a volume
docker run --rm -v mks-devenv-workspace:/data -v $(pwd)/backup:/backup alpine tar czf /backup/backup.tar.gz /data
# Restore a volume
docker run --rm -v mks-devenv-workspace:/data -v $(pwd)/backup:/backup alpine tar xzf /backup/backup.tar.gzCustom Configuration
Extending devenv-full
To add custom software to devenv-full:
- Edit
docker/devenv-full/Dockerfile - Add packages in the appropriate RUN section
- Rebuild:
docker compose up -d --build devenv
Adding Extensions to VS Code
VS Code extensions are installed during build. To add more:
Edit docker/devenv-full/Dockerfile:
RUN code-server --install-extension <extension-id>Custom Dotfiles
The container includes custom dotfiles from docker/base/dotfiles/:
- Tmux: Custom configuration with utilities (tx, txout, cx)
- Oh My Posh: Custom theme (mks-local.omp.json)
- Alacritty: Modern terminal configuration
- Claude Model: Model switcher script
Security
Password Management
Always change default passwords before deploying to production!
- Change
.envpasswords before first startup - Change Guacamole admin after first login
- Use SSH keys instead of passwords for SSH
- Rotate secrets regularly
SSH Key Setup
Generate SSH key if you don't have one:
ssh-keygen -t ed25519 -C "your@email.com"Add to .env:
SSH_PUBLIC_KEY="ssh-ed25519 AAAA... your@email.com"Firewall Rules
On your VPS, ensure these ports are open:
# UFW example
ufw allow 22/tcp # SSH
ufw allow 3389/tcp # RDP
ufw allow 8081/tcp # Guacamole
ufw allow 8443/tcp # Code-ServerCoolify Integration
Traefik Labels
The stack includes Traefik labels for automatic HTTPS routing:
devenv services:
- Desktop:
lab1-helsinki.desktop.mks2508.systems - Code-Server:
lab1-helsinki.code.mks2508.systems - SSH:
lab1-helsinki.ssh.mks2508.systems(TCP)
Guacamole:
- Web UI:
lab1-helsinki.guacamole.mks2508.systems
Resource Limits
Code-Server has resource limits (configured in code-server compose):
- CPUs: 2
- Memory: 4GB
Adjust if needed in docker/code-server/docker-compose.yaml.