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.
- Join the Wi-Fi network
[EVENT_WIFI](password[WIFI_PASSWORD]). - Open a terminal on your laptop:
OS Terminal Windows Windows Terminal or PowerShell macOS Terminal (Command + Space → type “Terminal”) Linux Your preferred terminal - Connect to your VM:
ssh [VM_USERNAME]@[VM_IP]
Are you sure you want to continue connecting (yes/no/[fingerprint])?
→ typeyes
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:
| Command | What it shows |
|---|---|
| ls | Files in the current directory |
| pwd | Your current directory |
| hostname | The server’s hostname |
| ip addr | Network interfaces and IP addresses |
| free -h | Available memory |
| df -h | Available storage |
| uptime | How 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
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
ssh-keygen -t ed25519 -f ~/.ssh/homelab_workshop_ed25519 -C "homelab-workshop"
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
cat ~/.ssh/homelab_workshop_ed25519.pub
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:
mkdir -p ~/.ssh
chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys
Paste your public key on a new line. Save with Ctrl+O Enter, exit with Ctrl+X.
chmod 600 ~/.ssh/authorized_keys
5. Test the key
From the second terminal on your laptop, connect again:
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
curl -fsSL https://get.docker.com -o get-docker.sh
head -n 20 get-docker.sh
2. Install Docker
sudo sh get-docker.sh
3. Check the service
sudo systemctl status docker --no-pager
You should see active (running). Press q if it opens an interactive view.
4. Test Docker
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:
sudo usermod -aG docker $USER
newgrp docker
Test it:
docker run hello-world
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.
docker run -d \
--name whoami \
--restart unless-stopped \
-p 8080:80 \
traefik/whoami
| Option | Meaning |
|---|---|
| -d | Run in the background |
| --name whoami | Name the container |
| --restart unless-stopped | Restart it after a VM reboot |
| -p 8080:80 | Host port 8080 → container port 80 |
| traefik/whoami | Image to run |
Check it’s running and talk to it
docker ps
curl http://localhost:8080
docker logs whoami
docker inspect whoami
docker inspect shows the full config — networking, environment, storage.
Checkpoint 4
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
curl -sSL https://dokploy.com/install.sh | sudo sh
The installation takes several minutes.
2. Confirm it’s running
docker service ls
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:
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
- Open the workshop repository:
[GITHUB_REPOSITORY_URL] - 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:
git clone https://github.com/[GITHUB_USERNAME]/[REPOSITORY_NAME].git
cd [REPOSITORY_NAME]
ls
You should see a Dockerfile. Look inside it:
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
- In Dokploy, open Settings → Git Providers and choose Github.
- Leave GitHub URL as
https://github.com, and leave Organization? off — the workshop uses your personal account. - Select Create GitHub App. Dokploy sends you to GitHub to create the app.
- On GitHub, create the generated app, then return to Dokploy.
- Follow the provider’s Action Required install control, choose Only select repositories, select
[REPOSITORY_NAME], and finish with Install & Authorize.
2. Create the project and application
- In the dashboard: Create Project → name it
homelab-workshop→ open it. - Create Service → Application → name it
workshop-app.
3. General settings — Git source
- Provider: Github
- Github Account: the account you just connected
- Repository:
[GITHUB_USERNAME]/[REPOSITORY_NAME] - Branch:
main - Build Path:
/ - Trigger Type: On Push
- Watch Paths: leave empty
- Enable Submodules: leave off
- Save.
4. Build settings
| Setting | Value |
|---|---|
| Build Type | Dockerfile |
| Docker File | Dockerfile |
| Docker Context Path | . |
| Docker Build Stage | leave 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:
| Setting | Value |
|---|---|
| Published Port | 8081 |
| Target Port | 8080 |
| Protocol | TCP |
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.
http://[VM_IP]:3000/
Test from your laptop
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
ssh -i ~/.ssh/homelab_workshop_ed25519 [VM_USERNAME]@[VM_IP]
cloudflared stays attached to this session — keep it open and keep the command running.2. Start the tunnel
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:
| Setting | Value |
|---|---|
| Host | random-words.trycloudflare.com — hostname only, no https://, slash or path |
| Path | / |
| Container Port | 8080 |
| Custom Entrypoint | off |
| HTTPS | off |
| Internal Path | / (default) |
| Strip Path | off |
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
*.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
git status
git diff
3. Commit and push
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:
- Add the domain to a DNS provider.
- Update the domain’s nameservers.
- Create a named Cloudflare Tunnel.
- Create a hostname such as
app.yourdomain.me. - Route that hostname to the Dokploy application.
- Confirm HTTPS access.
DNS changes take time, so this is not part of the required path.
Useful Docker commands
| Command | What it does |
|---|---|
| docker ps | List running containers |
| docker ps -a | List all containers |
| docker images | List 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 |
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.