Install on Linux¶
Works on x86_64 and arm64, on any distribution (glibc or musl).
1. Run the installer¶
curl -fsSLO https://github.com/Sandaal/ai-app-server/releases/latest/download/install.sh
sh install.sh
As root the binary goes to /usr/local/bin, otherwise to ~/.local/bin. The script checks the download's checksum and checks for Python and uv. Install uv if it says so:
2a. Run it by hand¶
2b. Run it as a service (systemd)¶
This:
- creates a system user
aiapp, - keeps data in
/var/lib/aiapp, - deploys every app folder in
/etc/aiapp/apps/at start, - reads provider keys from
/etc/aiapp/env(KEY=valuelines; the file is created readable by root only), - listens on
127.0.0.1:8080.
Manage it with:
systemctl status aiapp
journalctl -u aiapp -f
sudo -u aiapp AIAPP_DATA_DIR=/var/lib/aiapp aiapp apps # CLI commands against the service
Add a key to /etc/aiapp/env, for example OPENAI_API_KEY=sk-..., then sudo systemctl restart aiapp.
Serve other machines¶
- Read the Security checklist.
- Put a reverse proxy with HTTPS in front (recommended), or change
--addrin/etc/systemd/system/aiapp.serviceto0.0.0.0:8080and runsudo systemctl daemon-reload && sudo systemctl restart aiapp.
Example nginx site (note proxy_buffering off, so chat answers stream):
server {
listen 443 ssl;
server_name ai.example.com;
ssl_certificate /etc/ssl/certs/ai.example.com.pem;
ssl_certificate_key /etc/ssl/private/ai.example.com.key;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_buffering off;
proxy_read_timeout 300s;
client_max_body_size 100m;
}
}
Next: connect a model.