Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/TrinaxCode/TrinaxAI/llms.txt

Use this file to discover all available pages before exploring further.

TrinaxAI installs as a fully local AI assistant — no cloud, no subscriptions, no data leaving your machine. The installer auto-detects your RAM, writes a .env configuration, installs Python and Node.js dependencies, builds the PWA frontend, and optionally pulls Ollama models and registers a user-level systemd service for autostart on boot. It supports Ubuntu, Debian, Fedora, Arch, openSUSE, and Alpine. When the install completes you’ll have:
  • Ollama running at http://localhost:11434
  • RAG API (FastAPI) at https://localhost:3333
  • PWA chat interface at https://localhost:3334

One-command install

Paste this into any terminal. The script clones the repo to ~/trinaxai if it doesn’t already exist, then runs the guided installer:
curl -fsSL https://raw.githubusercontent.com/TrinaxCode/TrinaxAI/main/install.sh | bash
Security tip: Review the script before running it.
curl -fsSL https://raw.githubusercontent.com/TrinaxCode/TrinaxAI/main/install.sh | less
Alternatively, clone the repository and run the installer locally — see the manual steps below.

Manual install

1

Install system dependencies

Choose the command that matches your distribution.
sudo apt-get update
sudo apt-get install -y python3 python3-pip python3-venv curl git unzip nodejs npm
2

Clone the repository

git clone https://github.com/TrinaxCode/TrinaxAI.git ~/trinaxai
cd ~/trinaxai
3

Create the Python virtual environment

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
pip install -e .
4

Install and build the PWA

cd chat-pwa
npm install
npm run build
cd ..
5

Install Ollama

curl -fsSL https://ollama.com/install.sh | sh
Verify it responds:
ollama --version
ollama list
6

Run the installer

chmod +x install.sh
./install.sh
The installer creates .env with your auto-detected profile, generates a local HTTPS certificate, pulls any requested Ollama models, and optionally enables autostart.

Installer flags

Pass any of these flags to install.sh to skip prompts or override defaults:
FlagDescription
--interactiveGuided install; prompts for optional choices (default)
--non-interactiveFully automatic install — no prompts. Useful for CI/scripts
--no-modelsSkip downloading all Ollama models (including vision)
--no-visionSkip vision model download only
--no-autostartDo not enable boot auto-start
--no-startDo not start TrinaxAI at the end of the install
--profile 8gb|16gb|max|ultraOverride the auto-detected hardware profile
--lan-systemEnable LAN system-control endpoints and generate an admin token
Profile reference
ProfileRAM targetModels used
8gb≤ 8 GBllama3.2:1b, qwen2.5-coder:1.5b, nomic-embed-text
16gb9–19 GBllama3.2:3b, qwen2.5-coder:3b, bge-m3
max20–31 GBqwen2.5-coder:7b, bge-m3
ultra≥ 32 GBqwen2.5-coder:14b, qwen2.5vl:7b, bge-m3
Example: CI install with no prompts, no models, forced profile:
./install.sh --non-interactive --no-models --profile 16gb

Service management

Start and stop

# Start all services
./startup_ai.sh

# Shut down only AI (RAG + Ollama); PWA stays available
./shutdown_ai.sh

# Shut down everything
.venv/bin/python service_manager.py stop-all --base-dir "$PWD"

# Check status
.venv/bin/python service_manager.py status --base-dir "$PWD"
You can also use the CLI shorthand:
trinaxai start
trinaxai stop

Systemd autostart

The installer enables a user-level systemd service automatically. You can manage it directly:
# Enable autostart
.venv/bin/python service_manager.py enable-autostart --base-dir "$PWD"

# Disable autostart
.venv/bin/python service_manager.py disable-autostart --base-dir "$PWD"
If you ran setup_trinaxai.sh (the advanced system-level option), use systemctl directly:
# Service status
systemctl status ollama
systemctl status ai-rag
systemctl status trinaxai-frontend

# Tail logs via journald
journalctl -u ai-rag -f
journalctl -u trinaxai-frontend -f
The supervisor keeps the PWA available at all times. If you shut down the AI engine with ./shutdown_ai.sh or from the PWA settings, the next reboot will not restart Ollama/RAG automatically — it respects whatever state you left it in.

Update

From the repository root, run the guided updater. It asks whether to back up first, pull the latest code, update models, change autostart, and restart services. Python and npm dependencies always update automatically:
cd ~/trinaxai
./update.sh
Common non-interactive flags:
./update.sh --non-interactive    # Full update, no prompts, safe defaults
./update.sh --no-backup          # Skip the pre-update backup
./update.sh --models             # Also pull/update configured Ollama models
./update.sh --no-pull            # Skip git pull (update deps only)
./update.sh --restart            # Restart services after update

Uninstall

The guided uninstaller stops services, disables autostart, and asks which generated/runtime files to remove. Your source code is always kept:
cd ~/trinaxai
./uninstall.sh
To also remove Ollama models during uninstall:
./uninstall.sh --remove-models
RAG index data (storage/) and uploaded files (local_sources/) are kept by default. Pass --remove-data to delete them.

Port reference

PortServiceNotes
3333RAG API (FastAPI)Backend — binds to 0.0.0.0 for LAN access
3334PWA (chat interface)Open https://localhost:3334 in your browser
11434OllamaBinds to 127.0.0.1 by default
Accessing from a phone or tablet: open https://[YOUR-LAN-IP]:3334 from any device on the same Wi-Fi network. Your browser will show a certificate warning for the self-signed local cert — accept it to proceed. Find your LAN IP:
hostname -I
Do not expose ports 3333, 3334, or 11434 to the internet. For remote access, use a VPN such as Tailscale or WireGuard. See SECURITY.md for the full threat model.
LAN system control is disabled by default. Sensitive endpoints (shutdown, reload, collection management) require either a localhost caller or a valid TRINAXAI_ADMIN_TOKEN. Enable LAN system control during install with --lan-system, or set TRINAXAI_ALLOW_LAN_SYSTEM=1 and TRINAXAI_ADMIN_TOKEN in .env manually.

Build docs developers (and LLMs) love