Skip to content

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

.
└── Dockerfile

Sample Dockerfile

FROM dorowu/ubuntu-desktop-lxde-vnc:latest
# noVNC/HTTP port
ENV HTTP_PORT=6080
EXPOSE 6080
  • VNC_PASSWORD – set a strong password for VNC/noVNC sessions.
  • HTTP_PORT – internal port for the web UI (default 6080).
  • 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.sh while Klutch.sh routes to port 6080 inside the container.
Terminal window
curl -I http://localhost:6080

Deployment on Klutch.sh

  1. Push your Dockerfile to GitHub.
  2. In klutch.sh/app, create a new app and select GitHub as the source.
  3. Klutch.sh automatically detects the Dockerfile in the repository root.
  4. Choose HTTP traffic and set the internal port to 6080.
  5. Add environment variables for VNC_PASSWORD (required) and any locale overrides.
  6. Attach a persistent volume at /home/ubuntu sized for user files and desktop data.
  7. Deploy. Open https://example-app.klutch.sh, sign in with the VNC password, and start using the desktop.

Verification

  • Open https://example-app.klutch.sh and 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/ubuntu volume for important files.