CMai OS Documentation
Everything you need for Server Edition, from installation through to updates. One page; jump around with the headings on the left.
Getting started
CMai OS is our own Linux distribution, built for AI development servers: it ships with its own kernel configuration, an Ed25519-signed update channel and its own ISO. Four AI tools come preinstalled — CMai (the CMai API: one key, every model) plus Claude Code, Gemini CLI and Kimi CLI — and every user works in their own workspace, isolated with rootless podman. The path from install to your first cmai command is four steps:
ssh <admin>@<ip> lands straight in the workspace.Requirements
| Component | Recommended to start | Note |
|---|---|---|
| CPU | 8 vCPU | amd64 (x86-64) only |
| RAM | 32 GB | add up the quotas you plan to give each user |
| Disk | 500 GB NVMe | the install takes the whole disk |
| Network | a static IP is recommended | outbound HTTPS to license.cmaios.net is required for licensing |
| Firmware | BIOS or UEFI | both are supported |
A single-user trial runs on a much smaller machine (a 2 vCPU / 4 GB virtual machine, for instance); the figures above are a starting point for team use.
Downloading the ISO
The current ISO lives at releases.cmaios.net. Every release has a .sha256 file beside it; verify after downloading:
$ curl -LO https://releases.cmaios.net/cmaios-latest-amd64.iso
$ sha256sum -c cmaios-<version>-amd64.iso.sha256
# cmaios-<version>-amd64.iso: OKOn Windows, compare the output of certutil -hashfile cmaios-<version>-amd64.iso SHA256 with the value in the .sha256 file.
VirtualBox / bare-metal installation
VirtualBox: create a machine of type "Linux / Other Linux (64-bit)" with at least 2 vCPU, 4 GB RAM and a 40 GB disk. Attach the ISO to the optical drive. Set networking to Bridged so the server picks up an IP from your local network and you can reach it from a browser. EFI can be on or off.
Bare-metal: write the ISO to a USB stick (dd, Rufus, balenaEtcher) and boot the machine from it. Both BIOS and UEFI are supported; if Secure Boot is on, turn it off in the firmware settings.
The install starts automatically from the boot menu, partitions the disk, copies the packages and reboots. Nothing is needed from you while it runs.
First boot and the wizard
On the first boot after installation you will see a card on the console (the physical screen or the virtual machine window):
Open this in a browser to finish setup
Address https://192.168.1.40:8443
Setup code Q63X-FE73
On the certificate warning choose "Advanced → Proceed".
SSH and the other services stay closed until setup is finished.- Open the address. The panel uses a self-signed certificate; on the browser warning choose Advanced → Proceed.
- Enter the setup code. The one-time 8-character code from the card (
XXXX-XXXX). Nobody without console access can open the wizard. - Licence key. Your key, in the form
CMAI-XXXX-XXXX-XXXX-XXXX. The server contacts the licence service and the key binds to this device. - CMai API key. The
cm-…key you created at app.cmai.tr/customer/keys. This single key is written into every user's workspace and the CMai CLI (cmai) runs on it; see The CMai API and the AI tools. - Admin account. A username plus either an SSH public key or a password. A key is recommended: if you supply one, password login is never enabled for that user.
When the wizard finishes, the console card switches to CMai OS ready and shows the SSH line, the panel address and a licence summary. SSH is now open.
cmai setup code on the console. If the card has scrolled off the screen, cmai banner redraws it.Connecting
$ ssh admin@192.168.1.40
CMai OS ready · workspace: admin · /workspace
admin@cmai:/workspace $ cmaiWhat a workspace is
Every user who logs in over SSH lands not on the host but in their own workspace: a container of their own, run with rootless podman. Inside it the CMai CLI (cmai), claude, gemini, kimi, compilers and git are all ready. The home directory is HOME=/workspace and it persists; your files survive a container restart. CPU, RAM and process count are quota-bound per user (set with cmai user add).
The CMai API and the AI tools
CMai API — one key, every model. CMai is the enterprise AI platform built by CMApps (cmai.tr): chat, image, audio-video and embeddings behind one standard API (OpenAI-compatible Chat Completions), with credit management and live monitoring. In CMai OS, the single CMai API key you enter at the AI step of the wizard is written into every user's workspace; in the workspace, cmai (or cmai code) starts CMai CLI, the CMai coding agent that lives in your terminal and runs on that API (default model cmai-pro).
CMai CLI (@cmapps/cmai-cli) is preinstalled in every workspace and connects to the CMai API automatically with the server's key (CMAI_API_KEY / CMAI_MODEL / CMAI_BASE_URL). It has automatic memory, skills, sub-agents and MCP support: cmai -p "…" runs a one-shot command, cmai mcp add … adds an MCP server, and a CMAI.md at the project root gives it standing instructions. Settings persist under /workspace/.cmai. Models: cmai-pro, cmai-balanced, cmai-fast, cmai-vision. To install it on your own machine: npm install -g https://cmai.tr/downloads/cmai-cli-latest.tgz.
- Get a key: create one at app.cmai.tr/customer/keys (it starts with
cm-…). - Enter it: at the AI step of the wizard; to change it later, use the local admin panel at
https://<ip>:8443. - Use it: log in over SSH and type
cmai(cmai codedoes the same thing).
admin@cmai:/workspace $ cmai
╭─ CMai CLI · cmai-pro ─────────────────╮
│ > Run the tests and fix the failing ones │
╰───────────────────────────────────────╯Environment variables ready in every workspace — any OpenAI-compatible tool (SDKs, editor extensions, your own scripts) reaches the CMai API with no extra configuration:
| Variable | Value |
|---|---|
CMAI_API_KEY | the cm-… key entered in the wizard |
CMAI_BASE_URL | https://gw.cmai.tr/v1 |
CMAI_MODEL | cmai-pro (the CMai CLI default; cmai-balanced, cmai-fast and cmai-vision are selectable) |
OPENAI_API_KEY | the same as CMAI_API_KEY (a mirror for OpenAI-compatible tools) |
OPENAI_BASE_URL | the same as CMAI_BASE_URL |
API endpoints: POST /v1/chat/completions (SSE streaming, tool/function calling, text · image · PDF · audio · video input), /v1/embeddings, /v1/files, /v1/models. Authentication is Authorization: Bearer cm-…. Seven models: cmai-pro (default, 200K context), cmai-balanced (200K), cmai-fast (128K), cmai-vision (1M), cmai-av (audio-video, 1M); for embeddings, cmai-embed-small and cmai-embed-large (high quality, 8K). Full reference: docs.cmai.tr/docs.
$ curl "$CMAI_BASE_URL/chat/completions" -H "Authorization: Bearer $CMAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"cmai-fast","messages":[{"role":"user","content":"Hello"}]}'claude, gemini and kimi; on first run you sign in with your own provider account or API key (BYOK). Claude Code needs Anthropic's own API format, so it does not run through the CMai API. CMai API usage is drawn from your CMai credits at app.cmai.tr; no AI usage fee is included in the CMai OS licence.Host commands
Commands on the host (cmai …, systemctl, journalctl) are not visible from inside a workspace. The admin runs them through SSH's command argument, with sudo:
$ ssh admin@192.168.1.40 "sudo cmai license status"
$ ssh admin@192.168.1.40 "sudo cmai user add ayse --cpus 2 --mem 4096 --ssh-key 'ssh-ed25519 AAAA…'"
$ ssh admin@192.168.1.40 "sudo journalctl -u cmai-workspace-ayse -f"You can also type the same commands directly on the server's console.
CLI reference
The admin CLI cmai runs on the host and needs root (sudo); do not confuse it with the CMai CLI (cmai) inside a workspace. Its subcommands:
| Command | What it does |
|---|---|
cmai license status | Licence status: plan, user count, validity, connection state, device id. |
cmai license activate <key> | Binds the key to this device. The console route to unlocking a locked server. |
cmai license renew | Syncs with the licence service immediately. |
cmai license deactivate | Unbinds the key from this device so it can be used on another server. |
cmai user add <name> [--cpus N] [--mem MB] [--pids N] [--ssh-key "…"] [--password-stdin] [--no-start] | A new sandboxed user, with quotas and a login method. |
cmai user start|stop|rm <name> | Starts or stops a user's workspace, or deletes the user. |
cmai user shell <name> [command…] | Opens a shell (or runs one command) in a user's workspace. |
cmai update check | Checks the selected channel for a new release. |
cmai update apply | Applies the update. |
cmai update channel [stable|beta|nightly] | Shows or changes the update channel. |
cmai doctor | Checks services, networking, the licence and the workspaces, and lists any problems. |
cmai banner | Redraws the console card. |
cmai setup code | Shows the first-boot setup code. |
Licensing
CMai OS uses online activation (much as Windows does): the key binds to a device once, and the server verifies its licence online.
| Event | Behaviour |
|---|---|
| Activation | In the wizard, or with cmai license activate. The key binds to this server's device id. |
| Connectivity | The server needs outbound HTTPS to license.cmaios.net. Short outages change nothing; if the connection cannot be made for a long time the server enters lock mode and reopens automatically when connectivity returns. |
| Lock mode | SSH, workspaces and published projects stop. No data is deleted. The console card shows the reason and the panel address. |
| Unlocking | Local admin panel at https://<ip>:8443 → enter a new key, or on the console cmai license activate <key>. No reinstall is needed; the services come back immediately. |
| Moving servers | cmai license deactivate on the old server (or release the device at portal.cmaios.com), then activate with the same key on the new one. |
Plans: Trial (14 days, 1 user, free), Solo (1 user, $29/mo), Team (5 users included, up to 20; $99/mo, $19/mo per extra user), Enterprise (20+ users, multiple servers; from $499/mo per server, quoted). Prices are in USD and exclude VAT, and AI usage fees are not included; the current list is at cmaios.com/#planlar. For a key, write to isgelistirme.ortaklik@cmapps.com.tr.
Admin panel
The address the wizard ran on becomes the admin panel after installation: https://<ip>:8443. You sign in with the admin account you created in the wizard. The licence page shows:
- Licence status (active / locked / no licence), plan, user count and validity
- Device id, connection state and the licence server address
- Renew: sync with the server immediately
- New licence key / change key: the browser route to unlocking a locked server
- CMai API key: change the key entered in the wizard (it is written into every workspace; the CMai CLI runs on it)
- Connection summary: the SSH line, the admin name, the version
The panel is designed to be reached from the local network or the server's IP; its certificate is self-signed.
Security
CMai OS ships with military-grade encryption standards (AES-256 / Ed25519 / TLS 1.3) and strict defaults. Every measure below is active out of the box; none of them needs extra configuration.
| Layer | Measure |
|---|---|
| Signing | Licence responses and update packages are signed with Ed25519; no update whose signature does not verify is ever applied, and no licence response is ever accepted. |
| Transport | All traffic (the licence service, the update channel, the panel, published projects) is encrypted with TLS 1.2+/1.3; there is no plain HTTP. |
| SSH | Key-based access. When an SSH key is entered for the admin, or added from the panel, password login is switched off automatically. SSH stays fully closed until setup is finished. |
| Firewall | nftables, default-deny: only 22 (SSH), 8443 (panel) and 80/443 for published projects are open; everything else is dropped. |
| Brute force | fail2ban blocks repeated SSH and panel attempts. |
| Isolation | Every user runs in their own rootless podman workspace: read-only rootfs, cap-drop ALL, no-new-privileges, CPU/RAM/disk/process quotas. The host is not visible from inside a workspace. |
| Keys | The licence key, the CMai API key and the device id are kept on the server only, in root-only files. No code or data leaves the machine; the licence service only ever sees the key and the device status. |
Full-disk encryption, FIPS certification and hardware-backed key storage (mandatory TPM) are not in this release; they are being evaluated on the roadmap. For security reports, see security.txt.
Troubleshooting
SSH: Permission denied (publickey)
The server only accepts key-based logins and does not recognise the key you offered. Checklist:
- Make sure you are using the right key:
ssh -i ~/.ssh/id_ed25519 admin@<ip> - If you chose a password in the wizard, password login is enabled; if your client keeps getting stuck trying keys, use
ssh -o PubkeyAuthentication=no admin@<ip> - To add another user's key, as the admin:
sudo cmai user add <name> --ssh-key "…"
"Your workspace is being prepared"
On the first login the user's container is created; if the workspace image is still being prepared this can take a few minutes. Watch the progress from the host:
$ ssh admin@<ip> "sudo journalctl -u cmai-workspace-<name> -f"If it hangs, run sudo cmai user stop <name> then sudo cmai user start <name>; for overall health, sudo cmai doctor.
The console card shows no IP
The card may have been drawn before the network interface got an address. Press Enter on the console and it is redrawn with current information. If there is still no IP, check DHCP and — in a virtual machine — that networking is set to Bridged.
The system is locked
If the card says System locked — licence not valid it also prints the reason (expired, suspended, licence service unreachable). Enter a new key from the panel or with cmai license activate, as described under Licensing; if it is a connectivity problem, use cmai license renew.
Releases and updates
The version format is 0.1.0-dev.<n>+<sha> — n is the build counter and sha the short git hash of the source. You can see the installed version in the output of cmai license status and in the panel; the -BUILD.txt file beside each ISO holds the build details.
Updates are managed with cmai update check / cmai update apply; the channel can be stable, beta or nightly. A package-based apt channel (apt.cmaios.net) is coming; until then, new releases are published as ISOs at releases.cmaios.net.
Frequently asked
I lost the setup code — how do I open the wizard?
On the server console (the physical screen or the virtual machine window) type "cmai setup code" and the code is shown again. If the card has scrolled away, "cmai banner" redraws it. The code exists so that only someone with console access can open the wizard.
Can I change my licence key later?
Yes. Either in the local admin panel (https://<ip>:8443) under "New licence key", or on the console with "sudo cmai license activate CMAI-…". No reinstall is needed; the services come back immediately.
The server locked — has my data been deleted?
No. In lock mode SSH, workspaces and published projects stop, but nothing on the disk is deleted. The reason is printed on the console card (expired, suspended, licence service unreachable). Enter a valid key, or wait for connectivity to return, and you carry on where you left off.
Can I use the same key on two servers?
Up to your licence's server limit. Once the limit is reached a new activation is refused; unbind the old server with "cmai license deactivate", or release the device at portal.cmaios.com, then activate on the new one.
Can users reach the host system?
No. Every user who logs in over SSH lands in their own rootless podman workspace; systemctl, journalctl and the admin commands (sudo cmai …) are not visible from there. Only the admin can run host commands, in the form "ssh <admin>@<ip> \"sudo cmai …\"".
Where do I get a CMai API key, and can I change it later?
Create one at https://app.cmai.tr/customer/keys (it starts with cm-…). You enter it at the AI step of the wizard; to change it later, use the local admin panel (https://<ip>:8443). The single key is written into every user's workspace as CMAI_API_KEY.
What is the CMai CLI, and how do I use it?
The CMai CLI (@cmapps/cmai-cli) is the CMai coding agent that lives in your terminal, preinstalled in every workspace and connected automatically with the server's CMai API key. "cmai" (or "cmai code") opens an interactive session, "cmai -p \"…\"" runs a one-shot command, and "cmai mcp add …" adds an MCP server; a CMAI.md at the project root gives it standing instructions. It has automatic memory, skills and sub-agents, and its settings persist under /workspace/.cmai. Models: cmai-pro (default), cmai-balanced, cmai-fast, cmai-vision.
Do I pay separately for AI usage?
Yes. CMai API usage is drawn from your CMai credits at app.cmai.tr, and Claude Code, Gemini CLI and Kimi CLI run on their own providers' accounts or API keys. None of those usage fees are included in the CMai OS licence; what CMai OS provides is the tools installed and ready in an isolated environment.
Which ports need to be open?
From outside: 22 (SSH) and, if you want to reach the panel remotely, 8443. Published projects need 80/443. The server itself needs outbound HTTPS to license.cmaios.net; no inbound connection to it is required.
How do I take backups?
Every user's data lives in a persistent directory under /workspace. As the admin you can take a disk snapshot at server level or back it up with rsync; users can also push to remote repositories with git from their own workspaces.
For general product questions (pricing, plans, hardware) see cmaios.com/#sss.
Glossary
- Workspace
- An isolated container belonging to one user, run with rootless podman. SSH logins land directly in it, and HOME=/workspace is persistent.
- User count
- The number of users the licence allows. Every "cmai user add" consumes one user seat.
- Server limit (max devices)
- How many servers the same key may be active on at once.
- Device id
- A unique identifier derived from the server at activation and bound to the key; strengthened by TPM where one is present.
- Verification
- The server verifying its licence through license.cmaios.net; no user action is needed.
- Lock mode
- The state entered while a licence is invalid: SSH, workspaces and published projects stop, and data is preserved.
- Channel
- The update stream: stable, beta or nightly. Selected with "cmai update channel".
- Console card
- The status card shown on the physical console at first boot and afterwards: panel address, setup code, SSH line, licence summary.
- Setup code
- The one-time 8-character code (XXXX-XXXX) needed to open the wizard; it appears only on the console.
- CMai API key
- The cm-… key taken from app.cmai.tr/customer/keys. Entered once in the wizard and written into every workspace as CMAI_API_KEY; the CMai CLI ("cmai") runs on it.
- Key hint
- The last four characters of a key (CMAI-…-XXXX). Shown in the portal and in emails in place of the whole key.