https://drive.google.com/file/d/1LaORsCYiWFQmr3nP6JpMZWnmD6gLhusy/view?usp=sharing
download
!ySe%!mDfiJq&n#Rb6^%SDdw2&
# Ubuntu Desktop on AWS EC2 via Remote Desktop (RDP)
Goal: a stable Ubuntu graphical desktop on an EC2 instance, reachable from Windows
Remote Desktop (mstsc). Uses XFCE because it is far more reliable over `xrdp` than
GNOME (GNOME triggers session/color-profile auth popups).
This instance is independent of the half-finished Windows-containers Docker install
on the current Server 2019 box.
—
## 1. Launch the EC2 instance (AWS Console)
1. EC2 -> Launch instance
2. AMI: Ubuntu Server 24.04 LTS (or 22.04 LTS)
3. Instance type: t3.large (8 GB RAM) — comfortable for a desktop AND NanoClaw later.
(t3.medium / 4 GB is the bare minimum.)
4. Key pair: create/select one (used for the first SSH login).
5. Storage: bump the root volume to 30 GB (8 GB default is too small for a desktop).
6. Security group — create with two inbound rules, BOTH scoped to your own IP
(choose “My IP”, NOT 0.0.0.0/0):
– SSH — TCP 22 — Source: My IP
– RDP — TCP 3389 — Source: My IP
7. Launch.
WARNING: Never leave 3389 open to 0.0.0.0/0 — exposed RDP gets brute-forced
constantly. Lock it to your IP, or use the SSH tunnel approach (see Notes).
—
## 2. SSH in and install the desktop + RDP server
From Windows (PowerShell):
ssh -i path\to\your-key.pem ubuntu@
Then on the instance:
sudo apt update && sudo apt -y upgrade
# Lightweight desktop + RDP server
sudo apt install -y xfce4 xfce4-goodies xrdp
# Make xrdp use the XFCE session
echo “xfce4-session” > ~/.xsession
sudo systemctl enable –now xrdp
sudo systemctl restart xrdp
—
## 3. Set a password for the `ubuntu` user (RDP needs one)
EC2 logins are key-based by default, but RDP needs a password:
sudo passwd ubuntu
—
## 4. Fix the common xrdp auth popups
Prevents the “Authentication required to create a color managed device” and
network-manager prompts:
sudo bash -c ‘cat > /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla <
3. Username: ubuntu / Password: the one set in step 3
4. Accept the certificate prompt -> XFCE desktop appears.
—
## 6. (Then) install NanoClaw
You can do this in the desktop terminal or just over SSH (the GUI is not required
for NanoClaw):
git clone https://github.com/nanocoai/nanoclaw.git nanoclaw-v2
cd nanoclaw-v2
bash nanoclaw.sh # installs Node, pnpm, Docker if missing, then sets up an agent
NanoClaw requirements (per the project): Node.js 20+, pnpm 10+, Docker (Linux
containers). The nanoclaw.sh script installs these if missing.
—
## Notes
– Safer than opening 3389: tunnel RDP over SSH instead of adding the RDP firewall
rule. Open only port 22 in the security group, then:
ssh -i key.pem -L 3389:localhost:3389 ubuntu@
…and point Remote Desktop at `localhost`. This keeps RDP off the public internet.
– Cost: t3.large is roughly $0.083/hr (~$60/mo if left running) plus EBS storage.
STOP the instance when not in use to avoid charges.
– Sizing for NanoClaw:
t3.small (2 GB) — too small
t3.medium (4 GB) — minimum
t3.large (8 GB) — comfortable