Bobcares

Guacamole Docker | About

by | Jan 1, 2023

Wondering how to deploy Guacamole docker? Our Docker Support team is here to lend a hand with your queries and issues.

An Introduction to Guacamole Docker

Apache Guacamole is a client less remote desktop gateway. It supports standard protocols like VNC and RDP.

We call it client less because no plugins or client software is necessary.

Once Guacamole is installed on a server, all you need to access your desktops is a web browser.

How to use this image

Using this image will require an existing, running Docker container with the guacd image, and another Docker container providing either a PostgreSQL or MySQL database.

The name of the database and all associated credentials are specified with environment variables given when the container is created.

All other configuration information is generated from the Docker links.

Beware that you will need to initialize the database manually.

Guacamole will not automatically create its own tables, but SQL scripts are provided to do this.

Once the Guacamole image is running, Guacamole will accessible at

http://[address of container]:8080/guacamole/Copy Code
.

The instructions below use the 

-p 8080:8080Copy Code
 option to expose this port at the level of the machine hosting Docker, as well.

Deploying Guacamole with PostgreSQL authentication

docker run --name some-guacamole --link some-guacd:guacd \
    --link some-postgres:postgres      \
    -e POSTGRES_DATABASE=guacamole_db  \
    -e POSTGRES_USER=guacamole_user    \
    -e POSTGRES_PASSWORD=some_password \
    -d -p 8080:8080 guacamole/guacamole
Copy Code

Linking Guacamole to PostgreSQL requires three environment variables.

If any of these environment variables are omitted, you will receive an error message, and the image will stop:

  1. POSTGRES_DATABASECopy Code
     – The name of the database to use for Guacamole authentication.
  2. POSTGRES_USERCopy Code
     – The user that Guacamole will use to connect to PostgreSQL.
  3. POSTGRES_PASSWORDCopy Code
     – The password that Guacamole will provide when connecting to PostgreSQL as 
    POSTGRES_USERCopy Code
    .

Initializing the PostgreSQL database

If your database is not already initialized with the Guacamole schema, you will need to do so prior to using Guacamole. A convenience script for generating the necessary SQL to do this is included in the Guacamole image.

To generate a SQL script that we can use to initialize a fresh PostgreSQL database :

docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --postgres > initdb.sql
Copy Code

Alternatively, you can use the SQL scripts included with guacamole-auth-jdbc.

Once this script is generated, you must:

  1. Create a database for Guacamole within PostgreSQL, such as 
    guacamole_dbCopy Code
    .
  2. Run the script on the new database.
  3. Create a user for Guacamole within PostgreSQL with access to the tables and sequences of this database, such as 
    guacamole_userCopy Code
    .

Deploying Guacamole with MySQL authentication

docker run --name some-guacamole --link some-guacd:guacd \
    --link some-mysql:mysql         \
    -e MYSQL_DATABASE=guacamole_db  \
    -e MYSQL_USER=guacamole_user    \
    -e MYSQL_PASSWORD=some_password \
    -d -p 8080:8080 guacamole/guacamole
Copy Code

Linking Guacamole to MySQL requires three environment variables. If any of these environment variables are omitted, you will receive an error message, and the image will stop:

  1. MYSQL_DATABASECopy Code
     – The name of the database to use for Guacamole authentication.
  2. MYSQL_USERCopy Code
     – The user that Guacamole will use to connect to MySQL.
  3. MYSQL_PASSWORDCopy Code
     – The password that Guacamole will provide when connecting to MySQL as 
    MYSQL_USERCopy Code
    .

Initializing the MySQL database

If your database is not already initialized with the Guacamole schema, you will need to do so prior to using Guacamole.

A convenience script for generating the necessary SQL to do this is included in the Guacamole image.

To generate a SQL script that we can use to initialize a fresh MySQL database :

docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql
Copy Code

Alternatively, you can use the SQL scripts including guacamole-auth-jdbc.

Once this script is generated, you must:

  1. Create a database for Guacamole within MySQL, such as 
    guacamole_dbCopy Code
    .
  2. Create a user for Guacamole within MySQL with access to this database, such as 
    guacamole_userCopy Code
    .
  3. Run the script on the new database.

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

To wrap things up, our Support Engineers took us through the process of deploying a Guacamole docker.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Speed issues driving customers away?
We’ve got your back!