For those who don’t know, Apache Guacamole is a free, open-source clientless remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH. Because it uses HTML5, all you need to do is connect to the server via a web browser and start accessing remote machines. No software to install, and nothing to set up. Simply browse and connect to any remote hosts defined in the portal. To get started with installing Apache Guacamole on Ubuntu, please follow the steps below:

Install dependencies

Before installing Guacamole, you’ll need to install the required dependencies to be able to build it from the source. Run the commands below to update Ubuntu and install these packages. After installing the packages above continue below.

Install Tomcat Server

Apache Guacamole uses Tomcat to connect clients to remote hosts via its web portal. Since you’re going to need Tomcat, run the commands below to quickly install version 9 on Ubuntu. After installing Tomcat above, the commands below can be used to start and enable it so that it automatically startup when you boot up the machine. To verify that Tomcat is installed and running, run the commands below: That will display similar lines as below:

Install Guacamole

Ubuntu doesn’t have Guacamole packages in its repositories. If you want to install Guacamole in Ubuntu, you’ll need to compile the source and build it yourself. The steps below will show you how to do that. To start compiling Guacamole, run the commands below to download version 1.3.0. Once downloaded run the commands below to extract the download package. After extracting the file, change it into the extracted folder and run the commands below to check that all requirements are met. When you run the above, you’ll see confirmations that packages and requirements are met. When everything is checked out, run the commands below to begin the installation. After installing, the commands below can be used to start and enable the Guacamole service to always startup when the system is booted. To verify that Guacamole is installed and functioning, run the commands below: That should display something similar to the lines below:

Install Guacamole Client

After installing the server above, continue below to install its client. The client is Java-based and uses HTML5 to make connections to remote machines. Run the commands below to download the Java client. After downloading the file, copy it to the /etc/guacamole directory using the following command: After that run the commands below to create a symbolic link of the guacamole client to the Tomcat webapps directory. When you’re done, restart Tomcat8 and Guacamole services. After restarting, continue below.

Configure Guacamole

At this point, you’ll want to configure the Guacamole configuration file. Run the commands below to create a config properties file. Add these lines into the save. Save the exit when done. Next, run the commands below to create two directories for libraries and extensions. You’ll also want to set the guacamole home directory environment variable in the/etc/default/tomcat9 configuration file. After that, create a user-mapping.xml file. This file will contain settings to access the web portal. You’ll need a password hash for the user-mapping configuration. To generate a password, use the commands below. Replace type_your_password_here with your real password. That should put a password hash. Copy the hash value to use in the config below. (stdin)= 36160e235d67eb4d4e234r449a4798ee37a8d Next, run the commands below to create a new user-mapping.xml Then copy and paste the content below into the file and save it. Save and exit. Next, restart Tomcat and Guacamole service to apply the changes. That should do it. Open your browser and browse to the server hostname or IP address as shown below: You should then see the Guacamole portal to log in. Enter the username and password you defined in the user-mapping file above. That’s it! Conclusion: This post showed you how to install Apache guacamole on Ubuntu 20.04 | 18.04. If you find any error above, please use the form below to report.