How to Install Guacamole on Kali Linux

Guacamole is an open-source remote desktop gateway that provides remote access to your Linux desktop environment. It allows you to access your remote machines securely and easily through a web interface.

In this tutorial, we will walk you through the installation of Guacamole on Kali Linux, the latest version.

Prerequisites

Before we proceed with the installation of Guacamole, we need to ensure that our Kali Linux system has the following prerequisites:

Step 1: Installing Java

Guacamole requires Java to run. If Java is not installed on your Kali system, you can install it from the official Kali repository by running the following command:

sudo apt-get install openjdk-11-jre-headless

Step 2: Installing Tomcat server

Guacamole uses Tomcat server to serve web pages. To install Tomcat server in your Kali Linux system, you can run the following command:

sudo apt-get install tomcat9 tomcat9-admin

Step 3: Installing MySQL server

Guacamole also requires a database server to store its configuration and user data. In this tutorial, we will use the MySQL database server.

To install MySQL server in your Kali Linux system, you can run the following command:

sudo apt-get install mysql-server mysql-client

During the installation process, you will be prompted to set a password for the MySQL root user. Remember this password as we will need it later in this tutorial.

Step 4: Creating a MySQL database

After installing the MySQL server, we need to create a database for Guacamole. To do so, log in to the MySQL server as the root user:

sudo mysql -u root -p

Enter the password you set during the MySQL server installation.

Once you are logged in, create a new database named guacdb by running the following command:

create database guacdb;

Next, create a new user named guacuser and set a password for the user:

create user 'guacuser'@'localhost' identified by 'yourpassword';

Note: Replace yourpassword with a strong password.

Grant all privileges to the guacuser on the guacdb database by running the following command:

grant all privileges on guacdb.* to 'guacuser'@'localhost';

Finally, run the following command to flush the privileges:

flush privileges;

Step 5: Downloading and installing Guacamole

To download and install Guacamole on Kali Linux, follow these steps:

  1. Download the latest version of Guacamole from https://guacamole.apache.org/releases/.

  2. Extract the downloaded package to your Tomcat webapps directory by using the following command:

    sudo tar -xzf guacamole-1.3.0.war -C /var/lib/tomcat9/webapps/guacamole.war
    

    Note: Replace guacamole-1.3.0.war with the version you downloaded.

  3. Rename the extracted Guacamole file to guacamole.war by running this command:

    sudo mv /var/lib/tomcat9/webapps/guacamole.war* /var/lib/tomcat9/webapps/guacamole.war
    
  4. Restart Tomcat server by running the following command:

    sudo systemctl restart tomcat9
    
  5. Ensure that the Guacamole installation was successful by browsing to http://localhost:8080/guacamole/. You should see the Guacamole login page.

  6. Configure Guacamole by editing the /etc/guacamole/guacamole.properties file. Uncomment and update the following properties:

    mysql-hostname: localhost
    mysql-port: 3306
    mysql-database: guacdb
    mysql-username: guacuser
    mysql-password: yourpassword
    

    Note: Replace yourpassword with the password you set for the guacuser user in Step 4.

Step 6: Accessing Guacamole

To access Guacamole, simply browse to http://localhost:8080/guacamole/ and log in with the default username and password:

Conclusion

In this tutorial, we have shown you how to install Guacamole on Kali Linux. With Guacamole, you can access your remote machines securely and easily through a web interface. Enjoy!

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!