Deploying an Ubuntu Desktop App
Introduction
Spin up a lightweight Ubuntu desktop accessible via the browser. This guide shows how to containerize an Ubuntu desktop image with noVNC, add credentials, persist the home directory, and deploy it to Klutch.sh over HTTP.
Prerequisites
- GitHub repository containing your Dockerfile.
- Klutch.sh project ready in klutch.sh/app.
Project structure
.└── DockerfileSample Dockerfile
FROM dorowu/ubuntu-desktop-lxde-vnc:latest
# noVNC/HTTP portENV HTTP_PORT=6080EXPOSE 6080Recommended environment variables
VNC_PASSWORD– set a strong password for VNC/noVNC sessions.HTTP_PORT– internal port for the web UI (default6080).LC_ALL/LANG– locale settings if needed.
Persistence
Persist user files and settings:
- Mount path:
/home/ubuntu - Size: choose based on expected desktop usage and file storage
Networking
- Protocol: HTTP
- Internal port:
6080 - Users access the web desktop at
https://example-app.klutch.shwhile Klutch.sh routes to port6080inside the container.
Health check (recommended)
curl -I http://localhost:6080Deployment on Klutch.sh
- Push your Dockerfile to GitHub.
- In klutch.sh/app, create a new app and select GitHub as the source.
- Klutch.sh automatically detects the Dockerfile in the repository root.
- Choose HTTP traffic and set the internal port to
6080. - Add environment variables for
VNC_PASSWORD(required) and any locale overrides. - Attach a persistent volume at
/home/ubuntusized for user files and desktop data. - Deploy. Open
https://example-app.klutch.sh, sign in with the VNC password, and start using the desktop.
Verification
-
Open
https://example-app.klutch.shand confirm the LXDE desktop loads in the browser. -
Quick check:
Terminal window curl -I https://example-app.klutch.sh
Next steps
- Rotate the VNC password regularly.
- Limit who can reach the URL and enable IP allowlists if available.
- Schedule backups of the
/home/ubuntuvolume for important files.