Guacamole docker compose: Difference between revisions
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Create a folder that will contain the different files and folders for our Guacamole environment… | |||
mkdir guacamole | |||
In the “guacamole” folder, create the “docker-compose.yml” file… | |||
touch docker-compose-yml | |||
Now open “docker-compose.yml” for editing… | |||
nano docker-compose.yml | |||
Here is the content of the “docker-compose.yml” file, adapt it to your environment… | |||
version: '3.8' | |||
services: | |||
guacamole_db: | |||
container_name: guacamole_db | |||
hostname: guacamole_db | |||
image: mariadb:10.11 | |||
restart: always | |||
volumes: | |||
- ./guacamole_db:/var/lib/mysql | |||
environment: | |||
- MYSQL_ROOT_PASSWORD=blablalinux | |||
- MYSQL_DATABASE=guacamole_db | |||
- MYSQL_USER=anyblabla | |||
- MYSQL_PASSWORD=blabla | |||
expose: | |||
- 3306 | |||
guacd: | |||
container_name: guacd | |||
hostname: guacd | |||
image: guacamole/guacd:latest | |||
restart: always | |||
volumes: | |||
- ./guacd_drive:/drive:rw | |||
- ./guacd_record:/record:rw | |||
expose: | |||
- 4822 | |||
guacamole: | |||
container_name: guacamole | |||
hostname: guacamole | |||
restart: always | |||
image: guacamole/guacamole:latest | |||
depends_on: | |||
- guacamole_db | |||
- guacd | |||
ports: | |||
- 8080:8080 | |||
links: | |||
- guacd | |||
environment: | |||
- GUACD_HOSTNAME=guacd | |||
- MYSQL_HOSTNAME=guacamole_db | |||
- MYSQL_DATABASE=guacamole_db | |||
- MYSQL_USER=anyblabla | |||
- MYSQL_PASSWORD=blabla | |||
- REMOTE_IP_VALVE_ENABLED=true | |||
In “environment” of the “guacamole_db” service… | |||
Don't forget to customize the “root” password for MySQL… | |||
- MYSQL_ROOT_PASSWORD=blablalinux | |||
Don't forget to customize the username for MySQL… | |||
- MYSQL_USER=anyblabla | |||
Don't forget to customize the password for MySQL… | |||
- MYSQL_PASSWORD=blabla | |||
The “environment” information of the “guacamole_db” service must be the same as the “environment” information of the “guacamole” service! | |||
The variable “- REMOTE_IP_VALVE_ENABLED=” must be activated if you are using a reverse proxy … | |||
- REMOTE_IP_VALVE_ENABLED=true | |||
To enable two-factor authentication , simply add this variable below the variable “- REMOTE_IP_VALVE_ENABLED=true”… | |||
- TOTP_ENABLED=true | |||
The default username and password is: guacadmin | |||
You can start the container! | |||
docker-compose up -d | |||
Manual/Portainer - Common Instructions | |||
sudo su | |||
docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql | |||
docker exec -i guacamole_db mysql --user anyblabla --password=blabla guacamole_db < initdb.sql | |||
The order must be adapted to your environment… | |||
--user anyblabla --password=blabla | |||
Latest revision as of 19:12, 30 March 2025
Create a folder that will contain the different files and folders for our Guacamole environment…
mkdir guacamole
In the “guacamole” folder, create the “docker-compose.yml” file…
touch docker-compose-yml
Now open “docker-compose.yml” for editing…
nano docker-compose.yml
Here is the content of the “docker-compose.yml” file, adapt it to your environment…
version: '3.8' services: guacamole_db: container_name: guacamole_db hostname: guacamole_db image: mariadb:10.11 restart: always volumes: - ./guacamole_db:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=blablalinux - MYSQL_DATABASE=guacamole_db - MYSQL_USER=anyblabla - MYSQL_PASSWORD=blabla expose: - 3306 guacd: container_name: guacd hostname: guacd image: guacamole/guacd:latest restart: always volumes: - ./guacd_drive:/drive:rw - ./guacd_record:/record:rw expose: - 4822 guacamole: container_name: guacamole hostname: guacamole restart: always image: guacamole/guacamole:latest depends_on: - guacamole_db - guacd ports: - 8080:8080 links: - guacd environment: - GUACD_HOSTNAME=guacd - MYSQL_HOSTNAME=guacamole_db - MYSQL_DATABASE=guacamole_db - MYSQL_USER=anyblabla - MYSQL_PASSWORD=blabla - REMOTE_IP_VALVE_ENABLED=true
In “environment” of the “guacamole_db” service…
Don't forget to customize the “root” password for MySQL…
- MYSQL_ROOT_PASSWORD=blablalinux
Don't forget to customize the username for MySQL…
- MYSQL_USER=anyblabla
Don't forget to customize the password for MySQL…
- MYSQL_PASSWORD=blabla
The “environment” information of the “guacamole_db” service must be the same as the “environment” information of the “guacamole” service!
The variable “- REMOTE_IP_VALVE_ENABLED=” must be activated if you are using a reverse proxy …
- REMOTE_IP_VALVE_ENABLED=true
To enable two-factor authentication , simply add this variable below the variable “- REMOTE_IP_VALVE_ENABLED=true”…
- TOTP_ENABLED=true
The default username and password is: guacadmin
You can start the container!
docker-compose up -d
Manual/Portainer - Common Instructions
sudo su docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql docker exec -i guacamole_db mysql --user anyblabla --password=blabla guacamole_db < initdb.sql
The order must be adapted to your environment…
--user anyblabla --password=blabla