HomeLabbing101

# From zero to self-hosted · workshop guide · 3 hours

Contents Covered

  • SSH & Linux VMs
  • Docker & containers
  • Dokploy & GitHub deployments
  • Cloudflare tunnels

Bring your laptop and charger, GitHub access, a browser, and git. No custom domain required.

Setup

Your details

Add your assigned values once. Commands below update automatically.

Your fork: [GITHUB_USERNAME]/[REPOSITORY_NAME] · app port 8080 · published port 8081

Part 01

Connect to your server

Your assigned VM is only reachable on the event network.

  1. Join the Wi-Fi network [EVENT_WIFI] (password [WIFI_PASSWORD]).
  2. Open a terminal on your laptop:
    OSTerminal
    WindowsWindows Terminal or PowerShell
    macOSTerminal (Command + Space → type “Terminal”)
    LinuxYour preferred terminal
  3. Connect to your VM:
On your laptoprun locally
ssh [VM_USERNAME]@[VM_IP]
Are you sure you want to continue connecting (yes/no/[fingerprint])?
→ type yes

Enter your assigned password when prompted. Nothing appears while you type — that’s normal.

Checkpoint 1

You’re now running commands on the VM, not your laptop.

Part 02

Basic Linux commands

Try these on the VM — each one tells you something about your server:

CommandWhat it shows
lsFiles in the current directory
pwdYour current directory
hostnameThe server’s hostname
ip addrNetwork interfaces and IP addresses
free -hAvailable memory
df -hAvailable storage
uptimeHow long the server has been running

Part 03

Set up SSH key authentication

Passwords can be guessed, reused, leaked or mistyped. An SSH key is a safer login:

Private key → stays on your laptop  ·  Public key → copied to the server

Never send your private key to anyone. It stays on your laptop.

1. Keep your current SSH session open

You’ll test the key from a second terminal before closing the password session.

2. Open a second terminal on your laptop and generate a key

macOS / Linuxrun locally
ssh-keygen -t ed25519 -f ~/.ssh/homelab_workshop_ed25519 -C "homelab-workshop"
Windows PowerShellrun locally
ssh-keygen -t ed25519 -f $HOME\.ssh\homelab_workshop_ed25519 -C "homelab-workshop"

Windows 10/11 include the OpenSSH client, so ssh-keygen runs in PowerShell as-is. If it says “not recognized”, install OpenSSH Client under Settings → System → Optional Features, then open a new PowerShell.

A passphrase is optional here. The dedicated path keeps your existing id_ed25519 key untouched. Files created: homelab_workshop_ed25519 and homelab_workshop_ed25519.pub — the .pub one is the public key. On macOS/Linux they live in ~/.ssh/, on Windows in $HOME\.ssh\.

3. Display your public key

macOS / Linuxrun locally
cat ~/.ssh/homelab_workshop_ed25519.pub
Windows PowerShellrun locally
Get-Content $HOME\.ssh\homelab_workshop_ed25519.pub

Copy the complete output — it begins with ssh-ed25519.

4. Add the public key to your server

Back in your original VM session:

On the VMrun on server
mkdir -p ~/.ssh
chmod 700 ~/.ssh
On the VMrun on server
nano ~/.ssh/authorized_keys

Paste your public key on a new line. Save with Ctrl+O Enter, exit with Ctrl+X.

On the VMrun on server
chmod 600 ~/.ssh/authorized_keys

5. Test the key

From the second terminal on your laptop, connect again:

On your laptoprun locally
ssh -i ~/.ssh/homelab_workshop_ed25519 [VM_USERNAME]@[VM_IP]

You should connect without the account password (your key passphrase, if you set one, is fine).

Checkpoint 2

Confirm your second session is authenticated by key, then close the original password session.

Part 04

Install Docker

An image is a packaged template (app + dependencies). A container is a running instance of that image.

Image→Container
packaged application→running application

We use Docker’s convenience script — fine for testing, not for production provisioning.

1. Download and inspect the installer

On the VMrun on server
curl -fsSL https://get.docker.com -o get-docker.sh
On the VMrun on server
head -n 20 get-docker.sh

2. Install Docker

On the VMrun on server
sudo sh get-docker.sh

3. Check the service

On the VMrun on server
sudo systemctl status docker --no-pager

You should see active (running). Press q if it opens an interactive view.

4. Test Docker

On the VMrun on server
sudo docker run hello-world

Docker downloads the image, runs the container, prints a confirmation, and stops it.

Part 05

Use Docker without sudo

By default Docker needs admin privileges. Add your account to the docker group:

On the VMrun on server
sudo usermod -aG docker $USER
newgrp docker

Test it:

On the VMrun on server
docker run hello-world
The docker group is root-equivalent. Only trusted users should be members.

Checkpoint 3

Both commands work without sudo.

Part 06

Run your first web container

whoami is a tiny web app that shows which container handled your request.

On the VMrun on server
docker run -d \
  --name whoami \
  --restart unless-stopped \
  -p 8080:80 \
  traefik/whoami
