Security-first, privacy-first, locally-running AI backend β built as a hardened alternative to OpenClaw, powered by gemma4-turbo.
Self-hosted AI platforms like OpenClaw have grown rapidly β but without security foundations. The result is a class of real vulnerabilities:
| Problem | OpenClaw | Ash Server |
|---|---|---|
| Identity layer | β None | β JWT auth + RBAC roles |
| External chat permissions | β Anyone can invoke agent | β Permission-gated by linked identity |
| Prompt injection protection | β None | β 7-pattern injection guard |
| Rate limiting | β None | β Per-user sliding window |
| Credential management | β Edit JSON files | β Admin panel, masked storage |
| Audit trail | β None | β Full per-action audit log |
| Discord/Slack/Telegram security | β No gates | β RBAC via identity linking |
| Service deployment | β Manual | β Windows/Linux/macOS installer |
Ash Server is not a wrapper around OpenClaw β it is a clean reimplementation in C# / ASP.NET Core with safety and trust built into every layer.
Ash Server ships with first-class support for ssfdre38/gemma4-turbo β a purpose-built quantization of Google's Gemma 4 family:
- IQ4_XS non-linear quantization applied to original bf16 source weights (not re-quantizing already-quantized weights)
- Full vision + multimodal capabilities preserved
- Runs on commodity hardware β no GPU required
| Tag | Size | RAM | Best For |
|---|---|---|---|
e2b |
4.3 GB | 8 GB+ | Laptops, Raspberry Pi 5 |
e4b / latest |
6.1 GB | 10 GB+ | Desktops, servers (recommended) |
26b |
15 GB | 20 GB+ | High quality |
31b |
18 GB | 24 GB+ | Maximum quality |
ollama run ssfdre38/gemma4-turbo # pull and run e4b (recommended)17,300+ downloads on Ollama Hub as of submission date β the #2 most downloaded Gemma 4 model in the world, behind only Google's official release, with 6.8x more downloads than the next community model.
Download from the latest release:
| Platform | Download |
|---|---|
| Windows (x64) | ash-server-*-windows-x64-setup.exe |
| Linux (x64) | ash-server-*-linux-x64.zip |
| Linux (arm64) | ash-server-*-linux-arm64.zip |
| macOS (Apple Silicon) | ash-server-*-osx-arm64.zip |
| macOS (Intel) | ash-server-*-osx-x64.zip |
Windows β run the .exe installer as Administrator. Done.
Linux / macOS β unzip and run the bundled install script:
unzip ash-server-*-linux-x64.zip -d ash-server
sudo bash ash-server/build/linux/install.sh ash-server/ash-serverRequires .NET 10 SDK and Ollama.
Linux / macOS:
git clone https://github.com/ssfdre38/ash-server
sudo bash ash-server/install.sh # build + install as system service
# β or β
bash ash-server/install.sh --run # build + run in foreground (no root needed)Windows (PowerShell as Administrator):
git clone https://github.com/ssfdre38/ash-server
cd ash-server
.\install.ps1 # build + install as Windows Service
# β or β
.\install.ps1 -Run # build + run in foreground (no admin needed)Pull the recommended model first:
ollama pull ssfdre38/gemma4-turboOpen http://localhost:18799 β the first registered user becomes admin automatically.
# Linux / macOS:
sudo bash ash-server/install.sh --uninstall
# Windows (Administrator PowerShell):
.\install.ps1 -Uninstall# Windows (run as Administrator):
ash-server.exe install-service
# Linux / macOS (run as root):
sudo ash-server install-serviceRegisters with the native service manager: Windows SCM, systemd, or launchd.
External Message (Discord / Slack / Telegram)
β
βΌ
βββββββββββββββββββββββββββββββ
β ExternalRateLimiter β sliding window per user
β (5 req / 10s default) β
ββββββββββββββ¬βββββββββββββββββ
β pass
βΌ
βββββββββββββββββββββββββββββββ
β PromptGuard β 7 injection patterns
β (instruction override, β jailbreak, persona hijack,
β base64, delimitersβ¦) β delimiter injection, etc.
ββββββββββββββ¬βββββββββββββββββ
β clean
βΌ
βββββββββββββββββββββββββββββββ
β IdentityResolver β Discord/Slack/Telegram user
β β β linked ash-server account
ββββββββββββββ¬βββββββββββββββββ
β resolve
βΌ
βββββββββββββββββββββββββββββββ
β RBAC Permission Check β role-based: can_chat,
β β can_use_agent, can_use_tools
ββββββββββββββ¬βββββββββββββββββ
β authorized
βΌ
βββββββββββββββββββββββββββββββ
β ChatHandler / AgentRunner β streams from gemma4-turbo
β β via Ollama backend
ββββββββββββββ¬βββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββ
β Audit Log β every action recorded
βββββββββββββββββββββββββββββββ
- Streaming chat β WebSocket token-by-token, just like ChatGPT
- Agent mode β tool-calling loop (web search, URL fetch, calculator, file ops)
- Multimodal β image input via gemma4-turbo vision encoder
- Conversation export β download as JSON, Markdown, or plain text
- Full-text search β search across all conversations (SQLite FTS5)
- Personality system β
soul.json+ per-user context files
- JWT authentication β RS256-compatible, configurable secret
- RBAC roles & permissions β DB-backed, fully managed via admin UI
- Prompt injection guard β 7 regex patterns, block or log mode
- Rate limiting β per-user sliding window (external) + fixed window (HTTP API)
- External identity linking β Discord/Slack/Telegram users link to accounts
- Audit log β every external chat action recorded with provider, channel, user
- Masked credential storage β tokens shown as
β’β’β’β’+ last 4 chars
- Discord bot β full gateway bot with
/linkcommand, thread support - Slack bot β Socket Mode, rate-limited, permission-gated
- Telegram bot β polling-based, per-chat conversation state
- All integrations: PromptGuard + ExternalRateLimiter enforced on every message
- User management + role assignment
- AI backend CRUD (Ollama, OpenAI-compatible)
- MCP App Store β browse, configure required variables, and install servers with a single click
- Update Center β view current vs latest version, inspect release notes, and hot-swap binary updates
- Third-Party Chat credentials management
- Channel configs + allowUnlinked policy
- External identity link management
- Audit log viewer
- Analytics dashboard (messages/day, active users)
- Cross-platform service installer: Windows Service, systemd, launchd
- Native Self-Updating System: Hot-swaps running locked binary executables and web assets seamlessly on all platforms (SCM, Systemd, Launchd)
- Single binary β
dotnet publishproduces self-contained executable - SQLite β zero external DB dependencies
- config.json overlay β override settings without touching the repo
Ash Server version 1.2 introduces two powerful network-level capabilities to support decentralized, private, and distributed local AI architectures:
Ash Server features a built-in hub-and-spoke peer compute sharing system. Multiple instances of Ash Server can cluster together to distribute LLM inference work across different physical machines:
- Master Node (Orchestrator): Receives client requests, maintains connection pools, and routes tasks based on the capabilities, CPU/GPU, and memory parameters of connected workers.
- Worker Node: Connects to the Master via secure WebSockets to process local inference queries.
- To start in Worker Mode:
ash-server --worker --master http://<master-ip>:18799 --token <pairing-token>
- Auto-Pairing & Reconnection: Dynamically authenticates with a one-time pairing token, stores a secure generated worker identity, and automatically reconnects with exponential backoff if the link drops.
- To start in Worker Mode:
Rather than binding to all public interfaces (0.0.0.0) or being hardcoded to a single VPN, Ash Server features generic network interface auto-discovery and binding:
- Zero-Trust Mesh & Tunnel Support: Natively scans and detects secure VPNs like NetBird, Tailscale, Proton VPN, WireGuard, OpenVPN, and custom adapters, resolving their statuses and IPs.
- UI-Driven Interface Pinning: Exposes active interfaces in the Admin Panel network tab. Administrators can select an interface (e.g.
"NetBird","Tailscale Tunnel", or"ProtonVPN") to saveBindInterfaceto config. - Resilient Startup: Dynamically binds Kestrel to the chosen network IP. If the VPN interface drops or is disabled, the server automatically binds to localhost (
127.0.0.1) for local-only safety rather than failing to boot.
Ash Server introduces a state-of-the-art administrative experience with two native subsystems built into the core:
Instead of manually typing NPM packages, arguments, and environment keys to configure tools, Ash Server features a fully integrated App Store:
- Git-based Registry: Automatically pulls available packages from the community-driven, public repository at ssfdre38/mcp-registry.
- Dynamic Variable Substitution: Renders customized input forms for required keys (like GitHub personal tokens or folder paths), formats them into command-line arguments and environment variables, writes them to SQLite, and dynamically boots the server instantly in the background.
- Pre-built High-Fidelity Apps: Includes out-of-the-box configurations for Filesystem, Google Search, GitHub Integration, PostgreSQL, Puppeteer Browser, and SQLite Database Manager.
- Universal Tool Calling: Leverages our fully integrated OpenAI tool-calling adapter to enable multi-step agents and MCP tool execution for OpenAI, Groq, Mistral, Together AI, OpenRouter, and local OpenAI endpoints (LM Studio, Jan, LocalAI).
Keeping a self-hosted AI orchestrator updated is traditionally complex, especially under different system service contexts:
- Dynamic File Swapping: Renames locked executing binary files first (which filesystems permit) and writes the new build in place, recursively replacing web assets in
wwwrootwhile fully preserving configurations and databases. - Deferred Service Restarts: Automatically detects your platform service manager (Windows SCM, systemd, or launchd) and schedules a delayed daemon shell script to stop, restart the service, and terminate the previous process.
- Sleek Update Center Dashboard: An administrative center showing current vs latest tags, raw markdown release notes, and real-time installation log polling that automatically reconnects the browser session once the server is back online.
appsettings.json (or create config.json beside the exe to override):
{
"Port": 18799,
"DatabasePath": "ash_server.db",
"PersonalityDir": "personality",
"Jwt": {
"Secret": "change-me-32-chars-minimum-in-production"
},
"RateLimit": {
"External": { "MaxRequests": 5, "WindowSeconds": 10 },
"Http": { "PermitLimit": 60, "WindowSeconds": 60 }
},
"PromptGuard": {
"BlockOnDetect": true,
"MaxMessageLength": 8000
},
"ThirdPartyChat": {
"BotLinkSecret": "your-bot-secret",
"Discord": { "Enabled": false, "BotToken": "", "ApplicationId": "" },
"Slack": { "Enabled": false, "BotToken": "", "AppToken": "" },
"Telegram": { "Enabled": false, "BotToken": "" }
}
}
β οΈ Always changeJwt:Secretbefore exposing to the network.
ash-server/
βββ AI/ # Backend manager, Ollama + OpenAI-compat clients
βββ Agent/ # Tool definitions + agent runner loop
βββ Auth/ # JWT + BCrypt + permission evaluation
βββ Chat/
β βββ Discord/ # Discord.Net gateway bot + message router
β βββ Slack/ # Slack Events API bot (HMAC verified)
β βββ Telegram/ # Telegram polling bot
β βββ ChatHandler.cs # Core WebSocket/streaming handler
β βββ IdentityResolver.cs # Provider β RBAC resolution
β βββ PromptGuard.cs # Injection detection
βββ Controllers/ # REST API (auth, conversations, admin, MCP, bots)
βββ Data/ # SQLite + FTS5 database layer
βββ Middleware/ # ExternalRateLimiter
βββ Models/ # Records + DTOs
βββ Personality/ # soul.json loader + default personality/
βββ Plugins/ # Plugin manifest + manager
βββ Service/ # Cross-platform service installer
βββ build/
β βββ publish-all.ps1 # Build all 5 platform targets
β βββ publish-all.sh
β βββ windows/
β β βββ installer.nsi # NSIS Windows installer script
β βββ linux/
β β βββ install.sh # Linux systemd installer
β βββ macos/
β βββ install.sh # macOS launchd installer
βββ .github/workflows/
β βββ release.yml # CI: build all targets + GitHub Release on tag push
βββ wwwroot/
β βββ index.html # Chat UI (vanilla JS SPA)
β βββ admin.html # Admin panel
βββ install.sh # One-liner: git clone + build + install (Linux/macOS)
βββ install.ps1 # One-liner: git clone + build + install (Windows)
βββ Program.cs # Entry point, DI, service hosting
βββ appsettings.json
| Project | Description |
|---|---|
| ash-server | This β secure AI backend |
| gemma4-turbo | IQ4_XS Gemma 4 for Ollama β 17.3k+ downloads |
| ash-bot | .NET 10 Discord bot β Ash's personality, 20 built-in tools, long-term memory |
| Discord | Join us on the G4Turbo.com Discord server. |
MIT β see LICENSE.
Model weights: Gemma Terms of Use.
