Apache Guacamole is a browser-based remote desktop gateway. You sign in on a website and use it to open RDP, SSH, and VNC connections to your servers and PCs without installing a program or plugin on the device you're currently using. Guacamole itself isn't a desktop environment; it acts as a gateway. After installation, you add the actual destinations, such as a Windows Server or Linux server, as connections.
In this guide, we'll show you two ways to set it up: the easy way, as a One-Click App with Guacamole, a database, and an HTTPS address ready to use; and a manual installation using the official Docker images. Afterward, you'll create your first connections and learn what Guacamole can and can't do.
A gateway on a VPS is accessible around the clock and brings access to multiple systems together in one place. Guacamole is a good fit if:
- You want to work from shared or restricted devices, such as a work laptop where you can't install an RDP or SSH client, or a tablet. A modern browser is all you need.
- You manage multiple servers and want to store all your connection details in one place instead of setting them up again on every device.
- Multiple people need access, but each person should only be able to access certain servers. Guacamole has its own users, groups, and per-connection permissions.
- You don't want your servers' ports exposed to the internet. Only Guacamole is accessible over HTTPS. You can restrict the target servers' RDP and SSH ports in the firewall to the gateway's IP address.
- You want to see who connected and when. Guacamole logs every session under Settings > History.
Guacamole is less suitable if you only manage one server from your own PC. In that case, a regular client such as Windows Remote Desktop Connection or an SSH program is simpler. See Access a Windows Server via Remote Desktop and First Steps with SSH. A browser gateway is too slow for gaming, video, or graphics work. And if you're mainly looking for a modern interface for SSH sessions with file transfer, take a look at Termix.
The quickest way to get Guacamole is through your VPS's One-Click Apps. The app launches Guacamole with the guacd connection service and a PostgreSQL database, is directly accessible over HTTPS when you use a domain, and creates the database schema automatically on first startup. You don't need a reverse proxy or certificate.
- A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See Set Up One-Click Apps for instructions.
- At least 1 GB of RAM and 1 vCPU core. 2 GB of RAM and 2 vCPU cores are recommended, especially if multiple people use RDP sessions at the same time.
- At least 2 GB of free storage; 5 GB is recommended.
- Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
- Search the app catalog for Guacamole and click Install app on its card.
- Use a custom subdomain or zap.cloud is already selected. Leave it enabled and enter a name, such as
remote. Without a domain, Guacamole would only be accessible over HTTP, and your login details would be sent over the network unencrypted. - You don't need to fill in anything under App configuration. The app generates its three values, including the login details, automatically.
- Click Queue installation.
On the first startup, the VPS downloads the images and sets up the database. The app will show as Online after one or two minutes.
Open Guacamole using the app's Access link. You can find the username and password for signing in in the app settings (gear icon), under App environment > Automatically generated values:
SERVICE_USER_GUACAMOLEis your username. For the One-Click App, this iszapx.SERVICE_PASSWORD_GUACAMOLEis your password.
Use the eye icon to show a value, or the icon next to it to copy it. This account is the Guacamole administrator. The SERVICE_PASSWORD_POSTGRES value is the internal database password. You don't need it to sign in.
When you install Guacamole using the official instructions, it creates the guacadmin account with the password guacadmin. The One-Click App replaces this widely known account with the generated login details on first startup, before Guacamole is accessible. That's why you can't sign in with guacadmin.
After signing in, you'll see the home page with Recent connections and All connections. Both will be empty until you create your first connection. See “Create Connections” below.
Anyone who signs in to Guacamole can open all saved connections. Don't share the administrator login details. Instead, create individual users with limited permissions for other people. After five failed login attempts, Guacamole blocks the sender's IP address for five minutes. The block only applies to that address, so you can still sign in from your own connection.
Update Guacamole in the app settings (gear icon), under App update. Click Check for updates, then install a new version with Apply update. If the app is up to date, there isn't a newer version in the app catalog yet. Back up the database as described in the next paragraph before every update.
Users, connections, saved login details, and session history are stored in the app's PostgreSQL database. The database is preserved during updates, but a volume isn't a backup. Connect to your VPS over SSH and back up the database as follows:
N=$(docker ps --format '{{.Names}}' | grep -E '^guac-postgres-[a-z0-9]{24}$')
docker exec $N pg_dump -U guacamole_user guacamole_db | gzip > guacamole-db-$(date +%F).sql.gz
The first line finds the app's database container. The second saves the backup as a compressed file in the current directory. The file contains the passwords for your saved connections. Store it securely and don't keep it only on the VPS.
The rest of this guide covers manual installation using the official Docker images. This is useful, for example, if you don't use One-Click Apps on your server or want to run Guacamole behind your own reverse proxy.
- A Linux VPS running Debian or Ubuntu, with SSH access. See First Steps with SSH.
- Docker and Docker Compose (Compose v2). See Install Docker. Verify the installation with
docker --versionanddocker compose version. - A domain or subdomain with an A record pointing to your VPS's IP address (e.g.,
guacamole.example.com).
How much performance Guacamole needs depends mainly on the number of simultaneous graphical sessions. SSH sessions use very few resources, while high-resolution RDP sessions put significantly more load on the CPU.
| Hardware | Minimum | Recommended |
|---|---|---|
| CPU | 1 vCPU core | 2 vCPU cores |
| RAM | 1 GB | 2 GB |
| Storage | 2 GB | 5 GB |
Guacamole will run behind a reverse proxy. That means you only need SSH and ports 80 and 443 open to the outside. Use ufw to allow them:
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
Ports published by Docker using ports: are accessible from outside, even if ufw blocks them. So, as shown below, bind Guacamole to 127.0.0.1 only. For more information about firewalls, see Firewall Management on Linux.
Create a directory and generate a database password. The command writes it directly to the .env file without displaying it:
mkdir -p /opt/guacamole && cd /opt/guacamole
echo "DB_PASSWORD=$(openssl rand -hex 24)" > .env
chmod 600 .env
Guacamole includes the database schema script in its image. Use it to create the initdb.sql file, which PostgreSQL reads on first startup:
docker run --rm guacamole/guacamole:1.6.0 /opt/guacamole/bin/initdb.sh --postgresql > initdb.sql
Then create the docker-compose.yml file:
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: guacamole_db
POSTGRES_USER: guacamole_user
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- ./db:/var/lib/postgresql/data
- ./initdb.sql:/docker-entrypoint-initdb.d/initdb.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U guacamole_user -d guacamole_db"]
interval: 10s
retries: 6
guacd:
image: guacamole/guacd:1.6.0
restart: unless-stopped
guacamole:
image: guacamole/guacamole:1.6.0
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
GUACD_HOSTNAME: guacd
POSTGRESQL_HOSTNAME: postgres
POSTGRESQL_DATABASE: guacamole_db
POSTGRESQL_USERNAME: guacamole_user
POSTGRESQL_PASSWORD: ${DB_PASSWORD}
WEBAPP_CONTEXT: ROOT
REMOTE_IP_VALVE_ENABLED: "true"
ports:
- "127.0.0.1:8080:8080"
The most important lines:
initdb.sql: PostgreSQL runs this file only on the very first startup when the data directory is empty. It creates the tables and the initialguacadminaccount.guacd: The connection service establishes the actual RDP, SSH, and VNC connections. The web interface communicates only with this service, which doesn't need to be accessible from outside.WEBAPP_CONTEXT: ROOT: Guacamole is accessible at the root address instead of under/guacamole/.REMOTE_IP_VALVE_ENABLED: Guacamole gets your visitors' real IP addresses from the reverse proxy. Without this line, it only sees the proxy, and the block after five failed login attempts would affect all users at once.127.0.0.1:8080:8080: The web interface is only accessible locally. It is exposed externally through the reverse proxy.
Start Guacamole:
docker compose up -d
docker compose logs -f guacamole
The web interface is ready once Server startup appears in the logs. Press Ctrl+C to stop displaying the logs; the containers will keep running.
First, set up the reverse proxy in the next section, or check Guacamole beforehand using an SSH tunnel from your PC:
ssh -L 8080:127.0.0.1:8080 root@SERVER_IP
Then go to http://localhost:8080 and sign in with guacadmin and the password guacadmin.
The guacadmin username and password are listed in the official documentation and are widely known. Immediately after your first login, go to Settings > Users, click New User, create your own user, select every checkbox under Permissions, especially Administer system, and save. Sign in with the new account, then delete guacadmin under Settings > Users. Only then should you make Guacamole accessible through the reverse proxy.
To access Guacamole externally, set up a reverse proxy with a valid certificate in front of it. For the basics, see Set Up an nginx Reverse Proxy and Create an SSL Certificate (Let's Encrypt). Guacamole transfers screen content over WebSockets, so you need to add a few lines:
server {
listen 80;
server_name guacamole.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
client_max_body_size 1g;
}
}
proxy_buffering off ensures that screen changes are sent without delay, while Upgrade and Connection pass through the WebSocket connection. client_max_body_size allows file uploads up to 1 GB. Then obtain the certificate with certbot --nginx -d guacamole.example.com. Certbot will add HTTPS and the HTTP redirect to the block. For more security tips, see Linux Security Tips.
Everything important is stored in the PostgreSQL database. Create a backup in the /opt/guacamole directory:
cd /opt/guacamole
docker compose exec -T postgres pg_dump -U guacamole_user guacamole_db | gzip > guacamole-db-$(date +%F).sql.gz
Also back up the .env and docker-compose.yml files. The backup contains the login details for your saved connections, so treat it like a password.
Back up the database first and read the Guacamole release notes. If a new version includes database schema changes, the release notes will list the required upgrade scripts. Run these before starting the new version. Then change the version number for guacd and guacamole in docker-compose.yml and restart the stack:
cd /opt/guacamole
docker compose pull
docker compose up -d
guacd and guacamole should always use the same version.
After setup, Guacamole won't know about any of your servers yet. Create each connection once, and it will then appear on the home page. Guacamole displays its interface in your browser's language (you can change this under Settings > Preferences). This guide uses the English labels.
- Click your username in the upper-right corner and open Settings > Connections.
- Click New Connection.
- Enter a name under Name, such as
Webserver, and select SSH under Protocol. - Under Parameters > Network, enter the server's IP address or hostname under Hostname, and
22under Port. - Under Authentication, enter the Username and either a Password or your private SSH key under Private key. If you leave both blank, Guacamole will prompt you when you connect.
- Click Save.
On the home page, click the connection under All connections to open the terminal in your browser. For instructions on creating SSH keys, see Create and Use SSH Keys for Linux Servers.
Create a new connection and select RDP under Protocol. Enter the Windows Server's IP address under Hostname, 3389 under Port, and your username and password under Authentication. Windows Server uses a self-signed certificate by default. So, under Security mode, select Any and enable Ignore server certificate. Otherwise, the connection will fail with an error. If you've changed the RDP port, enter the new port here. See Change the Windows RDP Port.
You can connect to a Linux server with a graphical interface in the same way if it runs xRDP. See Set Up xRDP on a Linux Server. For VNC, select VNC. The port is usually 5900; enter the VNC password under Authentication.
If Guacamole sits in front of your servers, you no longer need to leave RDP and SSH open to everyone. On the target servers, allow access to these ports only from the IP address of the VPS running Guacamole. For example, on Linux, use ufw allow from GUACAMOLE_IP to any port 22 proto tcp.
Go to Settings > Users and click New User to create additional accounts. In the user's form, select the connections this person is allowed to open under Connections. Leave the permissions under Permissions blank for regular users so they can't manage connections or users. Use Settings > Groups to group multiple users together and assign permissions to all of them at once.
During a session, press Ctrl+Alt+Shift to open the Guacamole menu. There, you'll find the clipboard field for transferring text between your device and the remote computer, along with settings for the on-screen keyboard and zoom. To transfer files over SSH connections, enable Enable SFTP under SFTP.
- The VPS must be able to reach the target systems. Guacamole establishes every connection from the VPS. To access a PC on your home network without a public address, you'll need a VPN, such as WireGuard Easy.
localhostisn't your VPS. In the One-Click App and Docker installations,localhostin a connection points to theguacdcontainer. To reach the VPS itself, use its public IP address.- Not a replacement for local software when graphics performance matters. Screen content is transmitted in compressed form. This works well for office tasks and administration, but not for videos or games.
You've set up Guacamole on your VPS, secured the login, and created your first SSH and RDP connections. From now on, you can access your servers from any device with a browser without installing anything on it, and keep track of who connected and when.
Prefer not to work with Docker yourself? Use the easy One-Click App method described above under “The Easy Way: Guacamole as a One-Click App.”
