Apache Guacamole Installation Guide
Remote Desktop Gateway for Ubuntu 22.04
What is Apache Guacamole?
Apache Guacamole is a clientless remote desktop gateway that supports standard protocols like VNC, RDP, and SSH. Thanks to HTML5, once Guacamole is installed on a server, all you need to access your desktops is a web browser.
Clientless
No plugins or client software needed
Secure
Supports SSL/TLS encryption
Multi-protocol
RDP, VNC, SSH all in one place
Prerequisites
- Ubuntu 22.04 server with root or sudo privileges
- At least 2GB RAM (4GB recommended for production)
- Minimum 10GB disk space
- Domain name pointing to your server (recommended)
Installation Steps
Update System Packages
Before installing any new software, it's good practice to update your system packages.
Install Dependencies
Guacamole requires several dependencies including Java, Tomcat, and others.
libtool-bin libossp-uuid-dev libavcodec-dev libavformat-dev libavutil-dev \
libswscale-dev freerdp2-dev libpango1.0-dev libssh2-1-dev libtelnet-dev \
libvncserver-dev libwebsockets-dev libpulse-dev libssl-dev libvorbis-dev \
libwebp-dev tomcat9 tomcat9-admin tomcat9-user
Note: This installs a large number of packages required for Guacamole's various features.
Install Guacamole Server
Download and compile the Guacamole server from source.
tar -xzf guacamole-server-1.5.0.tar.gz
cd guacamole-server-1.5.0
./configure --with-init-dir=/etc/init.d
make
sudo make install
sudo ldconfig
Warning: The compilation process may take several minutes depending on your server's resources.
Install Guacamole Client
Download and install the Guacamole web application.
wget https://downloads.apache.org/guacamole/1.5.0/binary/guacamole-1.5.0.war
sudo mv guacamole-1.5.0.war /var/lib/tomcat9/webapps/guacamole.war
sudo systemctl restart tomcat9
Configure Guacamole
Create configuration files for Guacamole.
Add the following content:
guacd-hostname: localhost
guacd-port: 4822
# MySQL properties
mysql-hostname: localhost
mysql-port: 3306
mysql-database: guacamole_db
mysql-username: guacamole_user
mysql-password: your_password_here
Add the following content:
<Parameter name="guacamole-home" value="/etc/guacamole"/>
</Context>
Install and Configure MySQL
Guacamole requires a database for authentication and storing connections.
Secure MySQL installation:
Create database and user:
CREATE DATABASE guacamole_db;
CREATE USER 'guacamole_user'@'localhost' IDENTIFIED BY 'your_password_here';
GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'localhost';
FLUSH PRIVILEGES;
exit
Import the schema:
tar -xzf guacamole-auth-jdbc-1.5.0.tar.gz
sudo cp guacamole-auth-jdbc-1.5.0/mysql/guacamole-auth-jdbc-mysql-1.5.0.jar /etc/guacamole/extensions/
cat guacamole-auth-jdbc-1.5.0/mysql/schema/*.sql | sudo mysql -u root -p guacamole_db
Start Services
Start and enable the Guacamole and related services.
sudo systemctl enable guacd
sudo systemctl restart tomcat9
sudo systemctl restart mysql
Access Guacamole Web Interface
Guacamole should now be accessible via your web browser.
Default Login:
Username: guacadmin
Password: guacadmin
Change this password immediately after first login!
Post-Installation Security
Change Default Credentials
Immediately change the default guacadmin password after first login.
Setup SSL/TLS
Configure Nginx or Apache as a reverse proxy with Let's Encrypt SSL certificate.
Create Additional Users
Create individual user accounts instead of sharing the admin account.
Troubleshooting
Guacamole not loading
Check Tomcat logs: sudo tail -f /var/log/tomcat9/catalina.out
Connection issues
Verify guacd is running: sudo systemctl status guacd
Database errors
Check MySQL logs: sudo tail -f /var/log/mysql/error.log
Comments
Post a Comment