docker.recipes

Webtop Linux Desktop

beginner

Full Linux desktop environment accessible via web browser with persistent storage.

Overview

LinuxServer.io's Webtop is a revolutionary container solution that delivers full Linux desktop environments directly through web browsers, eliminating the need for traditional VNC clients or remote desktop software. Built on Docker technology, Webtop transforms how users access Linux desktops by providing complete KDE, XFCE, or other desktop environments that run entirely within containers and stream to browsers via noVNC and web technologies. This approach makes Linux desktops instantly accessible from any device with a web browser, regardless of the client operating system. This stack combines Webtop's browser-based Linux desktop capabilities with NGINX's high-performance web serving to create a production-grade remote desktop solution. NGINX acts as a reverse proxy and load balancer, handling SSL termination, compression, and optimizing the web-based desktop streaming performance. The integration allows for advanced features like custom domain routing, SSL certificate management, and improved connection handling for the desktop streaming protocols. Development teams, system administrators managing headless servers, educational institutions providing lab environments, and organizations requiring secure remote access to Linux environments will find this stack invaluable. The combination offers enterprise-grade remote desktop access without the complexity of traditional VDI solutions, making it perfect for DevOps workflows, remote development environments, and secure browser-based access to Linux tools and applications.

Key Features

  • Complete KDE Plasma desktop environment accessible through any modern web browser
  • Multiple Linux distribution bases including Ubuntu, Alpine, and Fedora variants
  • Persistent user home directory and application data across container restarts
  • NGINX reverse proxy with WebSocket support for optimized desktop streaming
  • Built-in noVNC web client eliminating need for separate VNC viewers
  • Configurable desktop resolution and display settings via environment variables
  • Pre-installed development tools and applications in the containerized desktop
  • NGINX SSL/TLS termination for secure HTTPS access to the desktop environment

Common Use Cases

  • 1Remote development environments for distributed software teams
  • 2Secure Linux desktop access for employees working from personal devices
  • 3Educational computer labs accessible from student personal computers
  • 4DevOps administration interfaces for managing servers and infrastructure
  • 5Isolated testing environments for software development and QA
  • 6Temporary Linux desktop instances for training and demonstrations
  • 7Browser-based access to Linux-specific tools and applications on Windows/Mac networks

Prerequisites

  • Minimum 2GB RAM for basic KDE desktop functionality, 4GB+ recommended
  • Docker host with at least 10GB free disk space for desktop environment
  • Ports 80, 443, and 3000 available on the Docker host
  • Modern web browser with WebSocket and HTML5 support
  • Basic understanding of Linux desktop environments and file permissions
  • Valid TZ environment variable configured for proper timezone display

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 webtop:
3 image: lscr.io/linuxserver/webtop:ubuntu-kde
4 environment:
5 PUID: 1000
6 PGID: 1000
7 TZ: ${TZ}
8 SUBFOLDER: /
9 ports:
10 - "3000:3000"
11 volumes:
12 - webtop_config:/config
13 shm_size: "1gb"
14 networks:
15 - webtop-net
16 restart: unless-stopped
17
18 nginx:
19 image: nginx:alpine
20 ports:
21 - "80:80"
22 - "443:443"
23 volumes:
24 - ./nginx.conf:/etc/nginx/nginx.conf:ro
25 depends_on:
26 - webtop
27 networks:
28 - webtop-net
29 restart: unless-stopped
30
31volumes:
32 webtop_config:
33
34networks:
35 webtop-net:
36 driver: bridge

.env Template

.env
1# Timezone
2TZ=UTC
3
4# User/Group IDs
5PUID=1000
6PGID=1000

Usage Notes

  1. 1Desktop at http://localhost:3000
  2. 2Full KDE desktop environment
  3. 3Persistent home directory
  4. 4Available flavors: alpine, ubuntu, fedora

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

webtop
webtop:
  image: lscr.io/linuxserver/webtop:ubuntu-kde
  environment:
    PUID: 1000
    PGID: 1000
    TZ: ${TZ}
    SUBFOLDER: /
  ports:
    - "3000:3000"
  volumes:
    - webtop_config:/config
  shm_size: 1gb
  networks:
    - webtop-net
  restart: unless-stopped
nginx
nginx:
  image: nginx:alpine
  ports:
    - "80:80"
    - "443:443"
  volumes:
    - ./nginx.conf:/etc/nginx/nginx.conf:ro
  depends_on:
    - webtop
  networks:
    - webtop-net
  restart: unless-stopped

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 webtop:
5 image: lscr.io/linuxserver/webtop:ubuntu-kde
6 environment:
7 PUID: 1000
8 PGID: 1000
9 TZ: ${TZ}
10 SUBFOLDER: /
11 ports:
12 - "3000:3000"
13 volumes:
14 - webtop_config:/config
15 shm_size: "1gb"
16 networks:
17 - webtop-net
18 restart: unless-stopped
19
20 nginx:
21 image: nginx:alpine
22 ports:
23 - "80:80"
24 - "443:443"
25 volumes:
26 - ./nginx.conf:/etc/nginx/nginx.conf:ro
27 depends_on:
28 - webtop
29 networks:
30 - webtop-net
31 restart: unless-stopped
32
33volumes:
34 webtop_config:
35
36networks:
37 webtop-net:
38 driver: bridge
39EOF
40
41# 2. Create the .env file
42cat > .env << 'EOF'
43# Timezone
44TZ=UTC
45
46# User/Group IDs
47PUID=1000
48PGID=1000
49EOF
50
51# 3. Start the services
52docker compose up -d
53
54# 4. View logs
55docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/webtop-linux-desktop/run | bash

Troubleshooting

  • Desktop appears blank or unresponsive: Increase shm_size to 2gb or higher for graphics-intensive applications
  • Permission denied errors in desktop applications: Verify PUID and PGID match your host user's ID values
  • Connection refused on port 3000: Check if webtop container started successfully and firewall allows the port
  • NGINX 502 Bad Gateway errors: Ensure webtop service is running and accessible on the webtop-net network
  • Desktop performance is slow: Reduce browser zoom level and close unnecessary tabs consuming memory
  • Applications won't save files: Verify the webtop_config volume has proper write permissions

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space