Apache Guacamole is a web-based RDP, VNC, and SSH client. You can use it to access your servers from a web browser, without requiring any software to be installed on client devices. The installation process of Guacamole is relatively straightforward and takes a matter of minutes when using Docker.
Before proceeding with the installation of Guacamole, the Docker Engine must be installed on your server. A guide for installing Docker on Debian is available here.
mkdir ~/guac
cd ~/guac
.env
. This file will contain
environment variables that store the database connection information.GUACAMOLE_DATABASE=guacamole
GUACAMOLE_USER=guac
GUACAMOLE_PASSWORD=your-password-here
docker-compose.yml
file with the following contents:---
version: '3'
services:
guacd:
restart: always
image: guacamole/guacd
guacamole-server:
restart: always
image: guacamole/guacamole
links:
- guacd
- database
ports:
- "8080:8080"
environment:
- GUACD_HOSTNAME=guacd
- POSTGRESQL_HOSTNAME=database
- POSTGRESQL_DATABASE=${GUACAMOLE_DATABASE}
- POSTGRESQL_USER=${GUACAMOLE_USER}
- POSTGRESQL_PASSWORD=${GUACAMOLE_PASSWORD}
database:
restart: always
image: postgres:15.5-alpine
environment:
- POSTGRES_USER=${GUACAMOLE_USER}
- POSTGRES_DB=${GUACAMOLE_DATABASE}
- POSTGRES_PASSWORD=${GUACAMOLE_PASSWORD}
volumes:
- ./db:/var/lib/postgresql/data:rw
- ./initdb.sql:/initdb.sql:ro
docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --postgresql > initdb.sql
docker compose up -d
# Get a shell as the postgres user on the PostgreSQL container
docker exec -u postgres -it guac-database-1 /bin/sh
# Import the database schema
psql -U guac guacamole -f /initdb.sql
# Exit the shell
exit
Open the docker-compose.yml
file once more and remove the line for
mounting the initdb.sql
file to the PostgreSQL container.
Recreate the containers
docker compose up -d
Open a web browser, and navigate to http://your.ip:8080 and you should be
presented with a login screen. The default username and password for Guacamole
is guacadmin
.
Once you have signed in to Guacamole, it is recommended to change the administrator password. This can be done by following the below steps:
Once your password has been changed, you can add additional users and begin adding connections!