guacamole
by dmunozv04
A Helm chart for deploying Guacamole, a clientless remote desktop gateway that supports standard protocols like VNC, RDP, and SSH.
About this chart
Apache Guacamole Helm Chart
A Helm chart for deploying Apache Guacamole, a clientless remote desktop gateway that supports standard protocols like VNC, RDP and SSH.
Overview
Apache Guacamole is a clientless remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH. This Helm chart deploys Guacamole with separate deployments for:
- Guacamole Client: The web application providing the user interface
- Guacd: The proxy daemon that handles the actual protocol connections
Features
- Multiple Authentication Backends: PostgreSQL, MySQL, SQL Server, LDAP, SAML, OpenID Connect, Duo MFA, CAS, RADIUS, JSON signed, QuickConnect, Header-based, TOTP
- Separate Deployments: Independent scaling and configuration for client and guacd
- Auto-scaling: Horizontal Pod Autoscaler support for both components
- Highly Configurable: Support for all major Guacamole environment variables
- Security: Service accounts, security contexts, and proxy support
- Monitoring: Health checks and resource management
- Ingress: Built-in ingress support with TLS
- Gateway API: HTTPRoute support for advanced traffic management
- Documentation: Comprehensive values documentation
Prerequisites
- Kubernetes 1.19+
- Helm 3.2.0+
- PV provisioner support in the underlying infrastructure (optional, for session recordings)
Installation
Add Helm Repository
helm repo add guacamole https://your-repo-url
helm repo update
Install Chart
# Install with default values
helm install my-guacamole guacamole/guacamole
# Install with custom values
helm install my-guacamole guacamole/guacamole -f values.yaml
# Install in specific namespace
helm install my-guacamole guacamole/guacamole --namespace guacamole --create-namespace
Database Authentication Setup
PostgreSQL Authentication
-
Initialize Database Schema:
# Generate the schema initialization script docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --postgresql > initdb.sql # Apply to your PostgreSQL database psql -h your-postgres-host -U postgres -d guacamole -f initdb.sql -
Configure Values:
client: auth: postgresql: enabled: true hostname: "your-postgres-host" database: "guacamole" username: "guacamole_user" password: "your-secure-password"
MySQL Authentication
-
Initialize Database Schema:
# Generate the schema initialization script docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql # Apply to your MySQL database mysql -h your-mysql-host -u root -p guacamole < initdb.sql -
Configure Values:
client: auth: mysql: enabled: true hostname: "your-mysql-host" database: "guacamole" username: "guacamole_user" password: "your-secure-password"
SQL Server Authentication
-
Initialize Database Schema:
# Generate the schema initialization script docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --sqlserver > initdb.sql # Create database and apply schema sqlcmd -S your-sqlserver-host -U SA -Q "CREATE DATABASE guacamole_db;" sqlcmd -S your-sqlserver-host -U SA -d guacamole_db -i initdb.sql -
Configure Values:
client: auth: sqlserver: enabled: true hostname: "your-sqlserver-host" database: "guacamole_db" username: "guacamole_user" password: "your-secure-password"
Default Database Credentials
⚠️ IMPORTANT: When using a fresh database, the default credentials are:
- Username:
guacadmin - Password:
guacadmin
Change these credentials immediately after first login!
Authentication Backends
LDAP Authentication
client:
auth:
ldap:
enabled: true
hostname: "your-ldap-server"
port: "389"
userBaseDn: "ou=users,dc=example,dc=com"
searchBindDn: "cn=admin,dc=example,dc=com"
searchBindPassword: "admin-password"
SAML Authentication
client:
auth:
saml:
enabled: true
idpUrl: "https://your-idp.com/saml/sso"
entityId: "guacamole"
callbackUrl: "https://your-guacamole.com/guacamole/"
OpenID Connect Authentication
client:
auth:
openid:
enabled: true
authorizationEndpoint: "https://your-provider.com/auth"
jwksEndpoint: "https://your-provider.com/jwks"
issuer: "https://your-provider.com"
clientId: "your-client-id"
redirectUri: "https://your-guacamole.com/guacamole/"
Duo Multi-Factor Authentication
client:
auth:
duo:
enabled: true
apiHostname: "api-XXXXXXXX.duosecurity.com"
clientId: "your-client-id"
clientSecret: "your-client-secret"
redirectUri: "https://your-guacamole.com/guacamole/"
CAS Single Sign-On
client:
auth:
cas:
enabled: true
authorizationEndpoint: "https://cas.example.com"
redirectUri: "https://your-guacamole.com/guacamole/"
RADIUS Authentication
client:
auth:
radius:
enabled: true
hostname: "your-radius-server"
authPort: "1812"
sharedSecret: "your-shared-secret"
authProtocol: "pap" # or chap, mschapv1, mschapv2, eap-md5, eap-tls, eap-ttls
JSON Signed Authentication
client:
auth:
json:
enabled: true
secretKey: "4c0b569e4c96df157eee1b65dd0e4d41" # 32-digit hex key
QuickConnect (Ad-hoc Connections)
client:
auth:
quickconnect:
enabled: true
allowedParameters: "hostname,port,username" # Optional: limit allowed parameters
deniedParameters: "password" # Optional: explicitly deny parameters
Configuration Examples
Basic Deployment with PostgreSQL
client:
replicaCount: 2
auth:
postgresql:
enabled: true
hostname: "postgres.default.svc.cluster.local"
database: "guacamole"
username: "guacamole"
password: "secure-password"
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 250m
memory: 256Mi
guacd:
replicaCount: 1
resources:
limits:
cpu: 300m
memory: 256Mi
requests:
cpu: 150m
memory: 128Mi
ingress:
enabled: true
hosts:
- host: guacamole.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: guacamole-tls
hosts:
- guacamole.example.com
Gateway API HTTPRoute
# Using Gateway API instead of traditional Ingress
httpRoute:
enabled: true
annotations:
example.com/policy: "rate-limit"
parentRefs:
- name: my-gateway
namespace: gateway-system
sectionName: http
hostnames:
- guacamole.example.com
rules:
- matches:
- path:
type: PathPrefix
value: /
Production Deployment with Auto-scaling
client:
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10
targetCPUUtilizationPercentage: 70
auth:
postgresql:
enabled: true
hostname: "postgres.database.svc.cluster.local"
database: "guacamole"
username: "guacamole"
password: "production-password"
api:
sessionTimeout: "120" # 2 hours
maxRequestSize: "10485760" # 10MB
proxy:
enabled: true
allowedIpsRegex: "192\\.168\\..*|10\\..*"
guacd:
autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 5
targetCPUUtilizationPercentage: 80
logLevel: "info"
ingress:
enabled: true
className: "nginx"
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/proxy-body-size: "10m"
hosts:
- host: guacamole.company.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: guacamole-tls
hosts:
- guacamole.company.com
Advanced Configuration
Init Containers
Init containers can be added to either the client or guacd deployments for tasks like database initialization, waiting for dependencies, or preparing shared storage.
client:
initContainers:
- name: wait-for-database
image: busybox:1.36
command: ['sh', '-c', 'until nc -z postgres.default.svc.cluster.local 5432; do echo waiting for database; sleep 2; done']
- name: init-config
image: busybox:1.36
command: ['sh', '-c', 'cp /config/* /shared/']
volumeMounts:
- name: config
mountPath: /config
- name: shared
mountPath: /shared
guacd:
initContainers:
- name: init-recordings
image: busybox:1.36
command: ['sh', '-c', 'mkdir -p /recordings && chmod 1777 /recordings']
volumeMounts:
- name: recordings
mountPath: /recordings
Session Recording
client:
recording:
enabled: true
searchPath: "/opt/guacamole/recordings"
# Mount shared volume for recordings
volumeMounts:
- name: recordings
mountPath: /opt/guacamole/recordings
volumes:
- name: recordings
persistentVolumeClaim:
claimName: guacamole-recordings
Environment Variables from ConfigMaps and Secrets
Both the client and guacd deployments support loading environment variables from ConfigMaps and Secrets using envFrom. This is useful for managing configuration externally or integrating with secret management systems.
client:
envFrom:
configMap: "guacamole-client-config"
secret: "guacamole-client-secrets"
extraEnv:
- name: ADDITIONAL_VAR
value: "additional-value"
guacd:
envFrom:
configMap: "guacd-config"
secret: "guacd-secrets"
extraEnv:
- name: CUSTOM_GUACD_VAR
value: "custom-value"
Custom Extensions
client:
guacamoleHome:
path: "/etc/guacamole"
extensionPriority:
order: "saml, postgresql, ldap"
extraEnv:
- name: CUSTOM_EXTENSION_VAR
value: "custom-value"
Multi-Authentication Setup
client:
auth:
postgresql:
enabled: true
hostname: "postgres.default.svc.cluster.local"
database: "guacamole"
username: "guacamole"
password: "db-password"
ldap:
enabled: true
hostname: "ldap.company.com"
port: "389"
userBaseDn: "ou=users,dc=company,dc=com"
searchBindDn: "cn=guacamole,ou=services,dc=company,dc=com"
searchBindPassword: "ldap-password"
saml:
enabled: true
idpUrl: "https://sso.company.com/saml/sso"
entityId: "guacamole-prod"
duo:
enabled: true
apiHostname: "api-XXXXXXXX.duosecurity.com"
clientId: "your-client-id"
clientSecret: "your-client-secret"
redirectUri: "https://guacamole.company.com/guacamole/"
extensionPriority:
order: "saml, duo, ldap, postgresql"
authProviders:
skipIfUnavailable: "ldap" # Continue if LDAP is down
Troubleshooting
Common Issues
-
Database Connection Failed:
- Verify database credentials and hostname
- Ensure database schema is initialized
- Check network connectivity between pods and database
-
Authentication Not Working:
- Verify extension priority order
- Check authentication provider configuration
- Review Guacamole logs for specific errors
-
Connection to Remote Desktop Failed:
- Verify guacd deployment is running
- Check connectivity between client and guacd pods
- Ensure target systems are accessible from guacd pods
Debugging
# Check pod status
kubectl get pods -l app.kubernetes.io/name=guacamole
# View client logs
kubectl logs -l app.kubernetes.io/component=client
# View guacd logs
kubectl logs -l app.kubernetes.io/component=guacd
# Test database connectivity
kubectl exec -it deployment/my-guacamole-client -- nc -zv postgres.default.svc.cluster.local 5432
Security Considerations
- Always change default database credentials
- Use TLS for all external connections
- Configure proper network policies
- Regularly update to latest versions
- Use strong passwords and enable MFA when available
- Monitor access logs and failed login attempts
Values
| Key | Type | Default | Description |
|---|---|---|---|
| client.replicaCount | int | 1 | Number of client replicas |
| client.image.repository | string | "guacamole/guacamole" | Client container image repository |
| client.image.pullPolicy | string | "IfNotPresent" | Client image pull policy |
| client.service.type | string | "ClusterIP" | Client service type |
| client.service.port | int | 8080 | Client service port |
| client.envFrom.configMap | string | "" | ConfigMap name for client environment variables |
| client.envFrom.secret | string | "" | Secret name for client environment variables |
| client.extraEnv | list | [] | Additional environment variables for client |
| client.initContainers | list | [] | Init containers for the client pod |
| client.auth.postgresql.enabled | bool | false | Enable PostgreSQL authentication |
| client.auth.mysql.enabled | bool | false | Enable MySQL authentication |
| client.auth.ldap.enabled | bool | false | Enable LDAP authentication |
| guacd.replicaCount | int | 1 | Number of guacd replicas |
| guacd.image.repository | string | "guacamole/guacd" | Guacd container image repository |
| guacd.service.port | int | 4822 | Guacd service port |
| guacd.envFrom.configMap | string | "" |
Deploy guacamole with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has guacamole on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartguacamole is pinned at v0.3.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply