LogicBit AI — Local Setup Guide
1. Introduction
LogicBit AI is a self-hosted AI chat platform that runs entirely on your own server. It includes:
ChatGPT-style chat (Nepali/English/Hindi)
Super Admin billing control (Free/Freemium/Paid)
eSewa/Khalti/Manual payments
AI model management
This guide walks you through a complete setup on your own computer (Windows/Mac/Linux).
2. System Requirements
Item Minimum Recommended
RAM 8 GB 16 GB+
CPU 4 cores 8 cores+
Free disk space 10 GB 20 GB+
OS Windows 10 / macOS 14 / Ubuntu 22.04 Latest version
GPU Not required 8 GB+ VRAM (for faster AI)
Note: On a computer without a GPU, AI responses will be slow (10–30 seconds on Intel Macs / standard PCs).
3. Two Setup Methods
Method A: Using Docker (Easy, Recommended)
Requirement: Docker Desktop must be installed.
Download Docker Desktop
Windows/Mac: https://www.docker.com/products/docker-desktop/
On macOS 12/13, the latest Docker may not run — in that case use Method B.
Open Docker and wait until the 🐳 icon appears in the menu bar.
Open Terminal / PowerShell and go to the package folder:
bash
cd logicbit-ai
Run the installer:
Windows: Double-click install.bat
Mac/Linux:
bash
chmod +x install.sh scripts/*.sh
./install.sh
The first run takes 5–15 minutes (Docker images are downloaded).
When done, open in your browser:
text
http://localhost:8080/setup
Enter the Setup Token shown by the installer.
In the Setup Wizard:
Site name: Your AI's name (e.g., "LogicBit AI")
Your name: Your name
Email: The email you'll log in with (this becomes the Super Admin)
Password: 10+ characters (mix upper/lowercase, numbers, symbols)
Click Create administrator
Choose an AI model (see Section 5 below).
Click Open chat to test.
Method B: Without Docker (Developer Mode)
Requirements: Node.js v20/v22, PostgreSQL 14+
Check PostgreSQL is running:
bash
pg_isready
It should say "accepting connections". If not:
bash
brew services start postgresql@16 # Mac
sudo systemctl start postgresql # Linux
Create the database:
bash
createdb logicbitaiown
Start the API (first Terminal):
bash
cd services/api
npm install
npm run build
DATABASE_URL=postgres://USERNAME@localhost:5432/logicbitaiown
API_PORT=4100
SETUP_TOKEN=dev123
INFERENCE_PROVIDER=mock
npm start
You should see LogicBit AI API listening on :4100.
Start the Web app (second Terminal):
bash
cd apps/web
npm install
API_INTERNAL_URL=http://localhost:4100 npx next dev -p 3100
Open in your browser:
text
http://localhost:3100/setup
Token: dev123
4. Setup Wizard Fields
Field What to enter
Setup token The token from the installer (or dev123)
Site name Your AI's name
Your name Your name
Email Super Admin login email
Password 10+ characters, secure
Confirm password Same again
Important: Keep the email and password safe — this is your Super Admin account.
5. Connecting an AI Model (Ollama)
5.1 Install Ollama
Windows/Linux: Download from https://ollama.com/download
macOS 14+: From the same link
macOS 12/13: Use the older version v0.12.4:
https://github.com/ollama/ollama/releases/tag/v0.12.4
⚠️ Never update — newer versions do not support macOS 12/13.
Verify after install:
bash
ollama --version
5.2 Download a Model
bash
ollama pull qwen2.5:1.5b
(Small and fast — good starting point)
For better quality:
bash
ollama pull qwen2.5:7b
(Larger, slower, but better)
5.3 Connect in Admin
Open http://localhost:8080/admin (or :3100/admin) in your browser
Go to Billing & settings → AI behaviour → Engine, change to Ollama, then Save
Go to the AI models page and click Use this model on your chosen model
Click Test active model to verify
6. Billing and Payment Setup
Admin → Billing & settings:
Mode Meaning
All Free Everyone is free; pricing is hidden
Freemium Free with daily limit; upgrade to Pro
All Paid Chat requires a subscription
Plans: Edit prices (NPR/USD) and limits in Admin → Plans.
Payments: Toggle eSewa/Khalti/Manual in Admin → Payment gateways. eSewa/Khalti require merchant credentials.
7. Daily Operation Commands
Task Command
Stop docker compose stop
Start docker compose start
View logs docker compose logs api
Backup scripts/backup.sh
Update scripts/update.sh
8. Troubleshooting
Problem Solution
Docker won't install (macOS 12) Use Method B (without Docker)
docker: command not found Install Docker Desktop
API won't start Check docker compose logs api
AI responses are slow Use a smaller model (1.5B) or deploy on a GPU server
AI gives wrong answers Limitation of small models — RAG (Version 2) is needed
Forgot setup token See docs/TROUBLESHOOTING.md
Port 8080 busy Set HTTP_PORT=8090 in .env
9. Not Included in Version 1
Document upload (RAG)
Custom assistants
Organization/team
Developer API key
Email verification, 2FA
Support tickets, coupons
connectIPS/Card/PayPal
These are planned for Version 2.
10. Security Recommendations
Use a strong Super Admin password
Do not use tokens like dev123 in production
Take regular backups (scripts/backup.sh)
Use HTTPS (Caddy/Nginx)
Do not expose the database or Ollama to the public internet
11. Support
If you run into problems:
Check the documents in the docs/ folder
Contact support with a screenshot of the error
LogicBit AI v1.0 — Your data, your control.