Procedure Manual for Installing Apache Guacamole 1.5.5 on Ubuntu 24.04
This manual outlines the steps to install Apache Guacamole 1.5.5 on Ubuntu 24.04 for secure RDP access. Guacamole is a clientless remote desktop gateway supporting RDP, VNC, and SSH.
1. Update and Prepare the System
Update System and Install Build Dependencies
Run the following commands to update the system and install the required dependencies:
sudo apt update && sudo apt upgrade -y
sudo apt install build-essential libcairo2-dev libjpeg-turbo8-dev libpng-dev libtool-bin uuid-dev \
libavcodec-dev libavformat-dev libswscale-dev freerdp2-dev libpango1.0-dev libssh2-1-dev \
libvncserver-dev libtelnet-dev libssl-dev libwebsockets-dev tomcat10 tomcat10-admin tomcat10-common -y
2. Install Guacamole Server
Download and Compile Guacamole Server
-
Download the latest Guacamole server source code:
wget https://downloads.apache.org/guacamole/1.5.5/source/guacamole-server-1.5.5.tar.gz
-
Extract the downloaded archive:
tar -xvzf guacamole-server-1.5.5.tar.gz cd guacamole-server-1.5.5
-
Configure, compile, and install the server:
./configure --with-init-dir=/etc/init.d make sudo make install sudo ldconfig
-
Enable and start the Guacamole daemon:
sudo systemctl enable guacd sudo systemctl start guacd
3. Install Guacamole Web Application
Deploy the Web Application
-
Download the WAR file:
wget https://downloads.apache.org/guacamole/1.5.5/binary/guacamole-1.5.5.war
-
Move the WAR file to Tomcat's webapps directory:
sudo mv guacamole-1.5.5.war /var/lib/tomcat10/webapps/guacamole.war
-
Restart Tomcat:
sudo systemctl restart tomcat10
4. Configure Guacamole
Create Configuration Files
-
Create the configuration directory:
sudo mkdir /etc/guacamole
-
Edit the
guacamole.properties
file usingvim
:sudo vim /etc/guacamole/guacamole.properties
Add the following content:
guacd-hostname: localhost guacd-port: 4822 user-mapping: /etc/guacamole/user-mapping.xml
-
Create the
.guacamole
directory for Tomcat:sudo mkdir /usr/share/tomcat10/.guacamole/
-
Link the configuration file to Tomcat's directory:
sudo ln -s /etc/guacamole/guacamole.properties /usr/share/tomcat10/.guacamole/
Create User Mapping File
-
Edit the
user-mapping.xml
file usingvim
:sudo vim /etc/guacamole/user-mapping.xml
Add an example user configuration for RDP:
<user-mapping> <authorize username="testuser" password="securepassword"> <connection name="My Windows RDP"> <protocol>rdp</protocol> <param name="hostname">192.168.1.100</param> <param name="port">3389</param> </connection> </authorize> </user-mapping>
-
Restart the Guacamole and Tomcat services:
sudo systemctl restart guacd sudo systemctl restart tomcat10
5. Access the Web Interface
- Open a web browser and go to:
http://<your-server-ip>:8080/guacamole/
- Log in with the username and password defined in the
user-mapping.xml
file.
6. Secure with SSL (Optional)
For secure access, set up an SSL reverse proxy using Nginx or Apache.
Install Nginx and Certbot
-
Install Nginx and Certbot:
sudo apt install nginx certbot python3-certbot-nginx -y
-
Obtain and configure an SSL certificate:
sudo certbot --nginx -d yourdomain.com
-
Update the Nginx configuration to proxy traffic to Tomcat.
7. Troubleshooting Common Issues
Missing Dependencies
If you encounter errors such as missing libraries during the ./configure
step, ensure the following packages are installed:
sudo apt install build-essential libcairo2-dev libjpeg-turbo8-dev libpng-dev libtool-bin uuid-dev \
libavcodec-dev libavformat-dev libswscale-dev freerdp2-dev libpango1.0-dev libssh2-1-dev \
libvncserver-dev libtelnet-dev libssl-dev libwebsockets-dev -y
Verify Service Status
Check the status of the services if something doesn't work as expected:
sudo systemctl status guacd
sudo systemctl status tomcat10
With this guide, you should have Apache Guacamole 1.5.5 installed and configured for secure RDP access on Ubuntu 24.04. For advanced configurations or troubleshooting, refer to the official documentation (opens in a new tab).