OptionMeaning
-dRun in the background
--name whoamiName the container
--restart unless-stoppedRestart it after a VM reboot
-p 8080:80Host port 8080 → container port 80
traefik/whoamiImage to run

Check it’s running and talk to it

On the VMrun on server
docker ps
On the VMrun on server
curl http://localhost:8080
On the VMrun on server
docker logs whoami
On the VMrun on server
docker inspect whoami

docker inspect shows the full config — networking, environment, storage.

Checkpoint 4

Break — take a few minutes. Don’t shut down your VM.

Part 07

Install Dokploy

Dokploy is the web dashboard that builds and deploys your Docker apps — no hand-typed Docker commands. It listens on port 3000.

1. Install

On the VMrun on server
curl -sSL https://dokploy.com/install.sh | sudo sh

The installation takes several minutes.

2. Confirm it’s running

On the VMrun on server
docker service ls
On the VMrun on server
curl -I http://localhost:3000

An HTTP response means the dashboard is up.

3. Open the dashboard

On your laptop, open — remember, localhost on your laptop is your laptop, not the VM:

On your laptopin the browser
http://[VM_IP]:3000

4. Create the administrator account

Enter your first name, last name, email, a strong, unique password and its confirmation — never reuse a personal password. Complete the initial setup.

Checkpoint 5

You’re signed in to the Dokploy dashboard.

Part 08

Prepare the GitHub project

  1. Open the workshop repository: [GITHUB_REPOSITORY_URL]
  2. Select Fork to copy it under your own account. Keep your fork public for easy inspection and troubleshooting — Dokploy will access it through the GitHub App you configure in Part 09.

Clone your fork on your laptop:

On your laptoprun locally
git clone https://github.com/[GITHUB_USERNAME]/[REPOSITORY_NAME].git
On your laptoprun locally
cd [REPOSITORY_NAME]
ls

You should see a Dockerfile. Look inside it:

On your laptoprun locally
cat Dockerfile

Look for FROM, WORKDIR, COPY, USER, EXPOSE, CMD. The app listens on container port 8080.

Part 09

Connect the repository to Dokploy

Dokploy clones your code from GitHub the way a CI/CD pipeline does — the GitHub App you create now is the credential it uses. No deploy key or personal access token needed.

1. Connect GitHub as a Git provider

  1. In Dokploy, open Settings → Git Providers and choose Github.
  2. Leave GitHub URL as https://github.com, and leave Organization? off — the workshop uses your personal account.
  3. Select Create GitHub App. Dokploy sends you to GitHub to create the app.
  4. On GitHub, create the generated app, then return to Dokploy.
  5. Follow the provider’s Action Required install control, choose Only select repositories, select [REPOSITORY_NAME], and finish with Install & Authorize.
Already have a connected GitHub provider? Reuse it — just make sure your fork is included in the app’s repository access. Don’t create another app.

2. Create the project and application

  1. In the dashboard: Create Project → name it homelab-workshop → open it.
  2. Create Service → Application → name it workshop-app.

3. General settings — Git source

  1. Provider: Github
  2. Github Account: the account you just connected
  3. Repository: [GITHUB_USERNAME]/[REPOSITORY_NAME]
  4. Branch: main
  5. Build Path: /
  6. Trigger Type: On Push
  7. Watch Paths: leave empty
  8. Enable Submodules: leave off
  9. Save.

4. Build settings

SettingValue
Build TypeDockerfile
Docker FileDockerfile
Docker Context Path.
Docker Build Stageleave blank

Save the build settings.

Part 10

Publish the application port

The app listens on 8080 inside its container. Expose it on the VM’s port 8081:

Open Advanced → Ports → add:

SettingValue
Published Port8081
Target Port8080
ProtocolTCP

Save the configuration.

Part 11

Deploy the application

Select Deploy and open the deployment logs. Dokploy will: clone the repo → read the Dockerfile → build an image → create a container → publish on port 8081. Wait for success.

Return to the Dokploy dashboard

Port 3000 is the Dokploy dashboard, while port 8081 remains the application’s direct event-network endpoint — the dashboard is not the app.

On your laptopin the browser
http://[VM_IP]:3000/

Test from your laptop

On your laptopin the browser
http://[VM_IP]:8081

Checkpoint 6

Part 12

Create and route a temporary public URL

Your app currently works only on the event network. A Cloudflare Quick Tunnel gives it a random public HTTPS address — no Cloudflare account or domain needed. cloudflared is already installed on your VM. The tunnel runs in the foreground, so it gets its own SSH session.

1. Open another SSH session

On your laptoprun locally
ssh -i ~/.ssh/homelab_workshop_ed25519 [VM_USERNAME]@[VM_IP]
Foreground process. cloudflared stays attached to this session — keep it open and keep the command running.

2. Start the tunnel

On the VMrun on server
cloudflared tunnel --url http://localhost:80
Your quick Tunnel has been created!
https://random-words.trycloudflare.com

Copy the complete https:// address, then note its hostname — the part after https://, here random-words.trycloudflare.com. You’ll enter that hostname in Dokploy next.

3. Add the hostname as a Dokploy application domain

