Installation
Prerequisites
Before installing Mithrandir, make sure you have:
- A Debian or Ubuntu server (including Raspberry Pi OS)
- Root or sudo access
- Git installed (
sudo apt install git)
Install
Clone the repository and run the install script:
git clone https://github.com/Joel-Mercier/mithrandir.git
cd homelab
sudo bash install.shThe install script automatically:
- Installs system dependencies (
curl,unzip) - Installs Bun (JavaScript runtime) and symlinks it into
/usr/local/bin - Installs project dependencies (
bun install) - Builds the CLI bundle (
bun run build) - Creates the global
mithrandircommand at/usr/local/bin/mithrandir
Once complete, verify the installation:
mithrandir versionTIP
If bun is not found in a new terminal session, run source ~/.bashrc (or source ~/.zshrc for Zsh) to reload your shell profile.
TIP
It is highly recommended to assign a static DHCP IP address to your server so its IP never changes. You can configure this in the DHCP static leases settings in your router's web interface.
Shell Completions
Set up tab completion for your shell:
# Append to your shell profile so completions persist across sessions
mithrandir completions bash >> ~/.bashrc
source ~/.bashrc# Append to your shell profile so completions persist across sessions
mithrandir completions zsh >> ~/.zshrc
source ~/.zshrc# Fish loads completion files from this directory automatically
mithrandir completions fish > ~/.config/fish/completions/mithrandir.fishNext Steps
With Mithrandir installed, run the setup wizard to configure your homelab:
mithrandir setupUpdating
To update the CLI to the latest version:
mithrandir self-updateThis pulls the latest changes from git, reinstalls dependencies, and rebuilds the CLI.
Uninstalling
To remove Mithrandir from your system:
sudo rm /usr/local/bin/mithrandirThis removes the CLI command. Your app data, Docker containers, and .env configuration in the project directory are left untouched — remove them manually if you want a clean slate.