Have you ever wanted a full desktop experience on your cloud server, accessible entirely via your browser? Today, I'll show you how to set up a full Ubuntu 24.04 desktop, run it with XRDP, and expose it via Apache Guacamole — all inside Docker containers. This allows browser-based, clientless remote desktop access.
Step 1: Launch an Ubuntu 24.04 Server on AWS
- Create a t3.medium instance (2 vCPUs, 4GB RAM recommended) for smooth desktop performance.
- Open ports 22 (SSH) and 8080 (HTTP) in your security group.
Step 2: Update System and Install Docker
sudo apt update -y
sudo apt upgrade -y
sudo apt install -y docker.io docker-compose
sudo systemctl enable docker
sudo systemctl start dockerdocker.ioinstalls Docker engine.docker-composeallows us to orchestrate multiple containers.
Step 3: Install Full Ubuntu Desktop
Inside your server:
sudo apt install -y ubuntu-desktop gnome-session gdm3- Installs the full GNOME desktop environment.
- Required for XRDP to provide a proper GUI session.
Note: GNOME is heavy; for lighter and faster browser RDP, you can replace with
ubuntu-mate-desktoporcinnamon-desktop-environment.
Step 4: Install XRDP
sudo apt install -y xrdp
sudo systemctl enable xrdp
sudo systemctl start xrdp
sudo adduser xrdp ssl-certxrdpallows RDP connections to your desktop session.ssl-certgroup ensures proper permissions.
Disable Wayland (required for XRDP):
sudo sed -i 's/#WaylandEnable=false/WaylandEnable=false/' /etc/gdm3/custom.conf
sudo systemctl restart gdm3Step 5: Create a Docker-based Guacamole Stack
Create a directory for your Docker setup:
mkdir ~/guac && cd ~/guacCreate a docker-compose.yml:
version: '3'
services:
guacd:
image: guacamole/guacd:latest
restart: unless-stopped
guacamole:
image: guacamole/guacamole:latest
restart: unless-stopped
ports:
- "8080:8080"
environment:
GUACD_HOSTNAME: guacd
GUACAMOLE_HOME: /etc/guacamole
volumes:
- ./config:/etc/guacamole
depends_on:
- guacdStep 6: Configure Guacamole User
Create configuration directory:
mkdir -p config
nano config/user-mapping.xmlPaste the following (replace with your Linux username/password):
<user-mapping>
<authorize username="guacadmin" password="guacadmin">
<connection name="Ubuntu Desktop">
<protocol>rdp</protocol>
<param name="hostname">172.17.0.1</param>
<param name="port">3389</param>
<param name="username">YOUR_LINUX_USERNAME</param>
<param name="password">YOUR_LINUX_PASSWORD</param>
</connection>
</authorize>
</user-mapping>guacadmin / guacadminis web login.YOUR_LINUX_USERNAME/PASSWORDare your Ubuntu credentials for XRDP.- Since AWS ubuntu ssh is based on pem , you might have to create a password for this user , `sudo passwd ubuntu` is the trick to do that 😉
Step 7: Start Guacamole Stack
docker compose up -dguacdacts as a RDP proxy daemon.- Guacamole web runs on http://YOUR_SERVER_IP:8080/guacamole.
Step 8: Connect from Browser
- Open
http://YOUR_SERVER_IP:8080/guacamole - Login with:
Username: guacadmin
Password: guacadminClick the "Ubuntu Desktop" connection → full Ubuntu desktop loads in your browser.
✅ Single-Shot Script for a Fresh Ubuntu 24.04 Server
Copy-paste this on a bare Ubuntu 24.04 server:
#!/bin/bash
# Full Desktop + XRDP + Guacamole on Ubuntu 24.04
set -e
# Update
sudo apt update -y && sudo apt upgrade -y
# Install desktop and XRDP
sudo apt install -y ubuntu-desktop gnome-session gdm3 xrdp
sudo systemctl enable xrdp
sudo systemctl start xrdp
sudo adduser xrdp ssl-cert
# Disable Wayland for XRDP
sudo sed -i 's/#WaylandEnable=false/WaylandEnable=false/' /etc/gdm3/custom.conf
sudo systemctl restart gdm3 || echo "GDM restarted"
# Install Docker & Compose
sudo apt install -y docker.io docker-compose
sudo systemctl enable docker && sudo systemctl start docker
# Create Guacamole folder
mkdir -p ~/guac/config && cd ~/guac
# Create user-mapping.xml
cat <<EOF > ./config/user-mapping.xml
<user-mapping>
<authorize username="guacadmin" password="guacadmin">
<connection name="Ubuntu Desktop">
<protocol>rdp</protocol>
<param name="hostname">172.17.0.1</param>
<param name="port">3389</param>
<param name="username">YOUR_LINUX_USERNAME</param>
<param name="password">YOUR_LINUX_PASSWORD</param>
</connection>
</authorize>
</user-mapping>
EOF
# Create docker-compose.yml
cat <<EOF > docker-compose.yml
version: '3'
services:
guacd:
image: guacamole/guacd:latest
restart: unless-stopped
guacamole:
image: guacamole/guacamole:latest
restart: unless-stopped
ports:
- "8080:8080"
environment:
GUACD_HOSTNAME: guacd
GUACAMOLE_HOME: /etc/guacamole
volumes:
- ./config:/etc/guacamole
depends_on:
- guacd
EOF
# Start Guacamole stack
docker compose up -d
echo "Setup complete! Visit http://YOUR_SERVER_IP:8080/guacamole"
echo "Login with guacadmin / guacadmin"Replace
YOUR_LINUX_USERNAMEandYOUR_LINUX_PASSWORDbefore running.
✅ Conclusion
You now have:
- Full Ubuntu 24.04 Desktop in the cloud
- XRDP server for remote desktop
- Guacamole web gateway for browser-based access
- Single script to spin up everything from scratch
This is perfect for labs, demos, or cloud-based GUI access without installing a local RDP client.
Cheers!!