While cloudflared keeps running, return to http://[VM_IP]:3000/ and open homelab-workshop → workshop-app → Domains. Choose Add Domain and create an application domain:

SettingValue
Hostrandom-words.trycloudflare.com — hostname only, no https://, slash or path
Path/
Container Port8080
Custom Entrypointoff
HTTPSoff
Internal Path/ (default)
Strip Pathoff

Save the domain — no redeploy needed, it applies immediately. Cloudflare terminates the public HTTPS and forwards plain HTTP to Dokploy’s Traefik on host port 80; Dokploy routes the matching host to container port 8080. A Traefik 404 on the URL before this domain is added is expected.

4. Open the public address

Paste the full https:// address from step 2 into your browser — your app is now public:

trycloudflare.com→ Cloudflare Tunnel →localhost:80→ Dokploy/Traefik host route →container:8080

Keep the cloudflared command running. Ctrl+C closes the tunnel and the URL stops working. Every restart emits a different hostname — before the new URL can work, update the Dokploy application domain to the newest hostname. Never add a wildcard *.trycloudflare.com route or enable Dokploy HTTPS for this temporary path. Quick Tunnels have no uptime guarantee — not for production.

Checkpoint 7

Part 13

Change and redeploy

Make a small change, push it to GitHub, then redeploy it.

1. Edit the project

On your laptop, open the cloned project in your editor and change the displayed title, message or page colour. Save the file.

2. Review your change

On your laptoprun locally
git status
git diff

3. Commit and push

On your laptoprun locally
git add .
git commit -m "Customise workshop application"
git push origin main

GitHub may ask you to authenticate. (The GitHub web editor works as a fallback.)

4. Watch it redeploy

The application trigger is On Push, so pushing main should start a deployment automatically — open the workshop-app deployment logs in Dokploy to watch it. If no deployment starts, use Dokploy’s Deploy/Redeploy button as the explicit fallback.

Once it finishes, reload your current public trycloudflare.com URL — your change should be live.

Complete

Final checklist

You’ve completed the workshop when all of these are true

Optional bonus — use a custom domain

Only start when the facilitator says so. Replace the random address with https://app.yourdomain.me:

  1. Add the domain to a DNS provider.
  2. Update the domain’s nameservers.
  3. Create a named Cloudflare Tunnel.
  4. Create a hostname such as app.yourdomain.me.
  5. Route that hostname to the Dokploy application.
  6. Confirm HTTPS access.

DNS changes take time, so this is not part of the required path.

Useful Docker commands
CommandWhat it does
docker psList running containers
docker ps -aList all containers
docker imagesList images
docker logs [name]View logs
docker logs -f [name]Follow logs live
docker stop [name]Stop a container
docker start [name]Start a stopped container
docker rm [name]Delete a container
docker rm -f [name]Force-delete a running container
End of workshop: stop your tunnel with Ctrl+C. The public address stops working; your app keeps running inside Dokploy.
Troubleshooting

SSH says “Connection refused” — check you’re on the event Wi-Fi, the IP and username are right, and the VM is powered on. Try ping [VM_IP], then ssh -v [VM_USERNAME]@[VM_IP].

SSH says “Permission denied” — check username and password; your public key must be one complete line in authorized_keys. On the VM: chmod 700 ~/.ssh and chmod 600 ~/.ssh/authorized_keys.

Docker says “permission denied” — run sudo usermod -aG docker $USER + newgrp docker, then retry docker run hello-world.

Container not running — check docker ps -a, then docker logs whoami.

Port 8080 already in use — sudo ss -ltnp | grep :8080 to see the process; remove an old container with docker rm -f whoami and run it again.

Dokploy doesn’t open — on the VM check curl -I http://localhost:3000 and docker service ls. In your laptop browser use the VM IP, never localhost.

Deployment failed — read the first error in the deployment logs. Common causes: wrong repo URL or branch, missing Dockerfile, wrong Dockerfile path, app listening only on localhost, wrong target port, build needing more memory than the VM has.

Port 8081 doesn’t respond — on the VM run sudo ss -ltnp | grep :8081, then open http://[VM_IP]:8081 from your laptop. In Dokploy confirm Published 8081 / Target 8080 / TCP, then redeploy.

Quick Tunnel doesn’t work — confirm the tunnel command targets http://localhost:80, the Dokploy domain host exactly matches the newest generated hostname, Container Port is 8080, HTTPS is off, and cloudflared is still running. Restart the tunnel if needed and update the application domain to the newest URL it prints.

commands

Useful commands

  • Connect to your VMssh [VM_USERNAME]@[VM_IP]
  • Connect with your SSH keyssh -i ~/.ssh/homelab_workshop_ed25519 [VM_USERNAME]@[VM_IP]
  • Running containersdocker ps
  • All containersdocker ps -a
  • Follow container logsdocker logs -f [CONTAINER_NAME]
  • List Dokploy servicesdocker service ls
  • Open Dokploy dashboardhttp://[VM_IP]:3000/
  • Start the public tunnelcloudflared tunnel --url http://localhost:80