Setting up Apache Guacamole using Docker
The IP of my docker server is 192.168.10.11
Step 1: sudo docker run --name my-guacd -d guacamole/guacd
Step 2: sudo docker run --name guacamole-mysql -e MYSQL_ROOT_PASSWORD=sqlpassword -d --restart unless-stopped mysql:latest
Step 3: sudo docker exec -it guacamole-mysql /bin/bash
mysql -u root -p
CREATE DATABASE guacamole_db;CREATE USER 'guacamole_user'@'%' IDENTIFIED BY 'guacamopwd';GRANT ALL PRIVILEGES ON guacamole_db.* TO 'guacamole_user'@'%';FLUSH PRIVILEGES;
Exit out of the mysql docker
Step 4:
sudo docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql
sudo cat initdb.sql | sudo docker exec -i guacamole-mysql /usr/bin/mysql -u guacamole_user -pguacamopwd -D guacamole_db
note: there is no space between -p and guacamopwd (the actual password)
Step 5:
sudo docker run --name my-guacamole \--link my-guacd:guacd \--link guacamole-mysql:mysql \-e WEBAPP_CONTEXT=ROOT \-e MYSQL_HOSTNAME=192.168.10.11 \-e MYSQL_DATABASE=guacamole_db \-e MYSQL_USER=guacamole_user \-e MYSQL_PASSWORD=guacamopwd \-e TOTP_ENABLED=true \--restart unless-stopped \-d -p 8080:8080 guacamole/guacamole
Check that quacamole is running: sudo docker logs my-guacamole
Default admin login is guacadmin/guacadmin
Reference:Visit: https://guacamole.github.com/boschkundendienst/guacamole-docker-compose
Follow instructions which in short are:
If you want to add TOTP then do the following:
After adding the above extension, restart the container.