---
tags:
  - homelab
  - script
author: The Bunker Admin
date: 2025-04-28
---
## build.homelab

The following is build instructions for The Bunker Operations home lab.  See the following for further instructions following installation: 

- [[config.homelab]] for more configuration settings and other bits of info.  
- [[startup.homelab]] for information on startup routines and getting into workflows. 
- [[service.homelab]] for instructions on service settings.

--- 

> [!info] Update Variables
> 
> When using this build guide, remember to check each command for [insert] tags. Not all locations have comments or history; you will have to check commands. 
## [Ubuntu](https://ubuntu.com/) OS
_Ubuntu_ is a Linux distribution derived from Debian and composed mostly of free and open-source software.
### [Install Ubuntu](https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview)
### Post Install 
Post installation, run update: 
```
sudo apt update
```

```
sudo apt upgrade
```
## [[config.drives.homelab]]
Configure drives for auto mounting on boot. 
## [VSCode Insiders](https://code.visualstudio.com/insiders/) 
Visual Studio Code is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle.
### Install Using App Centre
![[scripts/sreenshots/Pasted image 20250429113606.png]]
## [Obsidian](https://obsidian.md/)
The free and flexible app for your private thoughts.
### Install Using App Center
![[scripts/sreenshots/Pasted image 20250429113550.png]]
## [Curl](https://curl.se/) 
command line tool and library for transferring data with URLs (since 1998)
### Install
```
sudo apt install curl 
```

## [Python & Pip & pipx](https://www.python.org/) 
Python is a programming language that lets you work quickly and integrate systems more effectively.
```
sudo apt install python3-pip
```

```
sudo apt install pipx
```

```
pipx ensurepath
```
## [Glances](https://github.com/nicolargo/glances) 
 Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
### Install
```
pipx install glances[all]
```

> [!note] Start Glances
> To start glances run the following: 
> ```
> /home/bunker-admin/.local/bin/glances
> ```

## ffmpeg
A complete, cross-platform solution to record, convert and stream audio and video. 

```
sudo apt update && sudo apt install ffmpeg
```
## Flatpack 
Whether you're a user looking for apps or a developer looking to reach more users, Flathub is the best choice for apps on Linux.

```
sudo apt install flatpak
```

```
sudo apt install gnome-software-plugin-flatpak
```

```
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
```
## [Syncthing](https://syncthing.net/)
Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it’s transmitted over the internet.
### Install
```
sudo mkdir -p /etc/apt/keyrings
curl -s https://syncthing.net/release-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/syncthing-archive-keyring.gpg
```

```
echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
```

```
sudo apt-get update && sudo apt-get install syncthing
```
### Post Install
Run syncthing as a system service.
```
sudo systemctl start syncthing@[insert user]
```

```
sudo systemctl enable syncthing@[insert user]
```
## [Docker](https://www.docker.com/) 
Docker helps developers build, share, run, and verify applications anywhere — without tedious environment configuration or management.

> [!warning] Docker Desktop 
> On Ubuntu or other linux based operating systems, it is recommend by The Bunker Admin to avoid using Docker Desktop. At this time, Docker Desktop is not reliable for use on Ubuntu. 
> 
> For a GUI experience in managing Docker, it is recommend to install the docker extension in VSCode. 

```
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
```

```
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

### Update Users
```
sudo groupadd docker
```

```
sudo usermod -aG docker $USER
```

```
newgrp docker
```

### Enable on Boot 
```
sudo systemctl enable docker.service
sudo systemctl enable containerd.service
```
## [Cloudflared](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/) 
Connect, protect, and build everywhere. We make websites, apps, and networks faster and more secure. Our developer platform is the best place to build modern apps and deliver AI initiatives.

```
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloudflare-main.gpg
```

```
echo "deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg arch=amd64] https://pkg.cloudflare.com/cloudflared any main" | sudo tee /etc/apt/sources.list.d/cloudflared.list
```

```
sudo apt-get update && sudo apt-get install cloudflared
```
### Post Install
Login to Cloudflare
```
cloudflared login
```
### Configuration 
- Setting up the [[service.cloudflared]] enables your cloudflared tunnel to automatically run on reboot 
## [Pandoc](https://pandoc.org/)
If you need to convert files from one markup format into another, pandoc is your swiss-army knife. 

```
sudo apt install pandoc
```
## [Openwebui](https://docs.openwebui.com/)
**Open WebUI is an [extensible](https://docs.openwebui.com/features/plugin/), feature-rich, and user-friendly self-hosted AI platform designed to operate entirely offline.** It supports various LLM runners like **Ollama** and **OpenAI-compatible APIs**, with **built-in inference engine** for RAG, making it a **powerful AI deployment solution**.

> [!info] Openwebui & Ollama
> Recommended to install ollama and openwebui seperately.  Following next step in this guide for the Ollama set up, including the [[service.ollama]], should get you up and running. 

> [!check]
> The next command uses a cuda configuration. You may need to install the [nvidia toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) to make this work on a ubuntu machine. 

```
docker run -d -p 3000:8080 --gpus all --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:cuda
```
## Ollama
Get up and running with large language models. 

```
curl -fsSL https://ollama.com/install.sh | sh
```

See [[service.ollama]] for more information on set-up, including getting system online & a suite of models for local dev. 
## Steam 
Steam is a gaming platform 
### Install from app center 
![[scripts/sreenshots/Pasted image 20250429113523.png]]
## [Immich](https://immich.app/)
Self-hosted photo and video management solution. 

> [!info] Dedicated Drive
> Installing Immich on a dedicated drive with ample room for your photo is the recommend approach. Instead of trying to rebuild Immich on fresh installs, a persistent drive can be migrated across machines. 

[Docker compose installation instructions](https://immich.app/docs/install/docker-compose)


## [Plex](https://www.plex.tv/) 
Meet your TV concierge.

Visit plex download page and download appropriate image. On most Ubuntu machines this will be the 64bit version. 

![[scripts/sreenshots/Pasted image 20250430132109.png]]

Right click the downloaded .deb and run with software installer. 
## Media Stack
The media stack install is getting it's own manual at [[build.mediastack]].
## [scrpy](https://github.com/Genymobile/scrcpy)
Display and control your Android device. 

```
# for Debian/Ubuntu
sudo apt install ffmpeg libsdl2-2.0-0 adb wget \ gcc git pkg-config meson ninja-build libsdl2-dev \ libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev \ libswresample-dev libusb-1.0-0 libusb-1.0-0-dev
```

```
git clone https://github.com/Genymobile/scrcpy
cd scrcpy
./install_release.sh
```
## [Portainer](https://www.portainer.io/)
Portainer is a universal container management platform

```
docker volume create portainer_data
```

```
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:lts
```
## Signal 
Speak Freely. Say "hello" to a different messaging experience. An unexpected focus on privacy, combined with all of the features you expect.
~~Installation through the app center *requires flatpack to be installed*~~

```
wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
cat signal-desktop-keyring.gpg | sudo tee /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
```

```
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' |\
  sudo tee /etc/apt/sources.list.d/signal-xenial.list
```

```
sudo apt update && sudo apt install signal-desktop
```
## [VLC ](https://www.videolan.org/)
VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVDs, Audio CDs, VCDs, and various streaming protocols.

```
sudo apt-get install vlc
```

## Spotify
Spotify is a music streaming service. 

```
curl -sS https://download.spotify.com/debian/pubkey_C85668DF69375001.gpg | sudo gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/spotify.gpg  
echo "deb https://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
```

```
sudo apt-get update && sudo apt-get install spotify-client
```