Skip to content
Allay

WikiAllay Server

Building from source

You need Bun 1.4.3 or later (older Bun crashes on bson from Mongoose 9) and Docker for MongoDB and Redis.

#1. Get the code

git clone https://github.com/allay-ai/server
cd server
bun install

#2. Check it

bun test
bun run typecheck

Tests use a scripted model and never call the network.

#3. Run it locally

The easiest way runs the whole stack from docker-compose.dev.yaml, with values from .env.dev:

docker compose -f docker-compose.dev.yaml --env-file .env.dev up -d --build
curl http://localhost:3000/api/health

Put your own OPENROUTER_API_KEY into .env.dev for real answers, or save it in the panel. Never commit it.

To run the code on your machine instead, start MongoDB and Redis, set MONGODB_URI, MONGODB_DATABASE, and REDIS_URL, and run bun run dev.

#4. Build the admin panel

cd admin
bun install
bunx tsc -b && bunx vite build

The backend serves the built panel at /admin.

#5. Build the image

docker build -t allay-server:check .

The image is what ships. Start it with MongoDB and Redis and GET /api/health: it answers with the version, dev when no APP_VERSION build argument was passed.

bun run build bundles src/features/tools/calc.worker.ts next to the entrypoint, since exact_calculations runs in that worker.

Next: Releasing