Menu

How to install and configure Apache Guacamole ?

1. Prerequisites

2. Install Dependencies

Ubuntu 20.04

sudo apt update

sudo apt install -y build-essential libcairo2-dev libjpeg-turbo8-dev \


libpng-dev libossp-uuid-dev libavcodec-dev libavformat-dev libavutil-dev \


libswscale-dev freerdp2-dev libpango1.0-dev libssh2-1-dev libtelnet-dev \


libvncserver-dev libpulse-dev libssl-dev libvorbis-dev libwebp-dev \


mysql-client mysql-server tomcat9 tomcat9-admin tomcat9-common \


nginx openjdk-11-jdk

CentOS 8

sudo dnf groupinstall -y "Development Tools"

sudo dnf install -y cairo-devel libjpeg-turbo-devel libpng-devel \


libuuid-devel ffmpeg-devel freerdp-devel pango-devel libssh2-devel \


libtelnet-devel libvncserver-devel pulseaudio-libs-devel openssl-devel \


libvorbis-devel libwebp-devel mysql mariadb-server mariadb \


tomcat tomcat-admin-webapps tomcat-webapps java-11-openjdk-devel nginx

3. Build and Install guacd (the Guacamole proxy daemon)

wget https://apache.org/dyn/closer.cgi?action=download&filename=guacamole/1.5.3/source/guacamole-server-1.5.3.tar.gz -O guacd.tar.gz
tar -xzf guacd.tar.gz


cd guacamole-server-1.5.3

mkdir build && cd build


cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_MYSQL=on

make

sudo make install


sudo ldconfig

sudo systemctl enable guacd


sudo systemctl start guacd

4. Install the Guacamole Web Application

# 1. Download the .war file

wget https://apache.org/dyn/closer.cgi?action=download&filename=guacamole/1.5.3/binary/guacamole-1.5.3.war -O guacamole.war

# 2. Deploy to Tomcat


sudo mv guacamole.war /var/lib/tomcat9/webapps/ # Ubuntu


# or


sudo mv guacamole.war /usr/share/tomcat/webapps/ # CentOS

# 3. Create extension directory


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

5. Configure the Database

# Log in to MySQL/MariaDB

sudo mysql -u root

# Create database and user


CREATE DATABASE guacamole_db CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;


CREATE USER 'guac_user'@'localhost' IDENTIFIED BY 'guac_password';


GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guac_user'@'localhost';


FLUSH PRIVILEGES;


EXIT;
cd guacamole-server-1.5.3/auth/mysql/schema

cat *.sql | mysql -u guac_user -p guacamole_db

6. Configure Guacamole

# MySQL properties

mysql-hostname: localhost


mysql-port: 3306


mysql-database: guacamole_db


mysql-username: guac_user


mysql-password: guac_password

# Location of proxy daemon


guacd-hostname: localhost


guacd-port: 4822

# Auth provider


auth-provider:


net.sourceforge.guacamole.auth.jdbc.JDBCAuthenticationProvider
sudo ln -s /etc/guacamole /usr/share/tomcat9/.guacamole   # Ubuntu

# or


sudo ln -s /etc/guacamole /usr/share/tomcat/.guacamole # CentOS
sudo cp guacamole-auth-jdbc-mysql-1.5.3.jar /etc/guacamole/extensions/

sudo cp /usr/local/lib/libguac-client-rdp.so /etc/guacamole/lib/


# (also copy vnc, ssh, etc. libs if needed)

7. Finalize & Start Guacamole Services

# Restart Tomcat and guacd

sudo systemctl restart tomcat9 # or tomcat


sudo systemctl restart guacd

8. Access the Web UI of Guacamole

Ithal P. Rajagopal
Ithal P. Rajagopal

Hi, I'm Ithal! I write tech and hosting blogs at Ucartz.com, where I share insights, tips, and the latest updates from the world of web hosting and technology. Whether it's about server setups, control panels, or tools to power your online presence, I break things down in a way that's easy to understand—even if you're just starting out.