Guacamole
Web-based remote desktop gateway for browser-based access to devenv-full
Guacamole
Apache Guacamole provides web-based remote desktop access to your devenv-full container, accessible from any modern web browser.
Architecture
Components
guacamole-postgres
PostgreSQL 15 Alpine database for Guacamole authentication.
Purpose: Stores user accounts, connections, and permissions.
Configuration:
- Database:
guacamole_db - User:
guacamole_user - Container:
mks-guacamole-postgres
Volume: guacamole-db (persistent)
Health Check: pg_isready every 10 seconds
guacamole-guacd
Guacamole proxy daemon - the heart of Guacamole.
Purpose: Translates Guacamole client protocol to RDP, VNC, or SSH.
Port: 4822
Container: mks-guacamole-guacd
Image: guacamole/guacd:latest (official)
guacamole
Web application for Guacamole (Tomcat-based).
Purpose: Browser-based UI for managing connections and accessing remote desktops.
Port: 8081 (host) → 8080 (container)
Container: mks-guacamole
Image: Custom build of guacamole/guacamole:latest
Default Credentials:
- Username:
guacadmin - Password:
guacadmin
⚠️ IMPORTANT: Change the default password after first login!
Initial Setup
One-Time Database Initialization
After starting services, run the initialization script:
cd docker/guacamole
chmod +x init.sh
./init.shThis script:
- Downloads the Guacamole database schema
- Applies the schema to PostgreSQL
- Creates a default RDP connection to
devenv-full
Default Connection Created
After initialization, a connection named "devenv-full RDP" is pre-configured:
| Parameter | Value |
|---|---|
| Protocol | RDP |
| Hostname | devenv (Docker service name) |
| Port | 3389 |
| Username | root |
| Password | devenv |
| Security | rdp |
| Ignore Cert | true |
Accessing Guacamole
Local Development
http://localhost:8081/guacamoleCoolify Deployment (Production)
https://lab1-helsinki.guacamole.mks2508.systemsFirst Login
- Open Guacamole in your browser
- Login with
guacadmin/guacadmin - IMPORTANT: Change your password immediately
- Click on "devenv-full RDP" to connect to the desktop
Adding New Connections
Via Web UI
- Login to Guacamole
- Go to Settings → Connections
- Click New Connection
- Configure:
- Name: Descriptive name
- Protocol: RDP, VNC, or SSH
- Parameters: hostname, port, credentials
Example: Add SSH Connection
- Create new connection
- Set protocol to SSH
- Configure:
- Hostname:
devenv - Port: 22
- Username:
root - Password: (use key-based auth instead)
- Hostname:
Configuration
Environment Variables
Configure in docker/.env:
# Database
GUACAMOLE_DB_NAME=guacamole_db
GUACAMOLE_DB_USER=guacamole_user
GUACAMOLE_DB_PASSWORD=guacamole_passPort Mapping
Changed from default 8080 to 8081 to avoid conflict with Coolify:
ports:
- "8081:8080" # Host:ContainerTroubleshooting
Connection Failed
Symptom: "Connection failed" error in Guacamole
Solutions:
-
Check devenv-full is healthy:
docker compose ps devenv -
Check network connectivity:
docker exec mks-guacamole ping devenv -
Check xrdp is running:
docker exec mks-devenv-full supervisorctl status xrdp
Database Errors
Symptom: Database-related errors in logs
Solutions:
-
Check PostgreSQL is healthy:
docker compose ps guacamole-postgres -
Re-run initialization:
cd guacamole && ./init.sh -
Reset database (last resort):
docker compose down docker volume rm mks-guacamole-db docker compose up -d guacamole-postgres guacamole-guacd guacamole cd guacamole && ./init.sh
Blank Screen After Connection
Symptom: Connection succeeds but shows blank screen
Solutions:
-
Check Xvfb is running:
docker exec mks-devenv-full supervisorctl status xvfb -
Check Xfce4 is running:
docker exec mks-devenv-full supervisorctl status xfce4 -
Check display resolution - lower it if needed in
.env:VNC_RESOLUTION=1280x720
Reset Everything
# Stop all services
docker compose down
# Remove database volume
docker volume rm mks-guacamole-db
# Start fresh
docker compose up -d
# Re-initialize
cd guacamole && ./init.sh