Installing Apache Guacamole on Ubuntu 24.04: Secure Remote Desktop Gateway

This guide intends to provide comprehensive steps for Installing Apache Guacamole on Ubuntu 24.04. Guacamole is an open-source remote desktop gateway. It allows you to access your computer and server through a web browser remotely. If you are looking for a complete guide for Installing Apache Guacamole on Ubuntu 24.04, here is the right place you are on the Orcacore website.

A Comprehensive Guide For Installing Apache Guacamole on Ubuntu 24.04

For Installing Apache Guacamole on Ubuntu 24.04, you must have access to your Ubuntu system as a non-root user with sudo privileges. If you want to know how to create a sudo user, you can check this guide on Create a Sudo User on Ubuntu 24.04 From Terminal.

Now follow the steps below to start Guacamole installation on the latest stable version of Ubuntu which is Ubuntu 24.04.

1. Install Requirements for Guacamole on Ubuntu 24.04

First, run the system update with the command below:

sudo apt update

Then, you must install the following packages and dependencies for installing Apache Guacamole on Ubuntu 24.04:

sudo apt install build-essential libcairo2-dev libjpeg-turbo8-dev \
    libpng-dev libtool-bin libossp-uuid-dev libvncserver-dev \
    freerdp2-dev libssh2-1-dev libtelnet-dev libwebsockets-dev \
    libpulse-dev libvorbis-dev libwebp-dev libssl-dev \
    libpango1.0-dev libswscale-dev libavcodec-dev libavutil-dev \
    libavformat-dev -y

2. Download Apache Guacamole Source Code and Install It on Ubuntu 24.04

Now you must visit the Apache Guacamole Downloads page and look for the latest version. At the current time, the latest version of Guacamole is 1.5.5. So you can use the following Wget Command to download the source code of Guacamole on Ubuntu 24.04:

sudo wget https://downloads.apache.org/guacamole/1.5.5/source/guacamole-server-1.5.5.tar.gz
Downloading and Installing Apache Guacamole on Ubuntu 24.04
Installing Apache Guacamole on Ubuntu 24.04 – Download Source Code

Then, extract your Guacamole package and navigate to it with the following commands:

sudo tar -xvf guacamole-server-1.5.5.tar.gz

sudo cd guacamole-server-1.5.5

Build and Install Apache Guacamole

At this point, you start building and installing Apache Guacamole on Ubuntu 24.04 with the following commands:

sudo ./configure --with-init-dir=/etc/init.d --enable-allow-freerdp-snapshots
sudo make
sudo make install

The installation process may take some time to complete. After that, you need to update the installed library cache with the following command:

sudo ldconfig

Enable and Start Guacamole Service

Now you must reload your systemd to apply the changes:

sudo systemctl daemon-reload

Next, use the following commands to enable and start the Guacamole service on Ubuntu 24.04:

sudo systemctl enable guacd
sudo systemctl start guacd

Then, verify your Guacamole service is active and running on Ubuntu 24.04:

sudo systemctl status guacd
Check Guacamole Service is active on Ubuntu 24.04
Installing Apache Guacamole on Ubuntu 24.04 – Guacd Status

Important Note: You must create the Guacamole configuration files and extensions. These files will used in the later steps. To do this, you can run the command below:

sudo mkdir -p /etc/guacamole/{extensions,lib}

3. Download and Install Guacamole Frontend Interface on Ubuntu 24.04 (Guacamole Web App)

At this step, you must download and install the Apache Guacamole Web Application. For this purpose, you must install Tomcat. At the current time, Apache Guacamole is compatible with Tomcat 9. Because Tomcat 9 is not available in Ubuntu 24.04, we added the Ubuntu 22.04 repository and then install Tomcat 9 with the commands below:

sudo add-apt-repository -y -s "deb http://archive.ubuntu.com/ubuntu/ jammy main universe"

sudo apt install tomcat9 tomcat9-admin tomcat9-common tomcat9-user -y

Next, use the following command to download the Gucamole web app source code. Just remember that the version of the web app must be the same as the Guacamole version.

sudo wget https://downloads.apache.org/guacamole/1.5.5/binary/guacamole-1.5.5.war
Download and Install Guacamole Frontend Interface on Ubuntu 24.04

Then, you must move the Guacamole Web client to the Tomcat directory with the command below:

sudo mv guacamole-1.5.5.war /var/lib/tomcat9/webapps/guacamole.war

To apply the changes, restart Apache Guacamole and Tomcat services on Ubuntu 24.04:

sudo systemctl restart tomcat9 guacd

4. Set up Guacamole Database Authentication on Ubuntu 24.04

In this step of installing Apache Guacamole on Ubuntu 24.04, you must configure Guacamole database authentication. By default, Guacamole supports basic user authentication that is used for testing. However, we want to use a production-ready database authentication through MariaDB. To do this, follow the steps below:

First, install MariaDB with the following command:

