The documentation was not correctly updated for this, but since 1.3.0 a
*much* easier way to do this is set the "TOTP_ENABLED" environment variable
to "true".

You don't need to manually copy/mount the .jar into place.

- Mike

On Tue, Jun 14, 2022, 06:58 CYBER PUNK <[email protected]> wrote:

> Thank you so much I'll test it out tomorrow when I have a moment. This is
> going to really help
> 😁
>
> Regards
> Brodie
>
> On Tue, Jun 14, 2022, 3:53 PM MAURIZI Lorenzo <[email protected]>
> wrote:
>
>> Hi.
>>
>> in your compose file, into the ā€œguacamoleā€ container definition, you
>> should add an environment variable to specify a different guacamole home
>> folder:
>>
>>
>>
>> environment:
>>
>>       MYSQL_HOSTNAME: […]
>>
>>       MYSQL_DATABASE: […]
>>
>> […]
>>
>>       GUACAMOLE_HOME: /guacamole-home
>>
>>
>>
>> Then you need to map a local directory for the ā€œguacamole-homeā€ directory:
>>
>>
>>
>> volumes:
>>
>>       - /some-folder/guacamole-home:/guacamole-home
>>
>>
>>
>> Then, you create /some-folder/guacamole-home in your server, and a
>> /some-folder/guacamole-home/extensions directory.
>>
>>
>>
>> Then you can put the TOTP Jar file into this extensions directory.
>>
>> Then restart the container and voila!
>>
>>
>>
>> I hope it’s clear!
>>
>>
>>
>> Best regards.
>>
>>
>> Lorenzo
>>
>>
>>
>> .
>>
>>
>>
>> *Da:* CYBER PUNK <[email protected]>
>> *Inviato:* martedƬ 14 giugno 2022 15:30
>> *A:* [email protected]
>> *Oggetto:* Question on the setup of 2FA
>>
>>
>>
>> Hello
>>
>> This is a docker compose file i created to remember how to set it up
>>
>> My question is what do in need to do to setup 2FA with an authentication app
>> like google auth. I tried following the docs but it flew over my head
>>
>>
>> docker-compose.yaml
>>
>>
>>
>> version: "2.1"
>>
>> services:
>>
>>   guacamole:
>>
>>     image: guacamole/guacamole
>>
>>     container_name: some-guacamole
>>
>>     environment:
>>
>>       - MYSQL_DATABASE=guacamole_db
>>
>>       - MYSQL_USER=guacamole_user
>>
>>       - MYSQL_PASSWORD=some_password
>>
>>       - GUACD_HOSTNAME=some-guacd
>>
>>       - GUACD_PORT=4822
>>
>>       - MYSQL_HOSTNAME=some-mysql
>>
>>       - MYSQL_PORT=3306
>>
>>       - TZ=Africa/Johannesburg
>>
>>     ports:
>>
>>       - 8080:8080
>>
>>     restart: unless-stopped
>>
>>
>>
>>   guacd:
>>
>>     image: guacamole/guacd
>>
>>     container_name: some-guacd
>>
>>     restart: unless-stopped
>>
>>
>>
>>   mysql:
>>
>>     image: mysql
>>
>>     container_name: some-mysql
>>
>>     environment:
>>
>>       - MYSQL_DATABASE=guacamole_db
>>
>>       - MYSQL_USER=guacamole_user
>>
>>       - MYSQL_PASSWORD=some_password
>>
>>       - MYSQL_ROOT_PASSWORD=example
>>
>>     volumes:
>>
>>       -  /home/YOURLOCATION/config/guacamole:/var/lib/mysql
>>
>>     restart: unless-stopped
>>
>>
>>
>> #To bring up the containers
>>
>> sudo docker-compose up -d
>>
>>
>>
>> #Setting up the database inside the container
>>
>> sudo docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh 
>> --mysql > initdb.sql
>>
>> sudo docker cp initdb.sql some-mysql:/guac_db.sql
>>
>>
>>
>> #Go into the container
>>
>> sudo docker exec -it some-mysql bash
>>
>> cat guac_db.sql | mysql -u root -p guacamole_db
>>
>>
>>
>> #Now the database is set up and you can log into the web interface at 
>> http://YOURIP:8080/guacamole/
>>
>> #The default user and password is guacadmin
>>
>>

Reply via email to