Run a Full Linux Desktop in a Browser with the Webtop Docker Container

What is Webtop?

Alpine and Ubuntu based containers containing full desktop environments in officially supported flavors accessible via any modern web browser. - https://hub.docker.com/r/linuxserver/webtop

Installing Docker

  1. Log into the Linux host and run the following commands in a terminal window
    # update software respositories
    sudo apt update
    # install available software updates
    sudo apt upgrade -y
    # install prerequisites
    sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y
    # add docker gpg key
    curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
    # add docker apt repository
    sudo apt-add-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable"
    # update software repositories again
    sudo apt update
    # install docker
    sudo apt install docker-ce docker-ce-cli containerd.io -y
    # add the current user to the docker group
    sudo usermod -aG docker $USER
    # reauthenticate for the new group membership to take effect
    su - $USER

Running Webtop

  1. Continue with the following commands in terminal
    # make a working directory
    sudo mkdir ~/docker/webtop/config -p
    # create/edit .env file
    sudo nano ~/docker/webtop/.env
  2. Paste the following into the .env file and change the value to something secure

    PASSWORD=SomethingSecure

  3. Press CTRL+O, Enter, CTRL+X to write the changes to .env
  4. Continue with the following commands in terminal
    # set owner of docker directory
    sudo chown "$USER":"$USER" /home/"$USER"/docker -R
    # set permissions on docker directory
    sudo chmod g+rwx "$HOME/docker" -R
    # run the webtop container
    docker run -d --name webtop --env-file /home/$USER/docker/webtop/.env -p 3000:3000 -e TZ=America/New_York -e PUID=1000 -e PGID=1000 -v /home/$USER/docker/webtop/config:/config --restart=unless-stopped linuxserver/webtop:ubuntu-xfce
  5. Open a web browser and navigate to http://DNSorIP:3000
  6. Welcome to a full Linux desktop environment accessible from a web browser