You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by "André R. Basel" <an...@basel.co.nz> on 2023/04/27 05:25:56 UTC

Quacamole docker install

Hi

I have been working through the documentation to install Quacamole using docker.

The IP of my docker server is 192.168.1.11

Base on my understanding of what I read, I did the following:

Step 1: sudo docker run --name my-guacd -d guacamole/guacd

Step 2: sudo docker run --name my-guacamole --link my-guacd:guacd -d -p 8080:8080 --restart unless-stopped guacamole/guacamole

Step 3: sudo docker run --name quacamole-mysql -e MYSQL_ROOT_PASSWORD=mypassword! -d --restart unless-stopped mysql:latest

Step 4: sudo docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql

Step 5:

sudo docker run --name my-guacamole \
--link my-guacd:guacd \
--link guacamole-mysql:mysql \
-e MYSQL_HOSTNAME=192.168.1.11 \
-e MYSQL_USER=guacamole_user \
-e MYSQL_PASSWORD=mypassword \
--restart unless-stopped \ -d -p 8080:8080 guacamole/guacamole

However when looking at the logs I get
FATAL: No authentication configured
-------------------------------------------------------------------------------
The Guacamole Docker container needs at least one authentication mechanism in
order to function, such as a MySQL database, PostgreSQL database, SQLServer
database, LDAP directory or RADIUS server. Please specify at least the
MYSQL_DATABASE or POSTGRES_DATABASE or SQLSERVER_DATABASE environment variables,
or check Guacamole's Docker documentation regarding configuring LDAP and/orcustom extensions.

My Docker setup looks as follows:
[image.png]

I tried following the instructions set the database up but I think I may have got those confused.

Is there a simplified set of steps to help a NOOB get it up and running, after which I can start playing with the different settings?

Kind regards
Andre

