Skip to main content

Install Apache Guacamole on Ubuntu 22.04

 

Install Apache Guacamole on Ubuntu 22.04

Apache Guacamole Installation Guide

Remote Desktop Gateway for Ubuntu 22.04

Ubuntu 22.04 Remote Desktop

What is Apache Guacamole?

Apache Guacamole is a clientless remote desktop gateway that supports standard protocols like VNC, RDP, and SSH. Thanks to HTML5, once Guacamole is installed on a server, all you need to access your desktops is a web browser.

Clientless

No plugins or client software needed

Secure

Supports SSL/TLS encryption

Multi-protocol

RDP, VNC, SSH all in one place

Prerequisites

  • Ubuntu 22.04 server with root or sudo privileges
  • At least 2GB RAM (4GB recommended for production)
  • Minimum 10GB disk space
  • Domain name pointing to your server (recommended)

Installation Steps

1

Update System Packages

Before installing any new software, it's good practice to update your system packages.

sudo apt update && sudo apt upgrade -y
2

Install Dependencies

Guacamole requires several dependencies including Java, Tomcat, and others.

sudo apt install -y make gcc g++ libcairo2-dev libjpeg-turbo8-dev libpng-dev \
libtool-bin libossp-uuid-dev libavcodec-dev libavformat-dev libavutil-dev \
libswscale-dev freerdp2-dev libpango1.0-dev libssh2-1-dev libtelnet-dev \
libvncserver-dev libwebsockets-dev libpulse-dev libssl-dev libvorbis-dev \
libwebp-dev tomcat9 tomcat9-admin tomcat9-user

Note: This installs a large number of packages required for Guacamole's various features.

3

Install Guacamole Server

Download and compile the Guacamole server from source.

wget https://downloads.apache.org/guacamole/1.5.0/source/guacamole-server-1.5.0.tar.gz
tar -xzf guacamole-server-1.5.0.tar.gz
cd guacamole-server-1.5.0
./configure --with-init-dir=/etc/init.d
make
sudo make install
sudo ldconfig

Warning: The compilation process may take several minutes depending on your server's resources.

4

Install Guacamole Client

Download and install the Guacamole web application.

sudo mkdir -p /etc/guacamole/{extensions,lib}
wget https://downloads.apache.org/guacamole/1.5.0/binary/guacamole-1.5.0.war
sudo mv guacamole-1.5.0.war /var/lib/tomcat9/webapps/guacamole.war
sudo systemctl restart tomcat9
5

Configure Guacamole

Create configuration files for Guacamole.

sudo nano /etc/guacamole/guacamole.properties

Add the following content:

# Hostname and port of guacamole proxy
guacd-hostname: localhost
guacd-port: 4822

# MySQL properties
mysql-hostname: localhost
mysql-port: 3306
mysql-database: guacamole_db
mysql-username: guacamole_user
mysql-password: your_password_here
sudo nano /etc/tomcat9/Catalina/localhost/guacamole.xml

Add the following content:

<Context path="/guacamole" docBase="/var/lib/tomcat9/webapps/guacamole.war">
  <Parameter name="guacamole-home" value="/etc/guacamole"/>
</Context>
6

Install and Configure MySQL

Guacamole requires a database for authentication and storing connections.

sudo apt install -y mysql-server

Secure MySQL installation:

sudo mysql_secure_installation

Create database and user:

sudo mysql -u root -p
CREATE DATABASE guacamole_db;
CREATE USER 'guacamole_user'@'localhost' IDENTIFIED BY 'your_password_here';
GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost';
FLUSH PRIVILEGES;
exit

Import the schema:

wget https://downloads.apache.org/guacamole/1.5.0/binary/guacamole-auth-jdbc-1.5.0.tar.gz
tar -xzf guacamole-auth-jdbc-1.5.0.tar.gz
sudo cp guacamole-auth-jdbc-1.5.0/mysql/guacamole-auth-jdbc-mysql-1.5.0.jar /etc/guacamole/extensions/
cat guacamole-auth-jdbc-1.5.0/mysql/schema/*.sql | sudo mysql -u root -p guacamole_db
7

Start Services

Start and enable the Guacamole and related services.

sudo systemctl start guacd
sudo systemctl enable guacd
sudo systemctl restart tomcat9
sudo systemctl restart mysql
8

Access Guacamole Web Interface

Guacamole should now be accessible via your web browser.

Default Login:

Username: guacadmin

Password: guacadmin

Change this password immediately after first login!

http://your_server_ip:8080/guacamole

Post-Installation Security

Change Default Credentials

Immediately change the default guacadmin password after first login.

Setup SSL/TLS

Configure Nginx or Apache as a reverse proxy with Let's Encrypt SSL certificate.

Create Additional Users

Create individual user accounts instead of sharing the admin account.

Troubleshooting

Guacamole not loading

Check Tomcat logs: sudo tail -f /var/log/tomcat9/catalina.out

Connection issues

Verify guacd is running: sudo systemctl status guacd

Database errors

Check MySQL logs: sudo tail -f /var/log/mysql/error.log

Comments

Popular posts from this blog

temp-1

  🔧 vast_id Configuration Key: vast_id Description This section defines the VAST ID , a unique numeric identifier used by internal systems for asset tracking, automation, or integration with enterprise management platforms. It helps associate the server with inventory records, monitoring tools, or deployment workflows. ✅ Used during provisioning to register the system in centralized databases or orchestration systems. JSON Format json 1 "vast_id" : 12194 ✅ Can also be provided as a string: json 1 "vast_id" : "12194" Field Reference vast_id String or Integer Unique identifier for the system in VAST (Verizon Asset Systems Tracker) 12194 ✅ Must be non-empty and numeric — leading zeros may be stripped depending on system. Validations Enforced vast_id  is required and must be a non-empty string or integer Ensures the field is present and contains usable data If  vast_id  is a string, it must not be blank or whitespace-only Prevents " " , "...

temp

 {   "_id": {     "$oid": "6841e4b0fd270b2ab92d7eaa"   },   // 📌 [Auto-generated]   // Description: Unique system identifier for internal use (MongoDB ObjectId).   // Type: ObjectId (string)   // Required: No (automatically handled)   "vast_id": "21452",   // 📌 [Required]   // Description: Your unique request ID or reference number.   // Type: string   // Format: Numeric string (e.g., "21452")   // Example: "21452"   "env": "dev",   // 📌 [Required]   // Description: The environment where the VM will be deployed.   // Type: string   // Allowed values: "dev", "qa", "uat", "prod"   // Example: "dev" for development, "prod" for production   "ver": "0.2",   // 📌 [Do Not Modify]   // Description: Template version. Used by automation to ensure compatibility.   // Type: string   // Format: Semantic versioning (e.g., "...

testing

09052025 T-1 { "volume_groups" : { "vgroot" : { "vgsize" : "304G" , "fs_type" : "xfs" } } , "logical_volumes" : { "root" : { "lvroot" : { "vgname" : "vgroot" , "lvname" : "lvroot" , "lvsize" : "12G" , "mountpoint" : "/" , "purpose" : "root filesystem" , "disk" : 1 , "partition" : 2 } } , "swap" : { "lvswap" : { "vgname" : "vgroot" , "lvname" : "lvswap" , "lvsize" : "4G" , "mountpoint" : "NA" , "purpose" : "swap" , "disk" : 1 , "partit...