بسم الله الرحمن الرحيم
This script automates the setup process for deploying Guacamole Server with Tomcat on a Ubuntu (tested on Ubuntu 24.04 - fresh installation).
If you are using Debian, you need to replace libjpeg-turbo8-dev in the script with libjpeg62-turbo-dev.
As a note, Guacamole is a clientless remote desktop gateway that supports standard protocols like VNC, RDP, and SSH. Basically, it allows us to access those protocols via a web browser.
- Ubuntu-based Linux distribution (tested on Ubuntu 24.04 - fresh installation)
- Internet connectivity
- Root privileges or sudo access for run the script (this is necessary because the script will attempt to automate the setup process for
mysql_secure_installation, which technically requires sudo access.)
-
Clone the repository and navigate to the directory:
git clone https://github.com/yokokho/guacamole-automated-installation.git cd guacamole-automated-installation -
Make the script executable:
chmod +x guac-automate.sh
-
Run the script using sudo:
sudo ./guac-automate.sh
-
Follow the prompts to input the required information:
- Tomcat username and password
- MySQL root password
- Guacamole database details (name, username, password)
- Preferred path name for Guacamole
-
Sit back and relax while the script sets up Guacamole with Tomcat (it takes a while because many packages will be installed).
-
After installation, you can access your Guacamole on your browser via
http://server_ip:8080/your-preferred-path. -
Use the following credentials to login:
- Username:
guacadmin - Password:
guacadmin
- Username:
-
Tomcat Configuration:
- Input your username for Tomcat:
your-tomcat-username - Input your password for Tomcat:
your-tomcat-password
- Input your username for Tomcat:
-
MySQL Configuration:
- Enter MySQL root password:
your-mysql-root-password - Enter Guacamole database name:
guacamole_db - Enter Guacamole database username:
guacamole_user - Enter Guacamole database password:
guacamole_password
- Enter MySQL root password:
-
Guacamole Path:
- Enter our preferred path name for Guacamole:
our-secret-path
- Enter our preferred path name for Guacamole:
- Updates the system and installs necessary packages.
- Installs Java - checks if Java is installed. If not, the script will install the default JDK.
- Install expect - this one is is necessary because it allows the script to automate interactive processes requiring user input, such as the
mysql_secure_installationcommand used in this script. - Installs Tomcat.
- Creates a Tomcat service configuration file.
- Configures Tomcat for Guacamole (setting up the username, password, and modifying the configuration so that Tomcat can be accessed publicly).
- Downloads and installs Guacamole Server.
- Configures and starts Guacamole daemon.
- Sets up MySQL and Imports Guacamole database schema.
- Creates Guacamole properties file.
- Restarts necessary services.
- Optionally opens port 8080 on UFW firewall if detected.
The script uses:
- Guacamole server version: 1.5.5
- Guacamole auth jdbc version: 1.5.5
- Tomcat version: 9.0.89
- MySQL connector java version: 8.0.26
Please note that Guacamole is not yet supported in Tomcat 10.
Changing Versions: If you need to modify the version of any software, you can do so by adjusting the versions used in the wget commands within the script.
- Ensure you have an active internet connection.
- Make sure you have sudo privileges on the system.
Before executing the script, please take a moment to review its contents and understand its functionality. It's essential to ensure that the actions performed by the script align with your system requirements and security policies.
This script is provided as-is, without warranty of any kind. Use it at your own risk.
- This script is provided without any license restrictions.
- Free to use and modify - for good purposes.