Sent with [Proton Mail](https://proton.me/) secure email.

R: R: Quacamole docker install

Posted by MAURIZI Lorenzo <l....@comune.jesi.an.it>.
Hello André
Please note that when using –p option in mysql command, the password should be put without any spaces after “p”,
so in this case:
sudo cat initdb.sql | sudo docker exec -i guacamole-mysql /usr/bin/mysql -u guacamole_user -prjgtpormdsl837dejkl_kl@ -D guacamole_db

Regards.

Lorenzo

Da: André R. Basel <an...@basel.co.nz>
Inviato: giovedì 27 aprile 2023 10:08
A: user@guacamole.apache.org
Oggetto: Re: R: Quacamole docker install

Found a syntax error so when I fixed that I got

sysadmin@services:~$ sudo cat initdb.sql | sudo docker exec -i guacamole-mysql /usr/bin/mysql -u guacamole_user -p rjgtpormdsl837dejkl_kl@ -D guacamole_db
Enter password: ERROR 1045 (28000): Access denied for user 'guacamole_user'@'localhost' (using password: YES)

Will fix access and then try again



André Basel
027 640 2527

Sent with Proton Mail<https://proton.me/> secure email.

------- Original Message -------
On Thursday, April 27th, 2023 at 20:00, André R. Basel <an...@basel.co.nz>> wrote:


Thanks Lorenzo

I think I might be close now.

I created Step 3B:

Step 3b:
CREATE USER 'guacamole_user'@'localhost' IDENTIFIED BY 'dbuserpwd';
GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost';
FLUSH PRIVILEGES

sudo cat initdb.sql | sudo docker exec -i quacamole-mysql /usr/bin/mysql -u guacamole_user -p mypassword guacamole_db

I ran the above but it did not work, instead a usage details showed eg
sysadmin@services:~$ sudo cat initdb.sql | sudo docker exec -i guacamole-mysql /usr/bin/mysql -u guacamole_user -p rjgtpormdsl837dejkl_kl@ guacamole_db
/usr/bin/mysql  Ver 8.0.33 for Linux on x86_64 (MySQL Community Server - GPL)
Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Usage: /usr/bin/mysql [OPTIONS] [database]
  -?, --help          Display this help and exit.
  -I, --help          Synonym for -?
  --auto-rehash       Enable automatic rehashing. One doesn't need to use
                      'rehash' to get table and field completion, but startup
                      and reconnecting may take a longer time. Disable with
                      --disable-auto-rehash.
                      (Defaults to on; use --skip-auto-rehash to disable.)
  -A, --no-auto-rehash
                      No automatic rehashing. One has to use 'rehash' to get
                      table and field completion. This gives a quicker start of
                      mysql and disables rehashing on reconnect.
  --auto-vertical-output
                      Automatically switch to vertical output mode if the
                      result is wider than the terminal width.
  -B, --batch         Don't use history file. Disable interactive behavior.
                      (Enables --silent.)
  --bind-address=name IP address to bind to.
  --binary-as-hex     Print binary data as hex. Enabled by default for
                      interactive terminals.

And there was not tables in the database.

Is that line meant to do the same as Step 4: sudo docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql or or something else, or should I be running this before 3B?

Kind regards


André Basel
027 640 2527

Sent with Proton Mail<https://proton.me/> secure email.

------- Original Message -------
On Thursday, April 27th, 2023 at 19:23, MAURIZI Lorenzo <l....@comune.jesi.an.it>> wrote:


Hello André,
in step 4 you are creating on current directory a script to initialize the database, but you don’t mention if you run that script into your mysql instance, to create database structure.
If not, you are trying to run Guacamole without a database set up.
Moreover you are missing MYSQL_DATABASE variable in step 5 (see https://guacamole.apache.org/doc/gug/guacamole-docker.html#required-environment-variables)

So i think you should:
create a new database into the mysql container.
For this I would use the mysql command from inside the container, to make it simple, so you should (please note I used your example values, so change them with the real values):
docker exec –it quacamole-mysql /bin/bash
then
mysql –u root –pmypassword!
Then in mysql prompt you should create the database
Mysql>CREATE DATABASE guacamole_db;
Mysql>GRANT ALL PRIVILEGES ON guacamole_db.* TO 'guacamole_user'@'%' IDENTIFIED BY ‘mypassword’;

After that you can issue “exit” twice to go back to the container bash prompt and then to the server bash prompt outside the mysql container.

Then you should import the “initdb.sql” script to create database structure:
cat initdb.sql | docker exec -i quacamole-mysql /usr/bin/mysql -u guacamole_user -pmypassword guacamole_db

At this point you should have a complete DB for guacamole.
Then you should start youd guacamole container (step 5) adding this environment variable to the command line:

-e MYSQL_DATABASE=guacamole_db

I think you should not get the error now.

I hope that I didn’t write anything wrong!
Best regards.
Lorenzo

Da: André R. Basel <an...@basel.co.nz>>
Inviato: giovedì 27 aprile 2023 07:26
A: user@guacamole.apache.org<ma...@guacamole.apache.org>
Oggetto: Quacamole docker install

Hi

I have been working through the documentation to install Quacamole using docker.

The IP of my docker server is 192.168.1.11

Base on my understanding of what I read, I did the following:

Step 1: sudo docker run --name my-guacd -d guacamole/guacd

Step 2: sudo docker run --name my-guacamole --link my-guacd:guacd -d -p 8080:8080 --restart unless-stopped guacamole/guacamole

Step 3: sudo docker run --name quacamole-mysql -e MYSQL_ROOT_PASSWORD=mypassword! -d --restart unless-stopped mysql:latest

Step 4: sudo docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql

Step 5:

sudo docker run --name my-guacamole \
    --link my-guacd:guacd \
    --link guacamole-mysql:mysql \
    -e MYSQL_HOSTNAME=192.168.1.11  \
    -e MYSQL_USER=guacamole_user \
    -e MYSQL_PASSWORD=mypassword \
    --restart unless-stopped \
    -d -p 8080:8080 guacamole/guacamole

However when looking at the logs I get
FATAL: No authentication configured
-------------------------------------------------------------------------------
The Guacamole Docker container needs at least one authentication mechanism in
order to function, such as a MySQL database, PostgreSQL database, SQLServer
database, LDAP directory or RADIUS server. Please specify at least the
MYSQL_DATABASE or POSTGRES_DATABASE or SQLSERVER_DATABASE environment variables,
or check Guacamole's Docker documentation regarding configuring LDAP and/or
custom extensions.

My Docker setup looks as follows:
[image.png]


I tried following the instructions set the database up but I think I may have got those confused.

Is there a simplified set of steps to help a NOOB get it up and running, after which I can start playing with the different settings?

Kind regards
Andre

Sent with Proton Mail<https://proton.me/> secure email.



Re: R: Quacamole docker install

Posted by "André R. Basel" <an...@basel.co.nz>.
Found a syntax error so when I fixed that I got

sysadmin@services:~$ sudo cat initdb.sql | sudo docker exec -i guacamole-mysql /usr/bin/mysql -u guacamole_user -p rjgtpormdsl837dejkl_kl@ -D guacamole_db
Enter password: ERROR 1045 (28000): Access denied for user 'guacamole_user'@'localhost' (using password: YES)
Will fix access and then try again

André Basel
027 640 2527

Sent with [Proton Mail](https://proton.me/) secure email.

------- Original Message -------
On Thursday, April 27th, 2023 at 20:00, André R. Basel <an...@basel.co.nz> wrote:

> Thanks Lorenzo
>
> I think I might be close now.
>
> I created Step 3B:
>
> Step 3b:
> CREATE USER 'guacamole_user'@'localhost' IDENTIFIED BY 'dbuserpwd';
> GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost';
> FLUSH PRIVILEGES
> sudo cat initdb.sql | sudo docker exec -i quacamole-mysql /usr/bin/mysql -u guacamole_user -p mypassword guacamole_db
>
> I ran the above but it did not work, instead a usage details showed eg
> sysadmin@services:~$ sudo cat initdb.sql | sudo docker exec -i guacamole-mysql /usr/bin/mysql -u guacamole_user -p rjgtpormdsl837dejkl_kl@ guacamole_db
> /usr/bin/mysql Ver 8.0.33 for Linux on x86_64 (MySQL Community Server - GPL)
> Copyright (c) 2000, 2023, Oracle and/or its affiliates.
>
> Oracle is a registered trademark of Oracle Corporation and/or its
> affiliates. Other names may be trademarks of their respective
> owners.
>
> Usage: /usr/bin/mysql [OPTIONS] [database]
> -?, --help Display this help and exit.
> -I, --help Synonym for -?
> --auto-rehash Enable automatic rehashing. One doesn't need to use
> 'rehash' to get table and field completion, but startup
> and reconnecting may take a longer time. Disable with
> --disable-auto-rehash.
> (Defaults to on; use --skip-auto-rehash to disable.)
> -A, --no-auto-rehash
> No automatic rehashing. One has to use 'rehash' to get
> table and field completion. This gives a quicker start of
> mysql and disables rehashing on reconnect.
> --auto-vertical-output
> Automatically switch to vertical output mode if the
> result is wider than the terminal width.
> -B, --batch Don't use history file. Disable interactive behavior.
> (Enables --silent.)
> --bind-address=name IP address to bind to.
> --binary-as-hex Print binary data as hex. Enabled by default for
> interactive terminals.
> And there was not tables in the database.
>
> Is that line meant to do the same as Step 4: sudo docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql or or something else, or should I be running this before 3B?
>
> Kind regards
>
> André Basel
> 027 640 2527
>
> Sent with [Proton Mail](https://proton.me/) secure email.
>
> ------- Original Message -------
> On Thursday, April 27th, 2023 at 19:23, MAURIZI Lorenzo <l....@comune.jesi.an.it> wrote:
>
>> Hello André,
>>
>> in step 4 you are creating on current directory a script to initialize the database, but you don’t mention if you run that script into your mysql instance, to create database structure.
>>
>> If not, you are trying to run Guacamole without a database set up.
>>
>> Moreover you are missing MYSQL_DATABASE variable in step 5 (see https://guacamole.apache.org/doc/gug/guacamole-docker.html#required-environment-variables)
>>
>> So i think you should:
>>
>> create a new database into the mysql container.
>>
>> For this I would use the mysql command from inside the container, to make it simple, so you should (please note I used your example values, so change them with the real values):
>>
>> docker exec –it quacamole-mysql /bin/bash
>>
>> then
>>
>> mysql –u root –pmypassword!
>>
>> Then in mysql prompt you should create the database
>>
>> Mysql>CREATE DATABASE guacamole_db;
>>
>> Mysql>GRANT ALL PRIVILEGES ON guacamole_db.* TO 'guacamole_user'@'%' IDENTIFIED BY ‘mypassword’;
>>
>> After that you can issue “exit” twice to go back to the container bash prompt and then to the server bash prompt outside the mysql container.
>>
>> Then you should import the “initdb.sql” script to create database structure:
>>
>> cat initdb.sql | docker exec -i quacamole-mysql /usr/bin/mysql -u guacamole_user -pmypassword guacamole_db
>>
>> At this point you should have a complete DB for guacamole.
>>
>> Then you should start youd guacamole container (step 5) adding this environment variable to the command line:
>>
>> -e MYSQL_DATABASE=guacamole_db
>>
>> I think you should not get the error now.
>>
>> I hope that I didn’t write anything wrong!
>>
>> Best regards.
>>
>> Lorenzo
>>
>> Da: André R. Basel <an...@basel.co.nz>
>> Inviato: giovedì 27 aprile 2023 07:26
>> A: user@guacamole.apache.org
>> Oggetto: Quacamole docker install
>>
>> Hi
>>
>> I have been working through the documentation to install Quacamole using docker.
>>
>> The IP of my docker server is 192.168.1.11
>>
>> Base on my understanding of what I read, I did the following:
>>
>> Step 1: sudo docker run --name my-guacd -d guacamole/guacd
>>
>> Step 2: sudo docker run --name my-guacamole --link my-guacd:guacd -d -p 8080:8080 --restart unless-stopped guacamole/guacamole
>>
>> Step 3: sudo docker run --name quacamole-mysql -e MYSQL_ROOT_PASSWORD=mypassword! -d --restart unless-stopped mysql:latest
>>
>> Step 4: sudo docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql
>>
>> Step 5:
>>
>> sudo docker run --name my-guacamole \
>>
>> --link my-guacd:guacd \
>>
>> --link guacamole-mysql:mysql \
>>
>> -e MYSQL_HOSTNAME=192.168.1.11 \
>>
>> -e MYSQL_USER=guacamole_user \
>>
>> -e MYSQL_PASSWORD=mypassword \
>>
>> --restart unless-stopped \
>>
>> -d -p 8080:8080 guacamole/guacamole
>>
>> However when looking at the logs I get
>>
>> FATAL: No authentication configured
>>
>> -------------------------------------------------------------------------------
>>
>> The Guacamole Docker container needs at least one authentication mechanism in
>>
>> order to function, such as a MySQL database, PostgreSQL database, SQLServer
>>
>> database, LDAP directory or RADIUS server. Please specify at least the
>>
>> MYSQL_DATABASE or POSTGRES_DATABASE or SQLSERVER_DATABASE environment variables,
>>
>> or check Guacamole's Docker documentation regarding configuring LDAP and/or
>>
>> custom extensions.
>>
>> My Docker setup looks as follows:
>>
>> [image.png]
>>
>> I tried following the instructions set the database up but I think I may have got those confused.
>>
>> Is there a simplified set of steps to help a NOOB get it up and running, after which I can start playing with the different settings?
>>
>> Kind regards
>>
>> Andre
>>
>> Sent with [Proton Mail](https://proton.me/) secure email.

R: R: Quacamole docker install

Posted by MAURIZI Lorenzo <l....@comune.jesi.an.it>.
@André,

I think you should not grant access only to localhost to the guacamole user because the connection between containers comes from a random IP created in the default docker network.
So I think you should put ‘%’ (any host) after @ when creating and granting privileges.

Then I think you should grant other privileges to the guacamole_user if you want it to be able to create tables in the guacamole database.

I don’t see where you create the “guacamole­_db” database, I don’t see any “CREATE DATABASE “ statement. The “initdb.sql” has no CREATE DATABASE statement into it, only CREATE TABLE statements (and some inserts to initialize the DB).

After that you should import the initdb.sql with the cat initdb.sql…. etc etc.

Regards.
Lorenzo


Da: André R. Basel <an...@basel.co.nz>
Inviato: giovedì 27 aprile 2023 10:01
A: user@guacamole.apache.org
Oggetto: Re: R: Quacamole docker install

Thanks Lorenzo

I think I might be close now.

I created Step 3B:

Step 3b:
CREATE USER 'guacamole_user'@'localhost' IDENTIFIED BY 'dbuserpwd';
GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost';
FLUSH PRIVILEGES

sudo cat initdb.sql | sudo docker exec -i quacamole-mysql /usr/bin/mysql -u guacamole_user -p mypassword guacamole_db

I ran the above but it did not work, instead a usage details showed eg
sysadmin@services:~$ sudo cat initdb.sql | sudo docker exec -i guacamole-mysql /usr/bin/mysql -u guacamole_user -p rjgtpormdsl837dejkl_kl@ guacamole_db
/usr/bin/mysql  Ver 8.0.33 for Linux on x86_64 (MySQL Community Server - GPL)
Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Usage: /usr/bin/mysql [OPTIONS] [database]
  -?, --help          Display this help and exit.
  -I, --help          Synonym for -?
  --auto-rehash       Enable automatic rehashing. One doesn't need to use
                      'rehash' to get table and field completion, but startup
                      and reconnecting may take a longer time. Disable with
                      --disable-auto-rehash.
                      (Defaults to on; use --skip-auto-rehash to disable.)
  -A, --no-auto-rehash
                      No automatic rehashing. One has to use 'rehash' to get
                      table and field completion. This gives a quicker start of
                      mysql and disables rehashing on reconnect.
  --auto-vertical-output
                      Automatically switch to vertical output mode if the
                      result is wider than the terminal width.
  -B, --batch         Don't use history file. Disable interactive behavior.
                      (Enables --silent.)
  --bind-address=name IP address to bind to.
  --binary-as-hex     Print binary data as hex. Enabled by default for
                      interactive terminals.

And there was not tables in the database.

Is that line meant to do the same as Step 4: sudo docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql or or something else, or should I be running this before 3B?

Kind regards


André Basel
027 640 2527

Sent with Proton Mail<https://proton.me/> secure email.

------- Original Message -------
On Thursday, April 27th, 2023 at 19:23, MAURIZI Lorenzo <l....@comune.jesi.an.it>> wrote:


Hello André,
in step 4 you are creating on current directory a script to initialize the database, but you don’t mention if you run that script into your mysql instance, to create database structure.
If not, you are trying to run Guacamole without a database set up.
Moreover you are missing MYSQL_DATABASE variable in step 5 (see https://guacamole.apache.org/doc/gug/guacamole-docker.html#required-environment-variables)

So i think you should:
create a new database into the mysql container.
For this I would use the mysql command from inside the container, to make it simple, so you should (please note I used your example values, so change them with the real values):
docker exec –it quacamole-mysql /bin/bash
then
mysql –u root –pmypassword!
Then in mysql prompt you should create the database
Mysql>CREATE DATABASE guacamole_db;
Mysql>GRANT ALL PRIVILEGES ON guacamole_db.* TO 'guacamole_user'@'%' IDENTIFIED BY ‘mypassword’;

After that you can issue “exit” twice to go back to the container bash prompt and then to the server bash prompt outside the mysql container.

Then you should import the “initdb.sql” script to create database structure:
cat initdb.sql | docker exec -i quacamole-mysql /usr/bin/mysql -u guacamole_user -pmypassword guacamole_db

At this point you should have a complete DB for guacamole.
Then you should start youd guacamole container (step 5) adding this environment variable to the command line:

-e MYSQL_DATABASE=guacamole_db

I think you should not get the error now.

I hope that I didn’t write anything wrong!
Best regards.
Lorenzo

Da: André R. Basel <an...@basel.co.nz>>
Inviato: giovedì 27 aprile 2023 07:26
A: user@guacamole.apache.org<ma...@guacamole.apache.org>
Oggetto: Quacamole docker install

Hi

I have been working through the documentation to install Quacamole using docker.

The IP of my docker server is 192.168.1.11

Base on my understanding of what I read, I did the following:

Step 1: sudo docker run --name my-guacd -d guacamole/guacd

Step 2: sudo docker run --name my-guacamole --link my-guacd:guacd -d -p 8080:8080 --restart unless-stopped guacamole/guacamole

Step 3: sudo docker run --name quacamole-mysql -e MYSQL_ROOT_PASSWORD=mypassword! -d --restart unless-stopped mysql:latest

Step 4: sudo docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql

Step 5:

sudo docker run --name my-guacamole \
    --link my-guacd:guacd \
    --link guacamole-mysql:mysql \
    -e MYSQL_HOSTNAME=192.168.1.11  \
    -e MYSQL_USER=guacamole_user \
    -e MYSQL_PASSWORD=mypassword \
    --restart unless-stopped \
    -d -p 8080:8080 guacamole/guacamole

However when looking at the logs I get
FATAL: No authentication configured
-------------------------------------------------------------------------------
The Guacamole Docker container needs at least one authentication mechanism in
order to function, such as a MySQL database, PostgreSQL database, SQLServer
database, LDAP directory or RADIUS server. Please specify at least the
MYSQL_DATABASE or POSTGRES_DATABASE or SQLSERVER_DATABASE environment variables,
or check Guacamole's Docker documentation regarding configuring LDAP and/or
custom extensions.

My Docker setup looks as follows:
[image.png]


I tried following the instructions set the database up but I think I may have got those confused.

Is there a simplified set of steps to help a NOOB get it up and running, after which I can start playing with the different settings?

Kind regards
Andre

Sent with Proton Mail<https://proton.me/> secure email.


Re: R: Quacamole docker install

Posted by "André R. Basel" <an...@basel.co.nz>.
Thanks Lorenzo

I think I might be close now.

I created Step 3B:

Step 3b:
CREATE USER 'guacamole_user'@'localhost' IDENTIFIED BY 'dbuserpwd';
GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost';
FLUSH PRIVILEGES
sudo cat initdb.sql | sudo docker exec -i quacamole-mysql /usr/bin/mysql -u guacamole_user -p mypassword guacamole_db

I ran the above but it did not work, instead a usage details showed eg
sysadmin@services:~$ sudo cat initdb.sql | sudo docker exec -i guacamole-mysql /usr/bin/mysql -u guacamole_user -p rjgtpormdsl837dejkl_kl@ guacamole_db
/usr/bin/mysql Ver 8.0.33 for Linux on x86_64 (MySQL Community Server - GPL)
Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Usage: /usr/bin/mysql [OPTIONS] [database]
-?, --help Display this help and exit.
-I, --help Synonym for -?
--auto-rehash Enable automatic rehashing. One doesn't need to use
'rehash' to get table and field completion, but startup
and reconnecting may take a longer time. Disable with
--disable-auto-rehash.
(Defaults to on; use --skip-auto-rehash to disable.)
-A, --no-auto-rehash
No automatic rehashing. One has to use 'rehash' to get
table and field completion. This gives a quicker start of
mysql and disables rehashing on reconnect.
--auto-vertical-output
Automatically switch to vertical output mode if the
result is wider than the terminal width.
-B, --batch Don't use history file. Disable interactive behavior.
(Enables --silent.)
--bind-address=name IP address to bind to.
--binary-as-hex Print binary data as hex. Enabled by default for
interactive terminals.
And there was not tables in the database.

Is that line meant to do the same as Step 4: sudo docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql or or something else, or should I be running this before 3B?

Kind regards

André Basel
027 640 2527

Sent with [Proton Mail](https://proton.me/) secure email.

------- Original Message -------
On Thursday, April 27th, 2023 at 19:23, MAURIZI Lorenzo <l....@comune.jesi.an.it> wrote:

> Hello André,
>
> in step 4 you are creating on current directory a script to initialize the database, but you don’t mention if you run that script into your mysql instance, to create database structure.
>
> If not, you are trying to run Guacamole without a database set up.
>
> Moreover you are missing MYSQL_DATABASE variable in step 5 (see https://guacamole.apache.org/doc/gug/guacamole-docker.html#required-environment-variables)
>
> So i think you should:
>
> create a new database into the mysql container.
>
> For this I would use the mysql command from inside the container, to make it simple, so you should (please note I used your example values, so change them with the real values):
>
> docker exec –it quacamole-mysql /bin/bash
>
> then
>
> mysql –u root –pmypassword!
>
> Then in mysql prompt you should create the database
>
> Mysql>CREATE DATABASE guacamole_db;
>
> Mysql>GRANT ALL PRIVILEGES ON guacamole_db.* TO 'guacamole_user'@'%' IDENTIFIED BY ‘mypassword’;
>
> After that you can issue “exit” twice to go back to the container bash prompt and then to the server bash prompt outside the mysql container.
>
> Then you should import the “initdb.sql” script to create database structure:
>
> cat initdb.sql | docker exec -i quacamole-mysql /usr/bin/mysql -u guacamole_user -pmypassword guacamole_db
>
> At this point you should have a complete DB for guacamole.
>
> Then you should start youd guacamole container (step 5) adding this environment variable to the command line:
>
> -e MYSQL_DATABASE=guacamole_db
>
> I think you should not get the error now.
>
> I hope that I didn’t write anything wrong!
>
> Best regards.
>
> Lorenzo
>
> Da: André R. Basel <an...@basel.co.nz>
> Inviato: giovedì 27 aprile 2023 07:26
> A: user@guacamole.apache.org
> Oggetto: Quacamole docker install
>
> Hi
>
> I have been working through the documentation to install Quacamole using docker.
>
> The IP of my docker server is 192.168.1.11
>
> Base on my understanding of what I read, I did the following:
>
> Step 1: sudo docker run --name my-guacd -d guacamole/guacd
>
> Step 2: sudo docker run --name my-guacamole --link my-guacd:guacd -d -p 8080:8080 --restart unless-stopped guacamole/guacamole
>
> Step 3: sudo docker run --name quacamole-mysql -e MYSQL_ROOT_PASSWORD=mypassword! -d --restart unless-stopped mysql:latest
>
> Step 4: sudo docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql
>
> Step 5:
>
> sudo docker run --name my-guacamole \
>
> --link my-guacd:guacd \
>
> --link guacamole-mysql:mysql \
>
> -e MYSQL_HOSTNAME=192.168.1.11 \
>
> -e MYSQL_USER=guacamole_user \
>
> -e MYSQL_PASSWORD=mypassword \
>
> --restart unless-stopped \
>
> -d -p 8080:8080 guacamole/guacamole
>
> However when looking at the logs I get
>
> FATAL: No authentication configured
>
> -------------------------------------------------------------------------------
>
> The Guacamole Docker container needs at least one authentication mechanism in
>
> order to function, such as a MySQL database, PostgreSQL database, SQLServer
>
> database, LDAP directory or RADIUS server. Please specify at least the
>
> MYSQL_DATABASE or POSTGRES_DATABASE or SQLSERVER_DATABASE environment variables,
>
> or check Guacamole's Docker documentation regarding configuring LDAP and/or
>
> custom extensions.
>
> My Docker setup looks as follows:
>
> [image.png]
>
> I tried following the instructions set the database up but I think I may have got those confused.
>
> Is there a simplified set of steps to help a NOOB get it up and running, after which I can start playing with the different settings?
>
> Kind regards
>
> Andre
>
> Sent with [Proton Mail](https://proton.me/) secure email.

R: Quacamole docker install

Posted by MAURIZI Lorenzo <l....@comune.jesi.an.it>.
Hello André,
in step 4 you are creating on current directory a script to initialize the database, but you don’t mention if you run that script into your mysql instance, to create database structure.
If not, you are trying to run Guacamole without a database set up.
Moreover you are missing MYSQL_DATABASE variable in step 5 (see https://guacamole.apache.org/doc/gug/guacamole-docker.html#required-environment-variables)

So i think you should:
create a new database into the mysql container.
For this I would use the mysql command from inside the container, to make it simple, so you should (please note I used your example values, so change them with the real values):
docker exec –it quacamole-mysql /bin/bash
then
mysql –u root –pmypassword!
Then in mysql prompt you should create the database
Mysql>CREATE DATABASE guacamole_db;
Mysql>GRANT ALL PRIVILEGES ON guacamole_db.* TO 'guacamole_user'@'%' IDENTIFIED BY ‘mypassword’;

After that you can issue “exit” twice to go back to the container bash prompt and then to the server bash prompt outside the mysql container.

Then you should import the “initdb.sql” script to create database structure:
cat initdb.sql | docker exec -i quacamole-mysql /usr/bin/mysql -u guacamole_user -pmypassword guacamole_db

At this point you should have a complete DB for guacamole.
Then you should start youd guacamole container (step 5) adding this environment variable to the command line:

-e MYSQL_DATABASE=guacamole_db

I think you should not get the error now.

I hope that I didn’t write anything wrong!
Best regards.
Lorenzo

Da: André R. Basel <an...@basel.co.nz>
Inviato: giovedì 27 aprile 2023 07:26
A: user@guacamole.apache.org
Oggetto: Quacamole docker install

Hi

I have been working through the documentation to install Quacamole using docker.

The IP of my docker server is 192.168.1.11

Base on my understanding of what I read, I did the following:

Step 1: sudo docker run --name my-guacd -d guacamole/guacd

Step 2: sudo docker run --name my-guacamole --link my-guacd:guacd -d -p 8080:8080 --restart unless-stopped guacamole/guacamole

Step 3: sudo docker run --name quacamole-mysql -e MYSQL_ROOT_PASSWORD=mypassword! -d --restart unless-stopped mysql:latest

Step 4: sudo docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql

Step 5:

sudo docker run --name my-guacamole \
    --link my-guacd:guacd \
    --link guacamole-mysql:mysql \
    -e MYSQL_HOSTNAME=192.168.1.11  \
    -e MYSQL_USER=guacamole_user \
    -e MYSQL_PASSWORD=mypassword \
    --restart unless-stopped \
    -d -p 8080:8080 guacamole/guacamole

However when looking at the logs I get
FATAL: No authentication configured
-------------------------------------------------------------------------------
The Guacamole Docker container needs at least one authentication mechanism in
order to function, such as a MySQL database, PostgreSQL database, SQLServer
database, LDAP directory or RADIUS server. Please specify at least the
MYSQL_DATABASE or POSTGRES_DATABASE or SQLSERVER_DATABASE environment variables,
or check Guacamole's Docker documentation regarding configuring LDAP and/or
custom extensions.

My Docker setup looks as follows:
[image.png]


I tried following the instructions set the database up but I think I may have got those confused.

Is there a simplified set of steps to help a NOOB get it up and running, after which I can start playing with the different settings?

Kind regards
Andre

Sent with Proton Mail<https://proton.me/> secure email.

RE: Quacamole docker install

Posted by Philippe CAMELIO <ph...@ocapiat.fr>.
Hello André

I have done a small  docker-compose which embed the init part.
It runs on a swarm stack but you can run a single docker node easily.
It is bind to Active Directory for authentification and allowed users need to be member of AD Group GUACAMOLE-INSTANCE
Nested group is supported.

Kind regards
Philippe


Dr. Philippe CAMELIO
IT Infrastructure Manager & CISO
OCAPIAT
5 rue Guillaume VII le Troubadour
86000 POITIERS
www.ocapiat.fr<http://www.ocapiat.fr/>
tél : +33(0) 170 383 845 / +33 (0) 632 301 909


============================================================
version: "3.8"
services:

  init-guacamole-db:
    image: guacamole/guacamole:1.5.0
    command: ["/bin/sh", "-c", "test -e /init/initdb.sql && echo 'init file already exists' || /opt/guacamole/bin/initdb.sh --postgres > /init/initdb.sql" ]
    user: root
    volumes:
      - dbinit:/init
    deploy:
      restart_policy:
        condition: on-failure
      placement:
        constraints: [node.role == manager]

  postgres:
    image: postgres:13
    environment:
      PGDATA: /var/lib/postgresql/data/guacamole
      POSTGRES_PASSWORD: changeme
      POSTGRES_USER: guacamole_user
    restart: unless-stopped
    volumes:
      - dbinit:/docker-entrypoint-initdb.d
      - dbdata:/var/lib/postgresql/data/guacamole
    deploy:
      placement:
        constraints: [node.role == manager]
    depends_on:
      - init-guacamole-db

  guacd:
    image: guacamole/guacd:1.5.0
    restart: unless-stopped

  guac:
    image: guacamole/guacamole:1.5.0

    environment:
      POSTGRE_VERSION: 13
      GUACAMOLE_VERSION: 1.5.0
      EXTENSION_PRIORITY: ldap, postgresql
      GUACD_HOSTNAME: guacd
      WEBAPP_CONTEXT: ROOT
      POSTGRES_HOSTNAME: postgres
      POSTGRES_DATABASE: guacamole_user
      POSTGRES_PASSWORD: changeme
      POSTGRES_USER: guacamole_user
      PROXY_ALLOWED_IPS_REGEX: 10.*
      PROXY_IP_HEADER: x-forwarded-for
      PROXY_PROTOCOL_HEADER: x-forwarded-proto
      PROXY_BY_HEADER: x-forwarded-by
      REMOTE_IP_VALVE_ENABLED: "true"
      LDAP_HOSTNAME: activedirectory.local.lan
      LDAP_PORT: 389
      LDAP_ENCRYPTION_METHOD: none
      LDAP_SEARCH_BIND_DN: CN=bind-guacamole,OU=SomeOU,DC=local,DC=lan
      LDAP_SEARCH_BIND_PASSWORD: changemealso
#      LDAP_DEREFRENCE_ALIASES: always
      LDAP_MAX_SEARCH_RESULTS: 1000
      LDAP_USER_BASE_DN: DC=local,DC=lan
      LDAP_USERNAME_ATTRIBUTE: userPrincipalName,cn, givenName, sn, mobile, mail
      LDAP_MEMBER_ATTRIBUTE: member
      LDAP_USER_SEARCH_FILTER:  (&(objectclass=user)(memberOf:1.2.840.113556.1.4.1941:=CN=GUACAMOLE-INSTANCE,OU=Guacamole,OU=Groups,DC=local,DC=lan))
#      LDAP_GROUP_BASE_DN:
#      LDAP_GROUP_SEARCH_FILTER:
#      LDAP_GROUP_NAME_ATTRIBUTE:
#      LDAP_CONFIG_BASE_DN:
      POSTGRESQL_AUTO_CREATE_ACCOUNTS: "true"

    ports:
      - "8080:8080"
    depends_on:
      - postgres
      - guacd

volumes:
  dbinit:
    driver: local
  dbdata:
    driver: local


De : André R. Basel <an...@basel.co.nz>
Envoyé : jeudi 27 avril 2023 07:26
À : user@guacamole.apache.org
Objet : Quacamole docker install

Hi

I have been working through the documentation to install Quacamole using docker.

The IP of my docker server is 192.168.1.11

Base on my understanding of what I read, I did the following:

Step 1: sudo docker run --name my-guacd -d guacamole/guacd

Step 2: sudo docker run --name my-guacamole --link my-guacd:guacd -d -p 8080:8080 --restart unless-stopped guacamole/guacamole

Step 3: sudo docker run --name quacamole-mysql -e MYSQL_ROOT_PASSWORD=mypassword! -d --restart unless-stopped mysql:latest

Step 4: sudo docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > initdb.sql

Step 5:

sudo docker run --name my-guacamole \
    --link my-guacd:guacd \
    --link guacamole-mysql:mysql \
    -e MYSQL_HOSTNAME=192.168.1.11  \
    -e MYSQL_USER=guacamole_user \
    -e MYSQL_PASSWORD=mypassword \
    --restart unless-stopped \
    -d -p 8080:8080 guacamole/guacamole

However when looking at the logs I get
FATAL: No authentication configured
-------------------------------------------------------------------------------
The Guacamole Docker container needs at least one authentication mechanism in
order to function, such as a MySQL database, PostgreSQL database, SQLServer
database, LDAP directory or RADIUS server. Please specify at least the
MYSQL_DATABASE or POSTGRES_DATABASE or SQLSERVER_DATABASE environment variables,
or check Guacamole's Docker documentation regarding configuring LDAP and/or
custom extensions.

My Docker setup looks as follows:
[image.png]


I tried following the instructions set the database up but I think I may have got those confused.

Is there a simplified set of steps to help a NOOB get it up and running, after which I can start playing with the different settings?

Kind regards
Andre

Sent with Proton Mail<https://proton.me/> secure email.

Si vous recevez ce mail en dehors de vos heures de travail ou pendant vos congés, vous n'avez pas à y répondre immédiatement.

Dans le cadre de la préservation de l’environnement, n'imprimez ce message qu’en cas de nécessité.