How to Install Guacamole on POP! OS Latest

Guacamole is an open-source remote desktop gateway that provides easy access to your servers and desktops with just a web browser. In this tutorial, we will guide you through the process of installing Guacamole on POP! OS Latest.

Prerequisites

Before proceeding with the installation, you need to have the following:

Step 1: Update System Packages

Before we install any new software on our system, it is always a good practice to update the system packages using the following command:

sudo apt update && sudo apt upgrade

Step 2: Install Apache Tomcat

Guacamole requires Apache Tomcat to run, so we will install it using the following command:

sudo apt install tomcat9 tomcat9-admin

Step 3: Install MySQL Server

Next, we will install the MySQL server by running the following command:

sudo apt install mysql-server

During the installation, you will be prompted to set a password for the MySQL root user.

Step 4: Create Guacamole Database

Once MySQL is installed, log in to the MySQL shell as the root user by running the following command:

sudo mysql -u root -p

Enter the MySQL root password when prompted.

Create a new database for Guacamole by running the following command:

CREATE DATABASE guacamole_db CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

Create a new user and grant it access to the Guacamole database:

CREATE USER 'guacamole_user'@'localhost' IDENTIFIED BY 'your_password_here';
GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost';
FLUSH PRIVILEGES;

Replace your_password_here with a strong password of your choice.

Exit the MySQL shell by running:

exit

Step 5: Download and Install Guacamole

Download the latest version of Guacamole by running the following command:

wget https://downloads.apache.org/guacamole/1.3.0/binary/guacamole-1.3.0.war -O /var/lib/tomcat9/webapps/guacamole.war

Step 6: Configure Guacamole

Edit the Guacamole configuration file located at /etc/guacamole/guacamole.properties using your favorite text editor:

sudo nano /etc/guacamole/guacamole.properties

Add the following lines to the end of the file:

guacd-hostname: localhost
guacd-port: 4822
mysql-hostname: localhost
mysql-port: 3306
mysql-database: guacamole_db
mysql-username: guacamole_user
mysql-password: your_password_here

Replace your_password_here with the password you set for the Guacamole MySQL user.

Step 7: Add Guacamole User Accounts

Create a file called guacamole_user.xml with the following contents:

<user-mapping>
  <authorize username="your_username_here" password="your_password_here">
    <connection name="your_connection_name_here">
      <protocol>vnc</protocol>
      <param name="hostname">localhost</param>
      <param name="port">5901</param>
      <param name="password">your_vnc_password_here</param>
    </connection>
  </authorize>
</user-mapping>

Replace your_username_here, your_password_here, your_connection_name_here, and your_vnc_password_here with your desired values.

Save the file to /etc/guacamole/user-mapping.xml using the following command:

sudo mv guacamole_user.xml /etc/guacamole/user-mapping.xml

Step 8: Start Guacamole

Restart the Tomcat service by running the following command:

sudo systemctl restart tomcat9

You can now access Guacamole by navigating to http://your_server_ip_address:8080/guacamole/.

Login with the username and password you specified in guacamole_user.xml.

Congratulations, you have successfully installed and configured Guacamole on your POP! OS Latest system!

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!