https://github.com/rajatasusual/llamabox
A fully auto configured, self-hosted local AI & database stack on Debian WSL2.
https://github.com/rajatasusual/llamabox
ai debian edge-computing llamacpp localization neo4j rag redis self-hosted slm smolagents wsl2
Last synced: 4 months ago
JSON representation
A fully auto configured, self-hosted local AI & database stack on Debian WSL2.
- Host: GitHub
- URL: https://github.com/rajatasusual/llamabox
- Owner: rajatasusual
- License: mit
- Created: 2025-03-09T00:07:08.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-03-23T14:11:59.000Z (7 months ago)
- Last Synced: 2025-03-23T15:24:16.648Z (7 months ago)
- Topics: ai, debian, edge-computing, llamacpp, localization, neo4j, rag, redis, self-hosted, slm, smolagents, wsl2
- Language: Shell
- Homepage:
- Size: 1.14 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Llamabox
[](https://github.com/rajatasusual/llamabox/actions/workflows/check.yml)
  > **Run a full local RAG pipeline on your low-end, CPU-only Windows machine. Private, resilient, secure.**
> **TL;DR:** See [SUMMARY.md](docs/SUMMARY.md) for the stack breakdown and performance.---
## π What Is Llamabox?
**Llamabox** lets you self-host a complete AI and database stack inside **WSL2 + Debian**, optimized for **CPU-only, low-resource machines**. It's built for privacy-first applications like chatbots, AI search, and offline assistantsβ**no GPU, no OpenAI keys, no cloud APIs**.
π§ Llamabox includes:
- **llama.cpp**: CPU-only inference engine
- **Redis Stack**: Vector database for embeddings
- **Neo4j**: Graph-based knowledge base
- **Secure systemd-based setup**: Auto-restarting services
- **Optional browser extension**: Capture and sync content from Chrome/Edge
---
## π Table of Contents
1. [Overview](#-what-is-llamabox)
2. [Why WSL2 + Debian?](#-why-wsl2--debian)
3. [Use Cases](#-use-cases)
4. [Key Features](#-features)
5. [Prerequisites](#-prerequisites)
6. [Installation](#-installation)
7. [Service Management](#-service-management)
8. [Performance Benchmarks](#-performance-benchmarks)
9. [FAQ & Troubleshooting](#-faq--troubleshooting)
10. [Contributing](#-contributing)
11. [License & Credits](#-license--credits)
12. [Browser Extension](#-browser-extension)---
## π§ Why WSL2 + Debian?
- β **WSL2** runs native Linux with low overhead on Windows
- β **Debian** is lightweight and rock-stable
- β **No Docker needed** β systemd and all services run directly under WSL
- β Keeps everything local and private, with no cloud dependencies---
## π οΈ Use Cases
- π¬ Local chatbots and AI assistants
- π Search over documents, pages, and structured data
- π§© Graph-based reasoning with Neo4j
- π§ Embed and store knowledge using Redis vectors
- π‘οΈ Fully offline / air-gapped deployments---
## π§© Features
### π‘οΈ Security
- Passwordless local use; optional `fail2ban`, `ufw` for edge exposure
- No SSH exposed by default
- Auto security updates with `unattended-upgrades`### π Resilience
- All critical services are systemd-managed
- Auto-restarts on crash or reboot
- Logs available via `journalctl`### π§ RAG Pipeline
> CPU-only, cloud-free, privacy-first Retrieval-Augmented Generation:
1. User sends query β `llama.cpp`
2. Query embedding β Redis vector DB
3. Knowledge retrieved β Neo4j
4. Final answer generated β All local### βοΈ Light on Resources
- ~1GB idle memory usage
- Runs on as little as 2 cores and 4GB RAM
- Zero GPU required---
## π₯οΈ Prerequisites
- Windows 10/11 with WSL2
- Installed Debian distro via Microsoft Store or `wsl --install -d Debian`
- Min. 4GB RAM (8GB recommended)
- 20GB free disk space---
## π¦ Installation
```bash
# In Windows Terminal:
wsl --install -d Debian# Inside Debian WSL shell:
sudo apt update && sudo apt install git -y
git clone https://github.com/rajatasusual/llamabox
cd llamabox
./setup.sh
```π§ See [INSTALLATION.md](docs/INSTALLATION.md) for customization and optional steps.
---
## π Service Management
```bash
# Check service statuses (Redis, Neo4j, llama-server, etc.)
./scripts/check.sh# Or manually start a specific service:
sudo systemctl restart neo4j
sudo journalctl -u llama-server.service
```π More in [MANAGE.md](docs/MANAGE.md)
---
## π Performance Benchmarks
> Test device: 4-core AMD Z1, 4GB RAM, WSL2 Debian
> Model: **LLaMA 3B Q8_0**| Threads | Prompt Type | Tokens/sec | Notes |
|---------|-------------|------------|-------|
| 2 | `pp512` | 253.07 Β± 23.75 | Long-form |
| 2 | `tg128` | 54.44 Β± 4.87 | Short query |
β Runs smoothly on CPU-only setup
β Great for background tasks and lightweight chatbots
β All on a 10-year-old laptop? Yes.---
## βοΈ FAQ & Troubleshooting
- β **Systemd isn't working in WSL2**
β Add this to `/etc/wsl.conf`:
```ini
[boot]
systemd=true
```- β **"Out of memory" loading model**
β Try a smaller GGUF model
β Or edit `.wslconfig` on Windows:
```ini
[wsl2]
memory=8GB
```- β **Redis or Neo4j not starting?**
β Run `./scripts/check.sh`
β Or restart manually: `sudo systemctl restart redis-stack-server`More in [FAQs.md](docs/FAQs.md)
---
## π€ Contributing
Weβd love your help!
- Create issues, fix bugs, suggest features
- PRs welcome: fork β feature branch β pull request
- Style guide and guidelines coming soon---
## π License & Credits
Licensed under the **MIT License**.
Shout-outs:
- [llama.cpp](https://github.com/ggml-org/llama.cpp)
- [Redis Stack](https://redis.io/)
- [Neo4j](https://neo4j.com/)
- [WSL2](https://learn.microsoft.com/en-us/windows/wsl/) β€οΈ---
## π Browser Extension
The [Llamabox Extension](https://github.com/rajatasusual/llamabox_extension) captures web pages and sends them to your local server for embedding.
πΉ Features:
- Extract full article text or selection
- Sync with WSL2 HTTP server
- Works offline, configurable shortcutsπ§ To install:
- Clone the repo
- Load `extension/` as an unpacked extension in Chrome or Edge
- Set WSL IP in config pageDocs: [llamabox_extension/README.md](https://github.com/rajatasusual/llamabox_extension/blob/master/README.md)