sudo apt install mariadb-server -y

Then, run the MySQL security script to set a password for your MariaDB:

sudo mysql_secure_installation
Set Root password for MySQL Guacamole

Download MySQL Java Connector for Apache Guacamole

Next, you must download the MySQL Java Connector. At the current time, the latest MySQL Java connector is Connector/J 9.1.0. To download the package, run the command below:

sudo wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-j-9.1.0.tar.gz
Download MySQL Java Connector for Apache Guacamole

Now extract your downloaded file and copy it to the /etc/guacamole/lib/ directory with the following commands:

sudo tar -xf mysql-connector-j-9.1.0.tar.gz

sudo cp mysql-connector-j-9.1.0/mysql-connector-j-9.1.0.jar /etc/guacamole/lib/

Download Apache Guacamole JDBC AUTH Plugin

At this point, you must download the Apache Guacamole JDBC AUTH Plugin. Just remember that the version you will download same as the version of the Guacamole.

sudo wget https://downloads.apache.org/guacamole/1.5.5/binary/guacamole-auth-jdbc-1.5.5.tar.gz
Download Apache Guacamole JDBC AUTH Plugin

Then, extract your downloaded file and copy it to /etc/guacamole/extensions/ directory with the commands below:

sudo tar -xf guacamole-auth-jdbc-1.5.5.tar.gz

sudo mv guacamole-auth-jdbc-1.5.5/mysql/guacamole-auth-jdbc-mysql-1.5.5.jar /etc/guacamole/extensions/

Create Apache Guacamole Database and User

In this step of installing Apache Guacamole on Ubuntu 24.04, you must create a user and database. To do this, log in to your MariaDB shell:

sudo mysql -u root -p

Enter the password you have configured for it. From your MariaDB shell, run the following commands to create a database, user database, and grant the privileges to it:

MariaDB [(none)]> CREATE DATABASE guac_db;
MariaDB [(none)]> CREATE USER 'guac_user'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]> GRANT SELECT,INSERT,UPDATE,DELETE ON guac_db.* TO 'guac_user'@'localhost';
MariaDB [(none)]> FLUSH PRIVILEGES;

When you are finished, exit from your MariaDB shell:

MariaDB [(none)]> EXIT;
Create Apache Guacamole Database and User

Import SQL Schema Files For Guacamole

At this point, you must navigate to the MySQL Schema directory with the command below:

cd guacamole-auth-jdbc-1.5.5/mysql/schema

From there, run the command below to import the SQL schema files to the MySQL database:

cat *.sql | mysql -u root -p guac_db

Enter your MariaDB root password to complete the process.

Create Properties Files For Apache Guacamole

Now use your desired text editor like Vi Editor or Nano Editor to create the properties files for Guacamole:

sudo vi /etc/guacamole/guacamole.properties

Add the following configuration settings to the file with your database credentials:

# MySQL properties
mysql-hostname: 127.0.0.1
mysql-port: 3306
mysql-database: guac_db
mysql-username: guac_user
mysql-password: password

Once you are done, save and close the file.

Create Properties Files For Apache Guacamole

Finally, restart the services to apply the changes:

sudo systemctl restart tomcat9 guacd mysql

5. Access Apache Guacamole Dashboard via Web Interface

Now that you are finished with installing Apache Guacamole on Ubuntu 24.04, you can access the Guacamole dashboard by following the URL below from your Web browser:

http://server-ip:8080/guacamole

You must see the Guacamole login screen. Enter the following credentials to log in:

username: guacadmin
password: guacadmin
Guacamole Login Screen Ubuntu 24

Change Guacamole Admin Password

At this point, you must change your GuacAdmin password for more security and delete the default credentials. To do this, from the guacadmin profile click on Settings.

Guacadmin settings

Then, switch to the Users tab and click on New User.

create new user for Guacamole

Under the Edit User section, enter your new username and password. Then, under the Permissions section check the all boxes. When you are done, click Save.

Guacamole New user settings

Now log out from the default user and log in back to Apache Guacamole with your new user created. Then, navigate to the settings, and users tab, and delete the guacadmin user.

That’s it, you are done with installing Apache Guacamole on Ubuntu 24.04. From there, you can securely access your servers and computers.

Summing Up

As you saw, you can use the step-by-step guide provided by the Orcacore team for installing Apache Guacamole on Ubuntu 24.04. With Guacamole you can securely and easily access your servers and computers via the web interface.

Hope you enjoy using it. Also, you may like to read the following articles:

FAQs

What is Apache Guacamole?

As described on the official website, Apache Guacamole is a clientless remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH.

What is Apache guacamole used for?

With Guacamole you can securely and easily access your servers and computers via the web interface.

How to access the Guacamole Login Screen?

As you saw in the guide steps for installing Apache Guacamole on Ubuntu 24.04, you can easily access the login screen with the following URL:
http://server-ip:8080/guacamole

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!