Skip to content

Commit 9d29755

Browse files
feat(video): webtop
1 parent 67ec68c commit 9d29755

File tree

3 files changed

+98
-0
lines changed

3 files changed

+98
-0
lines changed

_posts/2021-06-20-webtop-container.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
layout: post
3+
title: "Linux desktop, inside of a container, inside of a browser??? Yes. A Webtop."
4+
date: 2021-06-05 09:00:00 -0500
5+
categories: self-hosted
6+
tags: homelab traefik portainer docker self-hosted ubuntu
7+
---
8+
9+
[![Linux desktop, inside of a container, inside of a browser??? Yes. A Webtop.?](https://img.youtube.com/vi/Gd9bvdkIXOQ/0.jpg)](https://www.youtube.com/watch?v=Gd9bvdkIXOQ "Linux desktop, inside of a container, inside of a browser??? Yes. A Webtop.?")
10+
11+
Have you ever thought about running a Linux desktop inside of a container? Me neither until I found this awesome project from LinuxServer called Webtops. A webtop is a technology stack that allows you to run Ubuntu or Alpine Linux within a container that is fully accessible from a browser. This allows you to use most Linux features with a container with a fraction of the cost of resources. Join me as we configure one from beginning to end.
12+
13+
[Watch Video](https://www.youtube.com/watch?v=Gd9bvdkIXOQ)
14+
15+
## Docker Setup
16+
17+
### Install Docker
18+
```bash
19+
sudo apt-get update
20+
sudo apt-get install \
21+
apt-transport-https \
22+
ca-certificates \
23+
curl \
24+
gnupg \
25+
lsb-release
26+
```
27+
28+
```bash
29+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
30+
```
31+
32+
```bash
33+
echo \
34+
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
35+
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
36+
```
37+
38+
```bash
39+
sudo apt-get update
40+
sudo apt-get install docker-ce docker-ce-cli containerd.io
41+
```
42+
43+
```bash
44+
sudo usermod -aG docker $USER
45+
```
46+
You'll need to log out then back in to apply this
47+
48+
### Install Docker Compose
49+
50+
```bash
51+
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
52+
```
53+
54+
```bash
55+
sudo chmod +x /usr/local/bin/docker-compose
56+
```
57+
58+
## Webtop
59+
60+
`docker-compose.yml` and `.env` can be found [here](https://github.com/techno-tim/techno-tim.github.io/tree/master/reference_files/webtop-container/)
61+
62+
63+
## Files and folders
64+
65+
```bash
66+
mkdir webtop
67+
cd webtop
68+
mkdir config
69+
cd ..
70+
nano docker-compose.yml
71+
```
72+
73+
### Create Webtop container
74+
75+
```bash
76+
docker-compose up -d
77+
```

reference_files/webtop-container/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PASSWORD=P@ssw0rd!
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
version: "2.1"
3+
services:
4+
webtop:
5+
image: ghcr.io/linuxserver/webtop:ubuntu-mate #choose your flavor
6+
container_name: webtop
7+
#privileged: true #optional but not needed unless you are running kde or i3 or other tools
8+
environment:
9+
- PUID=1000 # based on id
10+
- PGID=1000 # based on group
11+
- TZ=America/Chicago # your timezone
12+
volumes:
13+
- /home/user/webtop/config:/config #home directory
14+
#- /var/run/docker.sock:/var/run/docker.sock #optional only if you need access to docker winthin this container
15+
ports:
16+
- 3000:3000
17+
shm_size: "2gb" #optional but set to 1GB or higher to prevent browser crashes
18+
restart: unless-stopped
19+
# env_file: #only necessary if you want to change the password, see .env file
20+
# - .env

0 commit comments

Comments
 (0)