Skip to main content

Windows Setup

Everything you need to install, configure, and service-ify hali on Windows.


Installation

Download the latest Hali-oss.msi from the releases page. Double-click to install. The MSI places hali.exe, halid.exe, and hali-tray.exe in C:\Program Files\Hali\ and adds them to your PATH.

Option B: Manual install

Download the latest release ZIP, extract it, and move the binaries to a directory in your PATH:

# Example — adjust paths as needed
mkdir C:\Program Files\Hali
Copy-Item .\hali.exe C:\Program Files\Hali\
Copy-Item .\halid.exe C:\Program Files\Hali\
Copy-Item .\hali-tray.exe C:\Program Files\Hali\

# Add to PATH (run as admin)
[Environment]::SetEnvironmentVariable(
"Path",
[Environment]::GetEnvironmentVariable("Path", "Machine") + ";C:\Program Files\Hali",
"Machine"
)

Option C: Build from source

.\build.ps1

Outputs go to bin\oss\. Copy them to your PATH directory.

Verify

hali --version
# hali version 0.1.0 (abcdef1) oss

Windows Service (SCM)

The service is optional. Without it, hali pull auto-starts the daemon when needed. Install the service only if you want the daemon to survive reboots without manual intervention.

hali registers as a Windows service named HaliDaemon (display name: "Hali Model Cache Service"). It starts automatically on boot and restarts on failure.

Install the service

hali service install

This single command:

  1. Registers halid.exe with the Windows Service Control Manager
  2. Configures automatic start on boot
  3. Sets up automatic recovery (restarts after 5s, 30s, then 60s on failure)
  4. Starts the service immediately

Manage the service

hali service status # Check if it's running
hali service stop # Stop the service
hali service start # Start the service
hali service restart # Restart the service
hali service uninstall # Remove service registration (models are NOT deleted)

You can also use standard Windows tools:

sc query HaliDaemon
sc start HaliDaemon
sc stop HaliDaemon
sc delete HaliDaemon

Service recovery

The service is configured with automatic recovery:

Failure #ActionDelay
1stRestart5 seconds
2ndRestart30 seconds
3rd+Restart60 seconds

Service storage locations

%ProgramData%\Hali\
config.json
logs\ hali.log
models\ <base>\<size>-<variant>\<quant>\model.gguf
torrents\ <infohash>.torrent

System Tray App

hali-tray.exe puts a hali icon in your Windows notification area. The icon color tells you what's happening:

ColorMeaning
GreenSeeding — models are being shared
CyanDownloading — a model is being pulled
AmberPaused — transfers are paused
RedError — something went wrong
GrayIdle — daemon is running but nothing active

Right-click the tray icon for quick access to:

  • Open Dashboardhttp://127.0.0.1:47433
  • Pause / Resume Transfers — pause or resume BitTorrent seeding
  • Open Cache Folder — opens %ProgramData%\Hali\models\ in Explorer
  • View Logs — opens the log file
  • Restart Service — restarts the HaliDaemon service
  • Startup Settings — configure whether the tray app starts on login
# Launch manually
start .\bin\hali-tray.exe

Configuration

Config file: %ProgramData%\Hali\config.json

hali materializes this file on first run with sensible defaults. Edit it with any text editor, or use the CLI:

# See all current settings
hali config show

# Common adjustments
hali config set streaming_hash true
hali config set debug true
hali config set models_dir D:\Models
hali config set max_upload_mbps 50
hali config set max_download_mbps 0 # 0 = unlimited
%ProgramData%\Hali\config.json
{
"streaming_hash": true,
"debug": false,
"telemetry_enabled": true,
"models_dir": "D:\\Models\\Llama",
"lmstudio_models_dir": "C:\\Users\\you\\.lmstudio\\models",
"ollama_models_dir": "C:\\Users\\you\\.ollama\\models",
"daemon_listen_addr": "127.0.0.1",
"max_upload_mbps": 0,
"max_download_mbps": 0
}

Changes take effect after restarting the daemon:

hali service restart

Environment variables

Precedence: env vars > config.json > defaults

$env:HALI_MODELS_DIR = "D:\Models\Llama"
$env:ENABLE_STREAMING_HASH = "true"
$env:LMSTUDIO_MODELS_DIR = "C:\Users\you\.lmstudio\models"
$env:OLLAMA_HOME = "C:\Users\you\.ollama"

Set permanently via System Properties → Environment Variables.


LAN Setup

LAN discovery works out of the box. hali sends UDP multicast announcements on 239.192.42.1:4269 across all usable IPv4 interfaces — it automatically avoids virtual/VPN adapters.

If your machine is not visible to others on the LAN

  1. Run hali daemon status and confirm at least one model shows seeding
  2. Ensure Windows Defender Firewall allows UDP 4269 inbound and outbound:
# Allow inbound
New-NetFirewallRule -DisplayName "hali LAN" -Direction Inbound -Protocol UDP -LocalPort 4269 -Action Allow

# Allow outbound
New-NetFirewallRule -DisplayName "hali LAN Out" -Direction Outbound -Protocol UDP -LocalPort 4269 -Action Allow
  1. Verify both machines are on the same L2 segment (multicast is often blocked across routed subnets)
  2. Check for enterprise multicast policies that might be blocking 239.192.42.1

LAN is always optional — downloads fall back to HuggingFace if multicast is unavailable.


Telemetry

hali telemetry status # Check current state
hali telemetry enable # Opt in — anonymous pull events help trust scoring
hali telemetry disable # Opt out — queued events stay on disk but are never sent

Read more: Telemetry Reference


Web Dashboard

hali daemon start
hali stats --web

Or visit http://127.0.0.1:47433 directly. The dashboard shows live transfer speeds, peer counts, seeding status, and clickable magnet links.


Complete workflow example

# 1. Search
hali search llama

# 2. Pull (interactive)
hali pull llama

# 3. Check cache
hali list

# 4. Check daemon
hali daemon status

# 5. Export to Ollama
hali export ollama llama:8b:instruct:q5_k_m

# 6. Install as service (optional — runs on boot)
hali service install

# 7. Open dashboard
hali stats --web

# 8. Create publisher profile (optional — attribute your seeds)
hali profile create

Logs

When running as a Windows service, logs are at:

%ProgramData%\Hali\logs\hali.log

For verbose diagnostics, enable debug mode:

hali config set debug true
hali service restart

Next steps