CodeHero PRO — User Guide
Complete guide to using the CodeHero platform for AI-powered software development.
1. Login & Dashboard
Login
Open your browser and navigate to https://YOUR_IP:9453. You'll see the login page.

Your login: the username is admin (unless install.conf named another). The password is the one the installer showed at its end — every installation generates its own (5.7.0); there is no default password. It is kept in /etc/codehero/credentials.conf, which only root can read: sudo cat /etc/codehero/credentials.conf. Change it any time in Settings → Security → Change Admin Password.
admin123, the first sign-in with it opens only the page Set your password (and Sign out). Nothing else works until you set your own password there; admin123 is not accepted as the new one. The console recovery (change-passwords.sh, manage-2fa.sh) works as before.The setup code (5.7.0). Anyone who knows admin123 could try to set the password before you. So the upgrade that finds admin123 still in use makes a one-time setup code, and Set your password asks for it:
- The upgrade shows the code in a box:
PANEL SETUP CODE: XXXX-XXXX-XXXX-XXXX. The box comes twice: before the upgrade copies the files, and as its last message. The panel's upgrade window shows it too. - Write the code down.
- Sign in with
admin123. The page Set your password opens. - Type the setup code, the current password and your new password twice. Case, spaces and dashes in the code do not matter.
- Click
Save the new password. The panel opens.
- The code works once. Until then root keeps it on the server, in CodeHero's protected store (5.9.0). Lost it? On the server's console:
sudo /usr/local/lib/codehero/sandbox-ctl auth setup show. - Running the upgrade again while the password is still
admin123keeps the same code (5.9.0). - Wrong codes count like wrong passwords: 5 for one account from one address, then 30 minutes.
- With 2FA on, the page does not ask for the code: 2FA already proves that it is you.
- If no code is saved on the server, the page does not set the password (5.9.0). It says «No setup code is saved on this server. On the server's console: sudo /usr/local/lib/codehero/sandbox-ctl auth setup show (or make)». Run
sudo /usr/local/lib/codehero/sandbox-ctl auth setup makethere: it makes a code and shows it. - If the server was brought back from a copy and is still held, the page names
sudo /opt/codehero/scripts/platform-restore.sh reset-accessinstead. Set the new password there. - The upgrade's log keeps the box with the code. Keep the log to yourself until you have set your password.
- After you save your password, every other browser is signed out (below, «A new panel password»).
- A new install never has
admin123, so it never shows this page. - The console tools (
change-passwords.sh,manage-2fa.sh) need no code. A new panel password set withchange-passwords.shends the code too.
Signing in again after 5.7.0: the upgrade ends every panel sign-in from before, even one still open in a browser. The sign-in page says «Your sign-in ended: the panel password was changed, or CodeHero was upgraded. Sign in again.» Sign in once more.
A new panel password signs out the others (5.7.0). This applies to Set your password, Settings → Security → Change Admin Password and the console tool change-passwords.sh.
- Every other browser and device is signed out. Its next page is the sign-in page with «Your sign-in ended: …».
- Their open terminals and assistant windows close. After a change from the console, they close at their next action.
- «Remember this device» ends: 2FA asks for its code again at the next sign-in.
- The browser where you changed the password stays signed in.
- While the new password is being saved (a moment), nobody can sign in (5.9.0). The sign-in page says «Sign-in is unavailable: a panel password change is finishing». Try again a few seconds later.
- If the page says «The password was not changed…», this change ended no sign-in (5.9.0). If it says «…was changed meanwhile…», someone changed it first, and their change ended your sign-in: sign in again.
- If the page says «The password change could not be confirmed…», every sign-in ended, yours too. Sign in again: with the new password, or with the old one if the new one does not work.
A sign-out ends the whole session (5.12.4). The panel's session is a signed cookie. After Sign out, an old copy of that cookie (a saved one, another device that had it) is refused on every page, API call and socket, for as long as such a cookie could live (31 days, «Remember this device» included), and also after the panel restarts. Another sign-in of yours, in another browser, stays signed in. A session from before 5.12.3 has no identity of this kind: it ends at its normal expiry or when the panel password changes, as before. Sign in again once to get one. If the panel cannot check a sign-in (its database does not answer), it answers «The panel could not check this sign-in; try again in a moment.» instead of letting the request through. If a sign-out cannot be recorded (the database does not answer), nothing ends: the page says «The sign-out could not be recorded. You are still signed in: sign out again in a moment.» and you sign out again.
The sign-in state is the server's own (5.9.0). What ends the sessions at a password change — the sign-in epoch — and the key that signs the panel's cookies are kept by root, in CodeHero's protected store. The panel reads them from /etc/codehero-protected; it cannot change them. A program of the panel's user cannot replace or empty them by mistake.
- The upgrade to 5.9.0 takes them over from their old files at the panel's first start: you stay signed in. If nobody changed the panel password since 5.7.0, everyone signs in once more.
- If the panel cannot read them, nobody can sign in, and the sign-in page says «Sign-in is unavailable: <why> — on the console: sudo /usr/local/lib/codehero/sandbox-ctl auth repair». The panel tries again by itself every 10 seconds. If the message stays, run that command on the server's console. It shows what it fixed or why it cannot.
sudo /usr/local/lib/codehero/sandbox-ctl auth statusshows the state: «ready», or the problem.- A sign-in that was valid before it became unavailable works again after the repair. Only a password change ends it.
- At every start the panel first takes its sign-in state over from root. Until then the sign-in page says «Sign-in is unavailable: the panel has not taken its sign-in state over yet». It asks again every 10 seconds.
- If a sign-in file of before 5.9.0 comes back (after going back to an older version, or an old console tool), sign-in closes until root takes it over. Then everyone signs in again.
- If the page says «… an old password tool's database client is still running (pid N); let it finish or end it», a console password change of before 5.9.0 left its database step running. Sign-in opens by itself when it ends (or end it:
sudo kill N). Then everyone signs in once more: the password may have changed.
HTTPS only. The panel answers over HTTPS only: http://…:9453 is sent to https://…:9453. With a domain and a real certificate the browser remembers to use HTTPS for that name on every port (HSTS):
- HSTS is per name: it applies to the panel's domain, on every port. Browsers ignore it on an IP address and while the certificate is self-signed or invalid, so an install reached by its IP is not affected.
- A container service forwarded in plain HTTP on the panel's name does not open in a browser that has visited the panel. Forward it with TLS, or give it another name. The VPN's hosts line (Section 33) uses the same name, so it is HTTPS there too.
- A browser forgets the rule only in its own settings (Chrome:
chrome://net-internals/#hsts→ delete the domain). http://on a CodeHero port goes tohttps://on the domain of the domain setup, when one is set; otherwise on the IP address you typed. With a name the domain setup does not know, it goes to the server's own address (on a cloud with NAT that is a private address: typehttps://yourself, or set the name in the domain setup).
Two-Factor Authentication (2FA): If enabled in settings, you'll be prompted for a 6-digit code from Google Authenticator. Use "Remember this device" to skip 2FA on trusted devices until end of month.
- A code works only once (5.8.0). Since 5.9.0 root records a code before the panel accepts it: an accepted code can never be used again, even after a crash.
- After a restart of the panel, the code your app shows at that moment is refused: wait for the next one, at most 30 seconds (5.9.0).
- If the page says «This code was already used — wait for the next code in your app», wait for the next code (at most 30 seconds) and type it.
- A used code counts as a wrong try. 5 wrong codes lock the sign-in for 30 minutes.
- If the page says «The server's clock does not match the code's time …», check the server's time (a server that has just resumed from a pause can be behind), then enter the next code. Nothing was counted (5.9.0).
- If the page says «The 2FA record table is full — on the console: sudo /usr/local/lib/codehero/sandbox-ctl auth limits reset», run that command on the server's console. It starts the sign-in counts again empty; the code of that moment is refused, the next one works. Nothing was counted. Root keeps the used codes of 64 different 2FA secrets (5.9.0); a server with one owner never fills it.
- Recovery codes (5.9.0). Phone lost? On the 2FA page click Use a recovery code and type one of your codes (
XXXX-XXXX-XXXX-XXXX; case, spaces and dashes do not matter). The link shows only while you have codes left. Each code works once; using one signs out every other browser and remembered device, this browser stays. A wrong code counts like a wrong 2FA code: one budget of 5 tries for both. The page then says how many codes are left. Phone lost: Settings → Security → Disable 2FA (your password), Enable 2FA with the new phone, then Make new codes. If the page says «Your sign-in changed meanwhile — sign in again», another change came first (a new password, a 2FA change, another code): nothing was counted and no code was used — sign in again. - Security keys (5.9.0). With a key added (Tab 7, «Security keys»), the 2FA page shows Use a security key above the 6-digit field: click it, then touch the key or confirm the passkey. The 6-digit code always works too. A look-alike site cannot use a key's answer — it is bound to the panel's own name and port; the 6-digit code can still be typed into a look-alike site, so check the address first. A key's answer that is not accepted counts like a wrong code (one budget of 5 tries for codes, recovery codes and keys); a cancel counts nothing. «Security keys are paused while the server's web configuration is checked — use the code»: enter the code — the panel checks again within minutes. «That security key's counter went back: it may have been copied»: enter the code, and remove that key if you are not sure. Remember this device works with a key too.
Account Lockout: 5 wrong passwords for one account from one address lock that account at that address for 30 minutes (any spelling of the name counts as the same account). 20 wrong passwords from one address lock that address. Another address is not locked (5.7.0).
- The locks stay when the panel restarts (5.8.0). A restart or an update does not end them. Since 5.9.0 root keeps them in CodeHero's protected store, with the 2FA codes already used.
- A lock ends 30 minutes after it started. Or click Settings → Security → Unlock Account in a browser that is still signed in: your password and a current 2FA code (5.9.0). While your own password and code tries are locked, that Unlock is refused: wait, or use the console's
manage-2fa.sh unlock. - A wrong current password on Settings → Security (the panel password, the MySQL passwords) counts like a wrong 2FA code: one budget of 5 tries (5.9.0).
- Unlock Account and the console's
manage-2fa.sh unlockdo the same thing (5.9.0): every count and lock goes, and a 2FA code already used stays used. The console's unlock works with the panel stopped or not answering too. - If the sign-in page says «Sign-in is unavailable: the sign-in limits cannot be checked …», run
sudo /usr/local/lib/codehero/sandbox-ctl auth repairon the console (the panel also tries by itself every 10 seconds). If it says the sign-in limits are lost or damaged in both places, runsudo /usr/local/lib/codehero/sandbox-ctl auth limits reset: they start again empty, and every lock of before is forgotten. The 2FA code of that moment is refused: use the next one. - If the sign-in page says «Sign-in is unavailable: the sign-in state cannot be saved (…)», the server cannot write the counts (a full disk, for example). Fix the cause it names; the next sign-in tries again by itself. Browsers that are signed in go on.
- One panel process keeps the counts (5.9.0). A second one (a second worker, a manual start) keeps sign-in closed and says that another panel process keeps the sign-in counts. It takes over by itself once the first one has ended.
- Limit: the panel saves the counts at most once a second. With healthy storage a crash can lose about the last second of counts. If storage fails or the protected helper does not answer, new sign-ins stop after 5 seconds («the sign-in state cannot be saved»), and a crash can lose the counts since the last good save. An accepted 2FA code is never lost. After every restart of the panel the next 2FA code is needed.
- If the server's clock was ahead and you corrected it, the 2FA code of that moment is refused once: the next code works, with no restart (5.9.0). A code used while the clock was ahead is refused when its time comes again.
- No way in at all: the console, as a last resort (Section 28, «Locked out — the console»).
Dashboard
The Dashboard is your main control center showing real-time system status.

Dashboard elements:
- System Status — Whether the daemon service is running
- Quick Stats — Active projects, open tickets, sessions today, total tokens
- Recent Activity — Latest ticket updates and completions
- Token Usage — Daily/weekly/monthly token consumption charts
- Update Badge — Green badge appears when a new version is available
The look (v5.1.0+) — every page has the same header, always on top while the page scrolls: the menu, Providers, AI Assistant, the guide, Settings, the mobile chat and Logout (Providers and Settings open on the dashboard from any page). Calm colours that carry a meaning only where there is one (a status, the one main action), clear type, a slow moving background. The colours, fonts and sizes of the whole panel come from one file, web/static/theme.css — its settings are at the top.
Logs page
Logs (top menu) opens the server's logs side by side — CodeHero, the web stack, the system, the containers. Since v4.55.0 four cards at the top show this server now: CPU (busy now, the load average, the cores), Memory (used of total, swap), Disk used and Free space (each disk that holds CodeHero). They refresh every 5 seconds while the page is open; on a phone they sit 2 × 2.
A ZIP of the logs for support (5.7.0). Tick ☐ next to each log you want, then click 📦 Build & Download on the 📦 Diagnostic Bundle panel. The ZIP hides every secret it knows:
- the values of CodeHero's settings, the provider keys, the projects' secrets, the devices' logins and the VPN keys;
- text in the shape of a key or a password: provider keys, tokens,
Bearer …, private keys,password=…, a password inside a URL,MYSQL_PWD=…, the panel's setup code.
Each of them becomes [hidden]. Token counts and ordinary log lines stay. The ZIP's manifest.json says "sanitized": true. A secret that the ZIP cannot recognise (a short password typed into a message) can still be in it: share the ZIP only with people you trust.
Preview keys (5.10.0). The Logs page (a log you read and the live tail) and the ZIP show every project's preview key as [hidden]. The same for the previews' sign-in cookies and the device join codes. The rest of each line stays.
If CodeHero could not read one of its secret files, the values of that file may not be hidden:
manifest.jsonsays"sanitized": "partial".secret_inventory_unreadableinmanifest.jsonnames the file.system-info.txtstarts with aWARNINGline.
Then open the ZIP and check it before you share it.
2. Creating Projects
Projects Page
The Projects page shows all your development projects in a card grid layout.

Each project card displays: project name, type, description, working directory path, open ticket count, provider/model, and quick action buttons.
Create New Project
Click "+ New Project" to open the creation modal.

| Field | Required | Description |
|---|---|---|
| Name | Yes | Descriptive project name |
| Code | Yes | Letters and digits, up to 15 (v4.55.0+; 10 before) — names the tickets (CODE-0001), the folders, the backups. Never used twice: not one another project has, nor one that still holds the backups of a deleted project. A code CodeHero makes from the name uses Latin capitals and digits: a Greek name keeps its sound (Λογιστήριο → LOGISTIR) (5.7.0) |
| Project Type | Yes | web, app, api, cli, library |
| Tech Stack | Yes | php, node, react, python, java, etc. |
| Description | Yes | Brief description of the project |
| Web/App Path | No | Working directory (auto-generated) |
| Provider | No | AI provider (anthropic, openai, grok, qwencloud, etc.) |
| AI Model | No | Developer role (master/senior/junior) |
| Think Mode | No | Extended thinking level |
| Execution Mode | No | Default for new tickets |
| Project Type | Default Path |
|---|---|
web (PHP, HTML) | /var/www/projects/{name} |
app, api, cli, library | /opt/apps/{name} |
A project's folder is under /var/www/projects or /opt/apps, with letters, digits, ., _ and - in its name. The assistant's project create checks the same, and also refuses another project's folder or a folder inside one (5.7.0).
3. Importing Projects
Import existing projects from ZIP, Git, or local path.

| Mode | Description | Use When |
|---|---|---|
| extend | Copy files into project path | Continue developing the project |
| reference | Store separately as template | Build something similar |
| Source | Examples |
|---|---|
| ZIP | URL or local path to ZIP file |
| Git | Repository URL (public or private) |
| Path | Local folder path (fastest for large projects) |
The assistant's import takes a local folder or ZIP only from the project's own folder or an upload folder: the big upload (📦 Import → Upload File), the assistant's attach, the companion's attach (5.7.0). /tmp and another project's folder are not accepted. To use another project as a reference, give its backup ZIP (uploaded) or its git address.
Imports by URL (5.8.0). A ZIP address or a Git address must be on the internet. An address on your own network (192.168.…, 10.…, localhost …) is refused with «Local network imports are disabled».
- This applies to the assistant's import and to the Git Manager's Clone (Section 19).
- Every redirect of a ZIP download is checked too.
- A local ZIP, a local folder and an upload are not affected.
- To import from a server you trust on your own network: Settings → system.conf → add the line
ALLOW_LOCAL_NETWORK_IMPORTS=true→ Save & Restart (Section 28). It is off by default.
Imports while the maintenance control is on (5.8.0). The switch Keep AI work on the maintenance copy (Settings → Security → 🛡 Protections, Section 28) is off at the start. While it is on:
- An import by URL (a ZIP or a Git address) and the Git Manager's Clone are refused before anything is looked up or downloaded. A public address too. The assistants' import too.
ALLOW_LOCAL_NETWORK_IMPORTS=truedoes not change this.- A project set Off for this project (its page → 🛡 Security — Protections) keeps these imports, into its own folders.
- Upload the ZIP instead: Projects → 📦 Import → Upload File → Import Project. For files of an existing project: the project page → Upload Files («Click or drag files here to upload»). Then give the assistant that uploaded ZIP as its local source.
- Create maintenance copy still needs a Recovery copy (Create maintenance copy). An uploaded ZIP does not replace it.
- Do not turn the switch off just to get past a refusal: upload the ZIP.
With the switch off, an import by URL works as above (Imports by URL):
- A ZIP download connects only to the address it checked, checks the certificate's name and each redirect, and uses no proxy.
- A Git address is checked before the clone starts. The clone's later connections are not checked.
On or off:
- An imported file is opened without following links. A link, or an upload that is not finished, is refused: choose a finished file.
- A file taken from the server (the assistant's local ZIP, a path on the server) is copied once before it is read. That copy needs free disk space. A file that changes while it is copied is refused.
- The archive checks still apply.
- An import that stopped, or whose start could not be confirmed, never runs again by itself. Check its result in Projects → 📦 Import before you start another one.
An encrypted backup (5.10.0). A backup you downloaded with a backup encryption key ends in .age (Section 4, «Encrypted and plain downloads»). To bring it back, use Projects → 📦 Import → Upload File and give the key with it (5.13.4). Every other door refuses an encrypted file, also a renamed one, before anything is written: «This file is encrypted (.age). Decrypt it on your own computer first: age -d -i key.txt <file>.age > <file>. Then import or restore the file you get.»
- The key. Choose the file
key.txtof the backup encryption key that made the backup (you made it on your own computer), or paste its one lineAGE-SECRET-KEY-1…. It must be the private key. The public key (age1…) cannot open a backup: «This is the public key. The import needs the private key file key.txt (AGE-SECRET-KEY-…).» - What the server does with it. It uses the key once, in its memory, to open the file. It never writes it down: not on the disk, not in the database, not in a log, a message or a ticket. The plain backup is made next to the upload under a temporary name; when it is whole, the import goes on with it exactly as with any ZIP, with all its checks.
- A wrong key. «This key does not open this backup. Use the key.txt of the backup encryption key that made it.» Nothing is imported and nothing is left.
Git Private Repositories
| Platform | Username | Token Type |
|---|---|---|
| GitHub | Optional | Personal Access Token (PAT) |
| GitLab | Not needed | Personal Access Token |
| Bitbucket | Required | App Password |
The app's database (v4.55.1+) — an import of a backup made with 4.55.1 or later keeps the project's database name, user and password, so the app's own configuration (.env …) works unchanged: a container project gets them inside its new container (its own MySQL); a host project gets them when this server has neither that database nor that user — otherwise new ones, and the result says so (update the app's configuration, or ask a ticket to do it). Older backups still restore with new names.
The project code (v4.55.0+) — an import never takes a code another project has, or one that still holds the backups of a deleted project (the new project would take them over): a code CodeHero makes gets 2, 3, … at the end; a code you type that is in use stops the import with a message, before anything starts, so you can choose another.
A project code in Greek letters (5.13.4) — this server takes a new code only in Latin letters and digits (A-Z, 0-9, at most 15). A backup whose project had a Greek code, restored or imported as a new project without a code of your own, gets its code in Latin letters by their sound, once: ΟΚΑΠΤΕΝΤ32 becomes OKAPTENT32. The answer says so: «The project code ΟΚΑΠΤΕΝΤ32 became OKAPTENT32 (this server takes only Latin letters and digits)». If that code is already in use, the restore stops before anything is made, and you type another in Advanced options → Project Code. A project that already has a Greek code keeps working: its preview answers with its key, and the ticket sandbox prepares it.
Moving a project to another server (5.16.2) — what an import tells you, and what it does by itself:
- A web app in a container starts with its own command. IF a ticket gave the app its own start command (for example
sudo systemctl start myapp.service), THEN the import keeps that command, also from a backup of an older version (5.1.x). Before, the import put a starter app in its place. - A home page
index.htmlopens. A project with its own PHP showed «File not found.» (404) for its folder when its home page wasindex.html. Now the preview and a live domain tryindex.htmlfirst, thenindex.php. A live domain whose folder has BOTH files keepsindex.php, as before. - A PHP version this server does not have. The project now really runs on the server's PHP until you install that version in its PHP settings (before: 502). Install it there when the code needs it (for example
imapon Ubuntu 26.04). - From ARM to x86 (or back). The container's services are installed for THIS server. The app's own built folders (a Python
.venv,node_modules, a compiled program) come from the old server: the import names them. Build them again on the new server (a ticket can do it). - An older container backup. A cache without a version gets the newest version this server offers; a web app named
nginxis left out (nginx is built in). What this server can never install (a worker type it does not offer, a custom service written for another architecture) is named in the result and no longer makes the container keep root. - A database no project owns. IF the app's config (
.env,config.php,wp-config.php…) names a database of this server that belongs to no project, THEN the backup says so: it is NOT in the backup. Move it yourself, or make it the project's database. .secretsof an older backup. A backup made before 5.13.4 cannot tell whether the project had.secrets: the import says «IF the project had secrets, add them on the project's 🔐 Secrets page».
Large backups (any size) (v5.4.0+)
A backup of any size can be imported from the panel or from the server's terminal. The import runs on the server as a job of its own: closing the browser tab or the terminal does not stop it.
- Projects → 📦 Import → Upload File: choose the backup (
.zip) or a container image (.tar.zst) and click Import Project. An encrypted backup (.zip.age,.tar.zst.age): choose it too; a box Key for this encrypted backup opens, where you choose yourkey.txtor paste itsAGE-SECRET-KEY-1…line. - The file goes to the server in pieces of 32 MB. The bar shows how much has arrived, the speed and the time left. A dropped connection tries again by itself; after a reload, choose the same file again and the upload goes on.
- Then the import starts by itself and its log shows live. Closed the window? Open 📦 Import again to follow it.
A file already on the server (copied with scp, e.g. into /var/backups/codehero/uploads/): 📦 Import → Server Files.
Room first (5.13.4)
An import, or a «Restore as a new project», from a file on the server checks the free disk first.
- The rule: free disk must be 3 × the file size + 1 GB. An upload uses the same rule.
- If it does not fit, the import stops at once. It shows the numbers. It writes nothing.
- The rule is a check. It is not a reservation. Another job can take the room later.
- If the import fails or stops inside CodeHero, it removes its own half copy.
- If the panel is killed or the power is cut, the half copy may stay. The panel removes it at its next start. It removes an import folder that has no status, no running job and no change for 1 hour.
A backup checks the disk too.
- It estimates the size of the ZIP from the project's files. It counts file sizes only. It does not count the databases.
- If the estimate + 512 MB does not fit, the backup is refused at once. The answer shows the numbers.
- If it cannot make an estimate (a folder is not readable in time), the backup starts.
- While it writes, it checks the disk. If the disk gets full, the backup stops with a clear message.
From the terminal (for users who know Linux) — Ctrl+C on --follow stops the following, not the import:
sudo bash /opt/codehero/scripts/import_backup.sh /path/to/backup.zip [--name NAME] [--code CODE] [--web-path P] [--app-path P] [--provider X] [--follow]
sudo bash /opt/codehero/scripts/import_backup.sh --follow <task>
sudo bash /opt/codehero/scripts/import_backup.sh --list
The progress is written to /opt/codehero/scripts/install_logs/import_<task>/log.txt (follow it with tail -f), the state to status.json beside it. A huge project can take hours; the panel's 📦 Import window shows the same import.
4. Project Detail Page
Click on any project to view its detail page. The page is organized in collapsible sections.
Overview

The top section shows project info (name, type, tech stack, description), database connection details with copy buttons, preview URL, quick action buttons (Code Editor, Git Manager, Progress Dashboard, phpMyAdmin, Export, Context Settings, Archive), and usage statistics (tokens, time, completed tickets).
Production Deployment
Deploy the project to a production-ready nginx config with its own domain or subdomain. Includes SSL certificate management.
Container Isolation (LXC)
Run the project in its own isolated LXC container with dedicated services. See Section 31 for full details.
PHP Settings
Configure the host-level PHP version and .user.ini for projects running directly on the host via nginx:
- PHP Version — Select and install any PHP version (7.4–8.5). Installs automatically and updates nginx config.
- Preview PHP settings (5.16.6) — shows what the preview runs with and takes your own lines
key = value; press Save preview settings. The JIT andopcache.validate_timestamps = 0are refused there. The live site's settings are in Section 32. - .user.ini Editor — Edit PHP settings (
upload_max_filesize,memory_limit, etc.) with inline or fullscreen editor.
Which one to use (5.16.6). Three places take PHP settings:
| Preview PHP settings | .user.ini | Production PHP for this domain (§32) | |
|---|---|---|---|
| Where it applies | The preview only | The preview AND the live site (a file in the project's folder) | The live site only |
| When it applies | At once (Save) | Within 5 minutes (PHP reads it again every 300 s) | At once (Save PHP settings) |
| What it takes | Almost every setting; never the JIT or opcache.validate_timestamps = 0 | Only per-folder settings (memory_limit, upload_max_filesize, post_max_size, max_execution_time, display_errors …), never a whole-server one | Every setting, the JIT too |
| The same setting in two places | Wins over .user.ini | Loses to the other two | Wins over .user.ini |
| Moves with the project | No (this server keeps it) | Yes: backups, Git, another server; a ticket can change it | No (this server keeps it) |
- Preview AND live site, and with the project wherever it goes →
.user.ini(example:upload_max_filesize = 50M). - Only the preview → Preview PHP settings (example:
display_errors = Onwhile you build). - Only the live site → Production PHP for this domain (example:
opcache.jit = offwhen you see a problem). - Example:
memory_limit = 256Min.user.iniand512Min Preview PHP settings → the preview has 512M, the live site 256M. .user.iniis never sent to a browser (403). An older project on the server's shared PHP uses.user.inionly.
Schedule (host projects, 5.13.4)
A host project that must run something on a schedule keeps a file .codehero/crontab in its root folder: one job per line, five cron fields in UTC and then the command. A ticket writes it (it never changes the server's crontab, which a ticket in the sandbox cannot do); CodeHero checks it and runs each job as the project's own account inside the ticket sandbox, at most 5 minutes a run and never two runs of one job at once. The project's Schedule card shows each job, its state (Pending, Active, Disabled or Error with its reason), the accepted revision, the next due time and the last result; Enable and Disable are the owner's. A restored, imported or copied project's schedule waits for your Enable. A container project keeps its own cron.
A build ticket that works on a schedule reads the project's schedule with a read-only tool, codehero_schedule_status (5.17.0): the same state the Schedule card shows. It only reads: Enable and Disable stay yours.
Context Settings
Customize the AI context for this project: select tech stack to load defaults, edit global context (universal rules) and project context (language-specific patterns). Global Context v6.2 is a core plus on-demand guides (planning, verify-fix, asking, update, helper, debugging, frontend, database, build, testing, native, release) that the agent opens with the codehero_get_guide tool; they live in /opt/codehero/config/guides/ and are loaded automatically into [PLAN], [REPLAN], [VERIFY], [FIX], [HELPER], [PEER] and [WORKER] tickets.
Project Files

Upload files via drag & drop, browse the directory tree with folder navigation, delete files, and use the subdirectory filter. Includes Refresh and Pop Out (open in new window) buttons.
Database Editor

Each project gets its own MySQL database. Four tabs: Tables (clickable cards with row counts), Structure (column definitions), Data (browse with pagination), SQL Query (run queries directly).
Backup & Restore

| Level | Contents | Use case |
|---|---|---|
| Quick (files+DB) | Project files and the project database — in a container project also every database of the container (v4.54.0+) | Fast daily backups |
| Full (+ services) | Quick + the container's services configuration and port forwards | Full project state |
| Complete (+ tickets) | Everything plus tickets, conversations, the knowledge graph and the token statistics (tokens and time per project and ticket, v5.16.4) | Migration between servers |
Additional features: container image export/import (since v4.55.0 only the image's data is read — a 50 GB disk holding 3 GB reads 3 GB — and an import gets a sparse image back; since 5.8.0 an export of a stopped container leaves it stopped, and nothing is exported from a disk that is still in use), backup history with download/restore/delete, and upload & restore from another server.
Faster (v4.55.0+) — lighter compression (2–3× faster for a few % more size); in a container project its own database, which lives in the container, is saved once (it used to be saved twice); the panel stays responsive while a backup runs; the backup at a ticket's close no longer holds up the other projects' tickets (only that project's next ticket waits for it). Every backup notes how many seconds each step took.
Automatic / Kept / Safety — the Backup History has three tabs. Automatic: made by the platform (ticket close, auto) — the newest 20 are kept (any number; 0 = all). Kept: Quick / Full / Complete, image exports and every 📌 kept backup — never deleted automatically. Safety: taken right before a restore — the newest 5.
Nothing missing without a word (v4.54.0+) — every ZIP backup is made in one pass (no temporary copy; photos, videos and archives are stored as they are), keeps symlinks, empty folders and file permissions, and saves the project database with its procedures, functions, triggers, events and views. Whatever could not be saved — an unreadable file, a database that could not be dumped, a stopped container — is listed: ⚠ next to the backup in the list (hover for the details), in the result of the button and of codehero_unified_backup. A database with a broken view is still saved (only the view is skipped, and named). A backup shows in the list only once it is complete.
One-click moves (5.16.3) — a restore or an import brings back more of a moved project. The links of a Python venv (to /usr/bin/python3.x or /usr/local/bin/python3.x) and of Node's tools (/usr/local/node<N>/bin/node, npm, npx) come back; every other link that leads out of the project stays refused. An archive of a container WITHOUT root restores without root, whatever its services; an old container (with root) is converted only with your tick, as before. A container's own systemd units and nginx sites (made by tickets inside it) travel in the backup; the restore enables and starts them as they were, after it checks nginx. A 5.1.x backup keeps its web app row «nginx», so the preview's route works. The web server can list the project's root folder (r-x), which removes nginx's [crit] lines on every home page; the .secrets folder stays closed. A restore or an import as a NEW project (the panel, or an API restore with the purpose «move») also brings back the site's firewall settings AS THEY WERE (its live and preview modes, «Allow this» exclusions, address lists, sensitivity) and its production domains. Each domain gets a certificate: the one this server already has for the name; else the backup's own (a Let's Encrypt certificate comes with its renewal, so it renews by itself once the domain's DNS points to this server; an uploaded one as it is); else a temporary self-signed one - after the DNS points here, press Change certificate → New Let's Encrypt certificate on its domain card, or upload your own. A name another project of this server already has is not added. The restore never waits or fails for a domain or a certificate: the summary says what to do. A restore over the same project, a maintenance copy and an API drill change no domain.
Any size, in a stream (v5.0.6+) — backups, restores and imports read and write in a stream: the panel's memory stays near its own size whether the project holds 1 GB or 100 GB. Export Project and Restore run in the background and the page follows them; the Export then downloads as a normal file. A restore first checks there is room on the disk to unpack the backup, and files get their original times back.
A safety copy before every restore (v4.54.0+) — a restore into the project first takes a Safety snapshot of the whole container (container projects) and a complete ZIP backup of the files and every database; if that copy cannot be made, nothing is restored. Importing a container image into the project takes the ZIP copy first (the image replaces the container's snapshots too). A backup restored as a new project brings its database objects along — their owner becomes the new project's database user.
A restore that did not finish says so (v5.11.3+) — the panel restarts, the server crashes or the power goes in the middle of a restore or an import. Then the project page shows a red notice: «The restore of backup_SHOP_20261106_081500_L3_manual.zip did not finish (2026-11-06 08:15:00 UTC). Some files may come from the backup and some from before it. Restore it again, or go back with the safety copy backup_SHOP_20261106_081501_L1_pre-restore.zip (Backups → Safety copies). The project's tickets wait until you choose.» A snapshot restore says «The snapshot restore of … did not finish … Restore the snapshot again.» A project that was being restored or imported as a new project says «This project was being restored / imported when it stopped. Delete it and import the backup again.» An import into the project (codehero_import_project, mode extend) says «The import into this project did not finish … Import again.» The notice has two buttons: Restore again (it opens the restore of the same backup, in the Backups list) and I checked it — dismiss. The Projects list shows «⚠ restore did not finish» on the project's card.
- While the notice stays, no ticket of the project starts. It says: «Not started — the restore of this project did not finish: restore it again or dismiss the notice on the project page — it starts again by itself.» A ticket that already runs is not stopped. When a restore ends well, or you dismiss the notice, the tickets start again by themselves, with the sandbox on or off.
- A try that is refused (a missing archive, a safety copy that could not be made, a locked project, an archive with nothing to replace) never removes the notice. Only a restore that ends well, or your dismiss, does. Dismiss is refused while the restore or import is still running («A restore or an import of this project is still running: dismiss the notice after it ends.»): it could still be cut, and the notice must then be there. After a cut, or a restore that failed, it works.
- The restore's task in Projects → Import does not say «running» for ever: «The restore stopped before it finished (the panel restarted). The project page says what to do.» An export that was cut says «The export stopped before it finished. Start the export again.»
- Two moments are still not safe from a cut, and the notice names them: the project's tickets are deleted and then restored (a cut between them leaves the project without tickets), and the project database is dropped and then loaded (a cut between them leaves it empty or partly filled). Restore again.
- A container snapshot restore and a container image import keep their own record: Disk held (Section 31).
An older backup and its database login (v5.11.3+) — a project imported from an older CodeHero's Export (the migration file) keeps its database name, user and password when they are valid and free on this server, so its site connects at once; otherwise it gets proj_<code> and a new password and the answer says so. A backup made before 4.55.1 does not record the database login: after restoring it as a new project, update the app's configuration (or ask a ticket). The answer names the database the app's configuration may still use. A database that could not be made or loaded is said in the answer too.
A restore never stops on a setting (v5.12+) — a missing or unknown setting in a backup takes its default, the restore goes on, and the answer names it. A backup with no format version is read as format 3.0. One made by a newer CodeHero is restored when its layout can be read, and the answer says «made by a newer CodeHero»; if its layout cannot be read, it is refused with that sentence. A value this server does not know (a project type, a role, a think mode) takes the default of its column. A damaged file is no setting: «This backup is damaged: its manifest or its layout cannot be read. Nothing was changed, and the file stays as it is.» A file with a backup manifest is never imported as plain files: the panel's Import and the assistant's import from a backup use the same check.
The tickets of a backup come back whole, or not at all (v5.12+) — a Level 3 restore replaces the project's tickets, dependencies and messages in one step. It checks them first. A ticket number that is there twice, a parent or a dependency that is not in the backup, or a message file that is cut stops it: the project keeps the tickets it had, and the answer says why. A status this server does not know comes back as skipped, so that ticket never starts by itself. A backup without tickets leaves the project's tickets as they are.
A project whose database is gone (v5.12+) — the safety copy still needs the whole current database. If the project's own login cannot save it, CodeHero asks this server's MySQL whether that database is there (only for a project on this server: never for a container project or a remote database).
- It is not there: the restore goes on, makes the database and loads the backup by the project's own login. The answer says «the project had no database». An existing login keeps its password; a new one is made only when no account of that name exists at all.
- It is there and cannot be saved whole, or the question cannot be answered: nothing is restored: «the current database could not be saved whole: start the service or check the database login on the project's Edit form, or use Restore as a new project».
- The account exists and the saved password does not work: nothing is restored: «the saved database password does not work: put the right one on the project's Edit form and restore again, or use Restore as a new project».
- A dump that had to skip something (
mysqldump --force) is no way back: the restore is refused. A backup you download keeps it, with its warning.
A container image without readable metadata (v5.12+) — a .meta.json that cannot be read counts as a missing one, and the answer says so. The image's architecture is then read from its own disk. If the disk does not tell, the import is refused and the previous container comes back.
What the ZIP backups leave out — an editable list, one pattern per line: .secrets and the dependency / build / cache folders (node_modules, vendor, .git, dist, …) by default. A name matches a folder or file with that name anywhere; a path (public/uploads) that folder from the project's root; * and ? are globs (*.mp4, uploads/tmp/*). Quick / Full / Complete use every line; Export and the automatic backups use only the .secrets line. The list saves itself as you type (removing the .secrets line asks first); Defaults brings it back.
The secrets in a backup (5.13.4; before, a checkbox)
The line Secrets: … under the backup buttons says whether the next backup or Export Project carries .secrets/, and why.
- Included: when the backup encryption key is set, or when you removed
.secretsfrom the exclusion list. - Not included: when there is no key and
.secretsis in the list. To include them, remove it from the list, or set the key. - A backup that carries them shows a 🔐 secrets mark in the list. A restore puts them back.
- A backup kept on the server is whole.
- Download encrypted (key set; we recommend it): the whole backup, encrypted.
- Download plain (key set), or Download (no key): the backup as it is, WITHOUT
.secrets/(also inside a custom service's archives). - A plain copy keeps everything else exactly as it is: your app's own files, the databases, the ticket history and every password.
- A restore of a plain copy keeps the passwords it carries. You add the secrets again on the project's 🔐 Secrets page.
- If you removed
.secretsfrom the exclusion list, a plain download is the whole backup. The page says which it is before it starts. - The secrets folder on the host is never in a project backup.
- The site's SSL certificates (5.16.3) travel with the secrets. To have them also in a plain ZIP, tick Include the SSL certificates in a plain (not encrypted) backup under the Left out of the ZIP backups list (off by default; it saves at once). Keep that ZIP in safe storage: it holds private keys.
- A backup made through the REST API is always encrypted and carries
.secrets/unless the request says"secrets": false.
The container's database accounts (v5.4.0+) — every backup of a container project also saves the MySQL / MariaDB accounts of its services (each user with its password hash and its grants). A restore or an import creates them again, so an app that logs in with its own database user works on the new server unchanged.
SQL Server's logins travel with its databases (5.13.5) — a backup of a container project with SQL Server now also saves its logins, with their password hashes (never a plain password), beside the databases. sa and disabled logins are not saved.
- A restore or an import creates the logins BEFORE the data, and connects the database users to them. The app's login works on the new project at once.
- A login that is already there keeps its password.
- If a login cannot be read, the backup says its logins are NOT in it, and it is not called a recovery copy.
- A backup older than 5.13.5 has no logins. The restore connects the project's own login again (
DB_USER). Another login your app used must be made again. The restore says which users have no login. - Known limit: SQL Agent jobs live in the server's
msdb, not in a database. A restore as a new project or an import does not bring them, and does not say so. Make them again on the copy. (The Agent does not run on the Express edition; it does on Developer, Standard and Enterprise.)
A restored web app keeps its port and its start command (5.13.5) — a web app of the Services tab comes back from a backup with the port and the start command it had, and starts with them. Before, a restore as a new project gave it the default port (a Node app that listened on 3000 got 5001) and the copy answered 502 until you set the port on the Services tab. If the port is taken, or the start command cannot be applied, the answer of the restore says the step, for example «set the port of <name> to <port> and press Restart». A backup older than 5.13.5 gives its port back, and its start command stays the install default.
A container's cron jobs travel with its backup (5.13.4) — a backup of a container project keeps the crontab of each user of the container (the platform's own boot line is left out). A restore or an import installs them in the new container, with the project's folder name changed when it changed, and the result says «cron jobs restored for …». A drill keeps cron stopped, as before: its jobs are installed and wait. A backup made before 5.13.4 has no jobs and restores exactly as before.
A trigger whose statement ends with ; restores (5.13.4) — before, the dump of such a trigger could not be read back (ERROR 1064 … near ' */'): the restore stopped there, the rest of the database stayed out, and the answer said «done». Backups now write the readable form, and an older backup is corrected while it is restored.
DATABASE PARTIAL (5.13.4) — a database step that fails is never a plain «done». The restore in the panel, the import and the restore of the API (the field database_partial) say DATABASE PARTIAL and name the first error. Nothing is rolled back: the files and the rest are restored, but what the dump holds after the error is missing. If you see it, import or restore the backup again, or ask a ticket to load the dump.
What a container ZIP does not carry (5.13.4)
- A ZIP of a container project holds: the project's folder, the databases, and the services the platform registered.
- A ZIP does NOT hold: systemd units a ticket made in the container, nginx sites a ticket made in the container, and packages a ticket installed outside the project's folder.
- The backup says it: «not in this backup: units …; nginx site … — use a container image (live image) to carry them, or register them as the project's services».
- Such a backup is «Partial — not a verified recovery copy». A Recovery copy is Partial too. The reason is on hover.
- A restore, an import and an API drill show the same sentence.
- A drill says «its preview answers» only when the preview answers with an HTTP status below 500. The page's content and its database are not checked.
- If the app needs those units, do one of these: use a container image (live image), or ask a ticket to register the workers and the web app as services of the project.
A Recovery copy and a ticket's own services (5.13.4) — the Recovery copy pauses the services a ticket made in the container too (a timer that starts them again is armed first), and the copy names them. If one of them cannot be paused, or ran again during the copy, the copy is «Partial — not a verified recovery copy» and says which.
A restore says what the backup left out (5.13.4) — its answer repeats what the backup itself recorded as missing, never a bare «Restored». A new project from a backup that recorded its secrets as left out says so (add them on the project's 🔐 Secrets page); an older backup may not have recorded it, and then says nothing about it. An older container backup (before 5.4.0) says the database users other than the project's are not in it: create them again. «Left out when the backup was made: …» repeats the backup's own warnings (three, the rest counted). The panel, the import, the assistant and the API say the same.
Port forwards after a restore as a new project (5.13.4) — a container backup lists its host port forwards, but a restore as a new project (the panel, an import, the assistant) and a fresh image import (a container image imported as a new project) open none of them: a backup from anywhere must not open a port of this server. Each comes back OFF, the answer says «Port forwards from the backup are kept OFF: …», and the project's Container tab shows each as OFF with Open. If you want one, press Open: it is checked like any new forward. A restore over the same project keeps its own forwards, and the API restore lists them as before (not moved).
A killed backup leaves nothing behind (5.13.4) — a backup cut in the middle (the panel killed, a power cut) used to leave a .partial file as big as the backup, and a .work folder, for good. The project's next backup removes them first (only its own, in its backup folder and its Kept folder; a backup that is still running is never touched).
The semantic search index — a Complete backup carries it, and an import reuses it. On a server without semantic search (or with it off for the project) the index is kept beside the project's backups and used — not built again — as soon as semantic search is turned on for the project with the same model (Settings → 🧠 Semantic search). The import log, the project's Semantic search box and codehero_semantic_status say it in one sentence: «This project came with a search index (model <name>). Install <name> on this server and it is used at once, without a rebuild.» Installing a model, from Settings or by the MCP tool, makes the server look at every project with semantic search on at once, so the kept index is used within moments.
Links in a restore (5.7.0) — restored as a new project, a link inside the project that pointed into the project's own folder (Laravel's public/storage) comes back, as a relative link; other absolute links are left out and named in the result. Restored into the project, a link where the backup has a file is replaced by the backup's file, and the link's target is not touched; where the backup has a folder, the result says «cannot overwrite non-directory» for that path.
Recovery copy (5.8.0, container projects) — the button beside Complete, under Create Backup: the copy that can bring the app back on another server. It is a Complete backup with the secrets (.secrets/). While the files and the databases are saved, the app's own services (web apps, workers, PHP-FPM, custom services) and the container's cron are stopped; the databases keep running, so every database and the files are from the same moment. At most 30 minutes: then the container starts them again by itself, also if CodeHero stops on the way; when the copy is done they start at once. The copy is then checked — every folder, every database, the custom services, the services' settings and the secrets are in it, nothing is left out, every problem is named, its bytes match its own list — and the page shows how it ended and the copy's SHA-256 (compare it after the download; with a backup encryption key set (5.10.0) it says «SHA-256 of the decrypted ZIP»: compare it after you decrypt). A stopped container cannot give one: start it first. Right after a Start a service may still be starting: the copy looks again for a few seconds; if it still cannot tell whether the service runs, it stops none of the app's services and says so — press Recovery copy again in a minute. It is refused while a ticket of the project runs, or of a project it allows (Project links), and none of their tickets starts until it ends (one copy of a project at a time); meanwhile its services cannot be started from the panel, and the assistant and the companion only read the project. A cron job that already runs goes on after cron stops: the copy waits up to a minute for it to end, else it is Partial. A file that cannot be read, or the container's database accounts that cannot be saved, keep it Partial. Make it while nobody works on the project: a command the assistant started before the copy, or your own work in the Code Editor or a shell, is not stopped by it. The project's secrets folder on the host is never in a project copy (the installation's own copy holds it): when the project has one, the button asks where you keep a copy of it — without an answer the copy is Partial. Processes started by hand and timers you added yourself in the container are not paused.
Recovery candidate or Partial (5.8.0) — each ZIP in the Backup History says which it is. «Recovery candidate — not yet restore-tested»: a Recovery copy that passed the check. «Partial — not a verified recovery copy»: every other backup — still useful, but not proof that the app comes back on another server (hover for the reason). «Verified» also needs a restore of that kind of copy on a blank server.
The installation's own copy (5.8.0) — a project copy does not bring back the installation itself. On the server's console: sudo /opt/codehero/scripts/platform-copy.sh saves the platform database, /etc/codehero, /etc/codehero-security, /var/lib/codehero-security, the projects' host secret folders, the device keys, the domains' certificates and the VPN hub into /var/backups/codehero-platform/, checks it the same way and prints its SHA-256. It holds every secret of the installation: the panel never makes or shows it, and it is never restored as a project. Copy it off the server yourself, over SSH. With a backup encryption key set (5.10.0) it also writes <name>.zip.age beside it, encrypted for your key: take that file off the server. The plain ZIP stays: this server's own restore uses it. The SHA-256 it prints is then the decrypted ZIP's: compare it after you decrypt. Exit code 3 means the plain copy is made but the encrypted copy failed; the line says why.
Bring the installation back on a new server (5.8.0) — on a blank server with the same release installed, on its console: sudo /opt/codehero/scripts/platform-restore.sh restore <platform_….zip> --purpose drill (a test server) or --purpose replacement (the old server is gone). An encrypted copy (.zip.age) is refused: decrypt it on your own computer first, then copy the plain ZIP to the new server. A Partial copy changes nothing. The installation is held before anything loads: no ticket, review, worker, container or certificate renewal runs, the panel changes nothing (every page says «Recovery checks pending»), the assistants only read. The copy's settings, keys and certificates come back, this server keeps its own database login, the copy's protected folders are kept aside. Its «Ticket sandbox» switch is set to what the copy had (on or off) before the restore ends; the other protections stay as this server has them. A drill also leaves out the copy's Telegram bot, device logins, VPN hub and certificates. Every unfinished ticket of the copy waits for you: nothing runs, reviews or wakes it by itself. A note in the ticket says so: send a message to run it again, press Start Now or Reopen, or close it. The copy's sign-ins are closed: its passwords, remembered devices and sessions do not work. Then … reset-access (the owner's new panel password, typed on the console; then sign in and look — nothing changes yet), … check, … request --intent "…" (a replacement also --fenced "…": how the old server is stopped) and … activate; … status says where it is. A command cut half-way: run it again. Each project comes back from its own Recovery copy (Projects → 📦 Import).
Encrypted and plain downloads (5.10.0, two buttons in 5.13.4)
- Set your own backup encryption key once: Settings → Security → Backup encryption key (Section 28).
- If a key is set, every backup download from the panel shows TWO buttons:
| Button | What you get |
|---|---|
| Encrypted (first, recommended) | The whole backup. .secrets is in it. A .age file. Only your private key opens it. |
| Plain | The backup as it is, WITHOUT .secrets. Everything else stays, passwords included. |
- If no key is set, there is one button, as before.
- No file is changed, and no password is removed from a database or a file. Example: a secret a ticket copied into
config.iniorwp-config.phpstays there, in both buttons. - A service dump (the Services tab, not a ZIP) is always encrypted when a key is set.
- The REST API is unchanged: it gives a backup only encrypted.
- The two buttons cover the Backup History (Automatic, Kept, Safety, Recovery copies, container images), Export Project, migration exports and the backups of deleted projects.
- The name of an encrypted file gets
.ageat the end. Example:backup_SHOP_20261030_211500_L3_manual.zip.age. - The private key never comes to the server.
- To open it, run on your own computer:
age -d -i key.txt <name>.age > <name>. Then use the file as before. - The Backup History says it on every visit: «🔒 Encryption: on. …» or «Encryption: off. …»
- The files on the server stay plain: the server's own restores use them.
- If the key cannot be read, or the program age is missing, the Encrypted download is refused with the reason. It is never sent plain.
- Import of an
.agefile (5.13.4): Projects → 📦 Import → Upload File, with your private keykey.txt(Section 3, «An encrypted backup»). Every other door still refuses an encrypted file: decrypt it on your own computer first. - A download from Project Files stays a plain file.
Secrets
Passwords, keys and tokens that you give to a ticket are kept as files in .secrets/ at the project root:
| Where | .secrets/ |
|---|---|
| Git | Left out — a .secrets/ line is added to .gitignore once. Delete it in the Code Editor to commit them; it is not added again. |
| ZIP backups, Export | Left out — remove the .secrets line from the list in Backup & Restore to include them. |
| Restore of a ZIP backup | The current .secrets/ is kept; a backup that contains secrets puts its files back. |
| Local snapshots | Kept (snapshots never leave the machine). |
| Container image export | Included — the image is the whole container disk. |
A ticket uses a secret by its name and its path (5.13.4)
| Question | Answer |
|---|---|
Which .secrets/ does a ticket use? | The .secrets/ of its own project. On every AI route. In a host project and in a container with root. |
| How does it use a value? | BY PATH. Example: ssh -i .secrets/<key> or . .secrets/<set>.env. |
| Does it see the value? | CodeHero checks what it shows the AI and hides a value it knows (it shows [secret: NAME] and the rest of the output). From 5.16.0 it checks every request that leaves for the AI provider too. A value it does not know is not hidden. See «Secrets: what the protection does, and what it does not» below. |
May it print a file of .secrets/? | No (5.18.0). A cat, head or tail of a file there, or a Read of it, is refused, and the refusal tells the ticket the way: the PROJECT DATABASE block, the file by its path, codehero-secret put, and grep -c to check that a key is there. A public key (.pub) may be shown. |
| May it copy a value into the app? | Yes, with ONE command: codehero-secret put <KEY> <file> <placeholder> --as php|env|ini|json|plain. It copies the value without showing it. |
Which account reads .secrets/? | Only the project's own ticket account. Never the web server's account (www-data), a group or a linked project. |
Does the app read .secrets/? | No. The app reads its own config or .env. |
The platform also keeps the project's database login in two files: .secrets/codehero-db.env and .secrets/codehero-db.cnf. It rewrites them at each ticket start. A ticket uses them by path. It does not need the password, and CodeHero hides it from what the AI sees.
Example. A ticket puts the database password in wp-config.php:
- It writes
__DB_PASSWORD__inwp-config.phpwith the Write tool. - It runs
.heroagent/bin/codehero-secret put DB_PASSWORD wp-config.php __DB_PASSWORD__ --as php. - The command writes the value into the file. It prints nothing.
If you upgraded to 5.13.4, every project that has a .secrets is prepared once more, in the background. Its tickets wait with «Not started — the sandbox of this project is being prepared — it starts again by itself.» You do nothing.
More protection — a folder on the host. The Create button in the 🔐 Secrets panel makes /var/lib/codehero/secrets/<CODE>/, outside the project: never in git, a backup, an export, the container image or a snapshot. Only this project's tickets can use it; in a container project it is visible inside the container at the same path (the button restarts a running container once, never while a ticket of the project runs). While Apply security or Remove security runs on that container, the button answers «try again in a minute» (5.8.0). It is deleted together with the project.
The Secrets menu (v4.52.1+) lists every file of both places, below in the same panel:
- + New set — values for one service, e.g.
facebook: per row a kind (Username, Password, API key, Token, Other) that suggests the name (FACEBOOK_PASSWORD), an optional note and the value. Saved as.secrets/<name>.env,KEY='value'lines, mode 600 — a command reads it withset -a; . .secrets/facebook.env; set +a. - + Login — a username and a password together (
FACEBOOK_USERNAME+FACEBOOK_PASSWORD); a second login in the same set asks for a prefix. - Where — in the project (
.secrets/, read by the project's tickets; the web server's account never reads it, and an app's run-time settings live in its own config or.env) or in the host folder (only the tickets' commands). - Values stay hidden — names only; 👁 shows one value for 30 seconds; Edit keeps every value left empty.
- + File uploads a key file, JSON or YAML; Edit as text opens a text file. A file of its own shape is shown as a file — the menu never breaks on it; BOM / CRLF are flagged.
The secrets filter (v4.53.0+) — the values you keep in .secrets/ and in the host folder are protected, subject to the kinds and limits below:
- The kind decides. 🛡 Password, API key, Token, Other secret; visible to the AI: Username and Setting (host, port, URL, ID). The panel shows 🛡 or visible per key; Format shows the template. A key without a kind counts by its name (PASSWORD, PASS, PWD, SECRET, TOKEN, KEY, PRIVATE, AUTH, CREDENTIAL, SALT, SIGNATURE, COOKIE, SESSION — not PUBLIC / PUBLISHABLE, not names ending in TYPE, NAME, ID, URL, HOST, PORT, PATH, FILE, REGION, MODE). A private key, a one-line file and any other text are protected; JSON / YAML / INI by key names. Values under 8 characters cannot be recognized (marked ⚠).
- What the AI sees — the names (never a value); it uses the files by path. An output holding a value is shown with the value replaced by
[secret: …]and the rest as it is (from 5.16.0; before, the whole output was held back with ⛔). It is held back, or the rest of a shell output is cut, where a mark cannot be safe: a picture or a file, two values that overlap, a field named like a secret that is longer than 64 KB in a shell output, or CodeHero could not load its list of secrets. Writing a value is refused. A mark is written back only where it already was: an edit next to a mark works, and with the Edit tool of the API models so does an edit of the marked line itself; a mark in a new place is refused. Its own text holding a value is stored as a stub and written again. A value it makes is saved withcodehero-secretwithout being shown; the ticket pipes the command straight into it and never runs it first to look. - Your messages — a message or a ticket description holding one of these values is not sent: the screen names the file and the key; your text stays in the box. A password typed in the chat that is not in
.secrets/is not filtered. - The platform's provider keys and the Claude / Codex logins are protected too.
- Limits — see «What it does not cover» below. One more: a value in a file the Claude CLI loads by itself (
CLAUDE.md) is caught by the request check only when CodeHero knows it, and that check is forced only with «Ticket sandbox» on. Another: in a Claude Code ticket the shell carries the address of the login proxy (with «Ticket sandbox» on or off), so a project's own program that calls the Anthropic API with its own key from that shell is refused (401). Let the app set its own API address, or run that check outside the ticket. For Claude Code no hook can replace the error text of a FAILED tool, and the run goes on: the text stays in Claude Code's own session record on the server (the project account's home, mode 0600), and the login proxy hides the value in every request to the AI provider. The ticket page shows an ℹ️ line about it. Codex needs the hooks the upgrade writes into/etc/codex/requirements.toml; without them a Codex ticket does not start and says why.
Secrets: what the protection does, and what it does not
How it works.
- You keep a project's passwords and keys on its 🔐 Secrets page. A ticket uses a secret by its name and its path. It does not need the value.
- A ticket copies a value into the app's own settings with one command, without showing it.
- CodeHero checks what it shows the AI: tool outputs, files a ticket reads, your messages. It looks for every value it has loaded, as written and in some coded forms: JSON, a URL, base64, hex.
- Its sources:
- the protected entries of the project's Secrets;
- the database passwords CodeHero makes;
- CodeHero's own credentials, its AI-provider keys included.
- When it finds a value in an output, it hides it. The value becomes
[secret: NAME]and the AI sees the rest. The ticket is told that a value was hidden. This is not an error, and the ticket goes on. (Before 5.16.0 the whole output was held back.) - It holds an output back, or cuts the rest of a shell output, where hiding cannot be safe: a picture or a file, two values that overlap, a field named like a secret that is longer than 64 KB in a shell output, or CodeHero could not load its list of secrets. A message of yours that holds a value is not sent.
- A ticket can edit a file that has a hidden value in it:
- it can change the lines next to the value;
- the API models can also change the line that holds it: CodeHero keeps the real value in its place;
- Claude Code, Codex and Grok leave that line as it is (Claude Code checks an Edit against the file before CodeHero can help), and a hidden value put in a new place is refused.
- In the JSON a tool returns, the value of a field whose NAME says secret (token, access_token, api_key, client_secret, password …) is hidden too, also when it is not on the Secrets page. This covers a token an API returns before it is saved. The ticket saves such a token by piping the call straight into
codehero-secret set, without looking at it first. Only JSON is read by name.
One more check on every request (5.16.0).
- Before a request leaves for the AI provider, CodeHero checks it once more, at the last step. Known secrets, in the forms CodeHero knows, are removed from every request on these routes:
- Claude Code, Codex and Grok tickets, and the panel assistant, the companion and its workers on those routes: through a login proxy. With «Ticket sandbox» on, the program runs inside the sandbox and the proxy is forced: it cannot go around it. We recommend it (Settings → Security → 🛡 Protections). With it off (for an assistant chat: also «Full access for this chat»), the proxy still checks every request, but only against mistakes: outside the sandbox the program keeps your real login in its home folder, so a program that wants to can go around the proxy;
- tickets, assistants and helpers on an API key (Anthropic, OpenAI, Gemini, DeepSeek, GLM, Grok, OpenRouter, QwenCloud, Ollama, vLLM, a custom OpenAI-compatible slot): at the provider, on the exact bytes it sends;
- the helpers on a subscription (context summaries, the image reducer), the quick agents (the reviewers and the watch), Help and «Ask AI to fix»: through a login proxy of their own, also with the sandbox off.
- The one exception is the login refresh, the call that renews your subscription login.
- With «Ticket sandbox» off, Codex and Grok tickets and assistant chats run with a home folder of their own for the run, as in a sandbox run:
~/.codex/config.tomland~/.grok/config.toml(and the skills and plugins kept in those homes) no longer apply to them. A Claude Code ticket in Mode 3 has one more small process, and one that was already open when you upgraded is replaced once; it continues the same conversation. - The ticket's closed space writes files the site can read (
umask 0002, 5.17.0; before 0007), so a package a ticket installs with Composer (vendor/) is no longer a 403 or a page error. The project's root folder and.secrets/stay closed to the web server. - A value it finds is replaced by
[secret: NAME]and the work goes on. For a key of 16 or more characters, a part of it that is half the key or more counts too. - A check that cannot finish stops the request. For example: CodeHero cannot load the Secrets completely (a text file over 1 MB, a plain-text file of more than 200 lines, more than 200 files, a folder more than 3 levels deep, more than 20,000 protected values), or the request is too large (64 MiB) or too unusual to check. The ticket then starts again once by itself, from its saved conversation with the values hidden (a Claude Code ticket in Mode 3 starts again from its own saved session instead, so the same request is usually stopped again and it waits for you). If the request is stopped again, the ticket waits for you with «NEEDS THE USER» and starts again when you write to it.
- The optional
heroagent_server.py, which you may install on a separate AI server, is not one of these routes. CodeHero's request to it is checked before it leaves.
A write into the secrets folders asks you.
- A ticket reads
.secrets/by path, as before. - A ticket can make a NEW secret with
codehero-secret set. A command makes the value and saves it without printing it, and you see it on the Secrets page. A value typed in that command is refused: the ticket must make it with a generator. - Changing a secret that is already there (
--replace) and any other command that writes into.secrets/or the host secrets folder (for examplesed -i,>,mv,rm, or a key file that already exists) asks you first, on the ticket's Approve / Reject panel, in every execution mode. The Write and Edit tools are refused there. - When a ticket replaces a key (
--replace), CodeHero moves the OLD value to a set namedretiredin the same folder (the key is<set>__<KEY>, with the note<kind> — replaced on <UTC date>). It stays hidden: a file that still holds the old value shows it as[secret: retired.<set>__<KEY>]. You see the set «retired» on the Secrets page and delete an entry when no file holds that value any more. Nothing is retired for a Username or Setting entry, or when the new value equals the old one. - This stops an honest model's mistake. It does not see a write made through a script file the ticket wrote first, through a path built in a shell variable, or through a path written inside a sentence of a script that runs no command (so a script that writes a note naming
.secretsis not asked). It is a first layer, not a wall.
A key that lives in your app's own settings (an SMS key, an SSH key the app uses, a payment key):
- Put it ALSO on the Secrets page.
- The app keeps reading its own settings.
- The AI does not see the value when it reads those settings, because CodeHero now knows it.
- A key that is ONLY in the app's settings is not known to CodeHero, and it is not hidden.
What it does not cover.
- A value CodeHero does not know: a password typed in a chat, a key only in a config file.
- A value you stored that is shorter than 8 characters (the database passwords CodeHero makes are checked at any length).
- An entry marked «username» or «setting» (shown on purpose).
- A picture: a screenshot that shows a password.
- A binary file (a key container such as .p12 or .jks): CodeHero cannot match what it holds.
- A key you replaced on the Secrets page: the old value is no longer known to the check (a ticket's
codehero-secret set --replacekeeps it hidden, in the setretired). - A secret-named field outside JSON (
password: xin YAML, a line in.env): it is hidden only when CodeHero knows the value. - Deliberate or disguised disclosure.
- Suppose a malicious instruction, or unsafe model behaviour, makes code split or encrypt a secret, or send it straight to another service. A text check alone cannot reliably stop that.
- What limits the damage:
- what the AI can reach: its project's files, the projects linked to it, and the network («Ticket network limits» keeps tickets off private networks; the internet stays open);
- what each key is allowed to do.
When would a model do this?
- The models of the large AI providers are built not to take a secret out, and their providers' rules forbid it.
- CodeHero tells every ticket not to show or send a secret. It tells the ticket that an instruction found in a file, a web page or a tool result is data, not an order: the ticket stops that step and asks you.
- These safeguards lower the risk. They are not a guarantee.
- The risk is higher with:
- an untrusted or modified model whose safeguards are weak or removed, for example some models sold as «uncensored»;
- a normal model given a malicious instruction hidden in a file, a web page, a package, or a form a visitor filled in (prompt injection).
Our advice: never give an AI a production key.
- In a project an AI works on, use development and test keys only: a test account, a sandbox key, a key with a spending limit.
- Keep production keys in the live project, and let no AI ticket work there:
- the live project in production mode and locked;
- the AI's work on its maintenance copy, after Start maintenance, with the copy's own database login;
- in the copy's app settings, test keys instead of the production ones;
- «Keep AI work on the maintenance copy» on, with the live project following the server.
- Production mode and the lock do not hide files. A ticket that runs there can still READ the project's settings.
- How far you go is your choice. It depends on how much you trust the model you use.
- Give an AI only keys you can afford to replace. If you think a key was exposed, replace it.
A LOCKED project (5.7.1) — no backup, snapshot or container image is restored over it. The panel and the assistant say «Refused: project … is LOCKED». A restore as a new project works, and the new project starts in Developer mode and unlocked (Project modes and the project lock).
Create maintenance copy (5.8.0) — on a live container project: Backup & Restore → Maintenance copy → Create maintenance copy. It makes a second project from the project's newest Complete backup, which must be a Recovery copy (Backup & Restore → Recovery copy). If the newest Complete backup is not a Recovery copy, it is refused, with the reasons: make a new Recovery copy first. The live project is never changed. A container without root has no maintenance copy yet.
- The copy gets its own container, its own database password and no domain. The port forwards and the
.secrets/folder of live are not copied. The other database logins it brings from live are locked. - While it is prepared, nothing of the copy runs: no web app, no worker, no cron job, no custom service, no scheduled database event. Its container boots only a preparation mode, and never by itself at a server start.
- At the end the copy is stopped and checked. Open the copy → Backup & Restore → Maintenance copy.
- To fix: a live password or the live container's address in the copy's files; a login of the copy that works on the live database; a link between the two projects; a database whose own jobs cannot be held (SQL Server, Oracle). Change it, then click Check again.
- To confirm: what starts by itself in the copy, its scheduled jobs and custom services, the port forwards left out, and your own check of the app's settings (its database address, mail, payments, webhooks and other integrations point at test targets, not at live). Tick each one.
- Start maintenance: the checks run again. Then the copy leaves its preparation mode, gets
🛠 Maintenancemode and starts. Its tickets stay paused: press Resume Project when AI tickets may work on it. - IF Start maintenance did not finish (it says so), THEN the copy stays stopped and held: no Start, no service. Press Start maintenance again.
- Until Start maintenance finished, no AI ticket runs on the copy, whatever Keep AI work on the maintenance copy says, and Resume Project says the copy is still being prepared.
- One live project has one maintenance copy. A failed or old copy: delete it (the copy's page → ⚠️ Danger Zone → 🗑️ Delete Project), then create a new one. A copy interrupted by a server restart during its import stays stopped and is shown as not prepared.
- The project's own database must be inside its container. A database on the server itself is refused: move it first (Container tab → Migrate DB to Container).
- It needs the protected store of CodeHero 5.8.0. Without it the button says so.
- The Git settings come too (5.8.0): each repository of the live project's Git Manager, with its remote, its branch and its saved login (the token stays encrypted in CodeHero). Auto-commit and auto-push start off on the copy. A repository whose
.gitfolder the backup did not bring is named in the checks. If the settings could not be copied, To fix says so: press Check again (the copy's Backup & Restore → Maintenance copy) to copy them again. - Which project is which: the copy's page and its card in Projects show «🛠 MAINTENANCE COPY of <live>»; the live project's show «🔴 LIVE — maintenance copy: <copy>». Each label opens the other project.
Danger Zone
A LOCKED project (🔒) cannot be deleted (5.7.1). Unlock it first with its padlock (The project lock).
Delete the project and all its data. Since v4.55.0 the dialog asks: Take a Complete backup first (the default — files, every database, tickets; if the backup fails or misses a database, e.g. a stopped container's, nothing is deleted) or Delete without a backup.
Delete asks for the project's code (5.8.0), not its name: type the code the dialog shows. The server checks it too, so a wrong page or an old browser tab never deletes another project. A tab opened before the upgrade is refused: reload the page.
- On a maintenance copy the dialog says so: its live project is not touched (its files, container and database stay). The copy's own Git folder on the server (the one its Git Manager uses) is deleted with it. If it cannot be deleted now, the message says so: press Delete again.
- On a live project that has a copy the dialog says in red «This is the LIVE project» and names the copy. Lock the live project (its padlock) and it can never be deleted.
- Delete stops, and deletes nothing, when there is a link on the way to the project's folder (5.8.0). The message names the folder to check. A project whose folder is outside
/var/www/projectsand/opt/appsis not deleted from the panel: its records stay, and the message says why.
The backups a deleted project leaves — that last one and its earlier ones — are in Dashboard → Import Project → Existing backups → Deleted projects: Import brings the project back (with a new code), Download, Delete one, or Delete all — its database dumps too (v4.55.1+). (Before v4.55.0 the dialog promised a backup that was never made.) A delete never drops a database or a database user that another project still uses (v4.55.1+).
5. Project Settings & Context
Project Context
Each project has an AI context that helps the AI understand the codebase:
- Auto-generated — Created during project analysis
- Manual — Add custom instructions, coding standards, architecture notes
- Framework detection — Auto-detects tech stack and relevant files
Project Settings
Edit project settings from the project detail page: change provider, AI model, think mode, update description and context, set default execution mode, set the project mode (Developer, 🛠 Maintenance or 🔒 Production, 5.7.1 — Section 8), configure auto-commit and auto-push for git.
The lean core (5.7.0)
Every ticket reads a small core (core-base.md) and the rules of its kind:
- the BUILDER RULES: a build ticket, a
[FIX], a[WORKER]; - the SUPERVISOR RULES:
[PLAN],[REPLAN],[VERIFY],[SECURITY],[PERFORMANCE],[PEER],[HELPER],[RELEASE].
A ticket without a tag gets the planner's rules when a line near the start of its text begins with PLAN MODE. The guides still load by the ticket's kind and skills. The core is written in simple, structured English, so a strong model and a local model read it the same way.
6. Creating Tickets
Tickets are the core workflow unit. Each ticket represents a task for the AI to complete.

| Field | Required | Description |
|---|---|---|
| Title | Yes | Short description of the task |
| Description | Yes | Detailed instructions for the AI |
| Type | No | Category (feature, bug, task, etc.) |
| Priority | No | low, medium, high, critical |
| Provider | No | Override project's provider |
| AI Model | No | Override project's developer role |
| Think Mode | No | Override project's think mode |
| Skills | No | Guides the ticket must load at its start (Design, Database, Tests …); the guides for its kind of work load by themselves. A skill also gives a build ticket the tools of its work (5.7.0): the picker shows them (+ tools: …) |
| Execution Mode | No | Override project's execution mode |
| Sequence Order | No | Execution order number |
| Dependencies | No | Tickets that must complete first |
| Parent Ticket | No | Create as sub-ticket |
| Max Retries | No | Auto-retry count (default: 3) |
The tools of a ticket (5.7.0). A build ticket (no tag, a [FIX], a [WORKER]) gets the tools its work needs — 21 instead of 65. Its skills add the tools of their work:
| Skill | The tools it adds to a build ticket |
|---|---|
mobile, native, devices, android-emulator, windows-app, local-llm | The device tools: codehero_devices, codehero_device_action, codehero_preview_views |
services, tuning | codehero_manage_service |
changes | codehero_news_post |
- Without a device skill a build ticket cannot reach a device.
- The reply that creates a ticket names the tools its skills add.
- A ticket cannot give itself, or a ticket it opens, a device or service skill. You give it on the ticket's page, or the assistant or the companion does after your yes. A
[PLAN]or another supervisor ticket can give it to the tickets it creates. - A
[HELPER]or[PEER]opened by a build ticket gets a build ticket's tools, plus its own skills' tools. [PLAN],[REPLAN],[VERIFY],[SECURITY],[PERFORMANCE],[RELEASE]and the other supervisor tickets keep every tool.
Tickets Page

Features: drag-and-drop reordering, filter by status/type/priority, bulk actions, and sequence visualization.
7. Ticket Types & Priority
Ticket Types
| Type | Color | Use For |
|---|---|---|
| feature | Purple | New functionality |
| bug | Red | Fix broken behavior |
| debug | Orange | Investigation, troubleshooting |
| rnd | Violet | Research & Development |
| task | Gray | General work (default) |
| improvement | Cyan | Refactoring, optimization |
| docs | Green | Documentation |
Priority
| Priority | When to Use |
|---|---|
| critical | Urgent, blocks other work |
| high | Important, do soon |
| medium | Normal priority (default) |
| low | Nice to have |
8. Execution Modes
Control how much freedom the AI has when working on tickets.
| Mode | Description |
|---|---|
| Autonomous | Full access, no permission prompts. AI works uninterrupted. Default |
| Semi-Autonomous | Smart sandbox. Auto-approves safe operations, asks for risky ones, blocks dangerous. |
| Supervised | AI asks permission before every write/edit/bash operation. |
Semi-Autonomous Mode Details
Auto-Approved (no prompts)
- File create/edit/delete within project folder
- Running tests (
npm test,pytest,phpunit) - Build commands (
npm run build,composer install) - Git read operations (
git status,git log,git diff)
Requires Approval
- Installing packages (
npm install,pip install) - Git write operations (
git commit,git push) - Database migrations
- Network requests (
curl,wget)
Blocked
- System commands (
sudo,apt,systemctl) - Modifying
.gitfolder - Accessing system paths (
/etc,/opt/codehero) - Dangerous commands (
rm -rf /,chmod 777)
Grok Build's own tools (5.10.0). Grok Build calls a CodeHero tool through its own tool use_tool.
- The platform checks the real tool and its real arguments, as for Claude Code and Codex. The Approve box shows them.
- A
use_toolcall must carry its arguments inline and name a CodeHero (MCP) tool. Any other form is refused. - When the check cannot run, the call is refused too.
- Finding a tool (
search_tool, Claude Code'sToolSearch) and the to-do list (todo_write) never ask, in every mode.
A server a ticket reaches by ssh, and a package on this server (5.13.4):
ssh -F /dev/null -i <key> -o BatchMode=yes -o StrictHostKeyChecking=accept-new admin@server 'sudo systemctl restart app'runs itssudoon THAT server, so a ticket may do it. It has to be written in exactly this form:-F /dev/null(ssh then reads no configuration), a plain host name or IP of ANOTHER server, a quoted command, and only a short list of options (the ticket's guide names them). Any other ssh that carries asudois refused, and the ticket is told the form to use. Asudothat would run on THIS server is refused as well («a ticket has no root here»), also asudo ssh, aProxyCommand, aLocalCommandand a-Jvalue.- A ticket's
sshkeeps itsknown_hosts: the ticket account's home is/var/lib/codehero/accounts/chp<id>, the same as its$HOME. An account made before 5.13.4 is corrected when its project is prepared next. Nothing is moved. - A package on THIS server is yours to install (Packages page). A host project's ticket that needs one writes «install <package> on the Packages page» in its report and finishes everything else; it does not wait for an Approve. A container project installs its own packages.
What no ticket may do, in any mode (5.7.0):
- Search the whole server. A command that searches, copies, archives or measures a folder that holds every project (
/var/www/projects,/opt/apps, the containers' folder) or one above it (/,/var,/opt,/tmp) is refused:find /,grep -r,du,cp -a,rsync -a,tar,zip -r,cd <folder> && …. A list of names stays allowed (ls <folder>,find <folder> -maxdepth 1). To find a system file, the ticket searches the system's own folders:find /etc /usr /opt/codehero -name php.ini. - Open another project's preview. A ticket's Browser, PageAssert, Screenshot, HttpRequest and WebFetch reach only its own project's preview and its own container. This is checked on the real address, on every redirect and on every request of the page. A redirect into another project closes the browser session; HttpRequest says «redirected to …, not followed». The tools send their own project's preview key by themselves. A ticket's shell and tests send it like this:
curl -sk -H "X-CodeHero-Preview-Key: $CODEHERO_PREVIEW_ACCESS" <preview URL>(Section 32). - Read the previews' shared logs with its shell (5.10.0). Those logs hold the requests of every project. A ticket reads them with its LogTail tool, which shows every preview key as
[hidden](Section 32). - Trust a bad certificate. The ticket's browser trusts this server's preview certificate by its key and checks every other certificate normally. So a preview that loads web fonts, a CDN, an outside API or a sign-in redirect works. An outside site with a bad certificate is refused. A local
httpsdev server with its own self-signed certificate still opens; its outsidehttpsrequests are blocked — serve such a page overhttpor through the preview. - Change a container's LXC settings (Section 31). It may read them.
Project modes and the project lock (5.7.1)
A live project needs more than an execution mode. The project mode decides what an AI may do in the project. The project lock decides what nobody may do to the project until you unlock it. Both hold for every ticket and every assistant, with every AI family: Claude Code, Codex, Grok Build and the API models.
The three modes
🔒 Production | 🛠 Maintenance | Developer (the default) | |
|---|---|---|---|
| The execution mode (autonomous, semi-autonomous, supervised) | Does not apply | Does not apply | Applies as before |
| Read files (Read, Grep, Glob) | Allowed | Allowed | Allowed |
Read commands for logs and state: ls, cat, head, tail, grep, find, wc, git log, git diff, git status, git show | Allowed | Allowed | As before |
A database query with only SELECT, SHOW, DESCRIBE or EXPLAIN | Refused: an AI never reads the live data | Allowed: it is a read | As before |
| Any change: a file, a command that changes something, the database, a service, an install, a script run | Refused, always | Asks you, always — in autonomous mode too | As before |
| Browser, HttpRequest, PageAssert, a screenshot of a page | Refused | A page opens. Every click, form and page script asks you. | As before |
- In production and maintenance, reads follow the semi-autonomous rules, whatever the ticket's execution mode. A read outside the project's folder (a log of the server) may ask you.
- In a container project the same rules hold inside the container. A read command runs in the container with
crun, as before. A change inside the container is refused (production) or asks you (maintenance). Developermode works exactly as before, with one addition: in semi-autonomous mode a command that writes to a database now asks you first, inside a container too: «Requires approval: database write — …».
Set the mode
- Open Projects.
- On the project's card, click
Edit. - In Project Mode, choose
Developer,🛠 Maintenanceor🔒 Production. - A box says what the mode means. Click
OKto keep it.Cancelputs the old mode back. - Click
Save Changes.
- The project list shows a red
PRODUCTIONor an amberMAINTENANCEbadge on the card. The project page shows🔒 PRODUCTIONor🛠 MAINTENANCEnext to the project's name. - A stricter mode applies at the AI's next tool call, also in a ticket that runs now. A less strict mode applies at the ticket's next run. A running ticket gets the new instructions at its next run.
- The assistant can set the mode for you. It says what will change and waits for your yes.
- A backup restored as a NEW project starts in
Developermode and unlocked.
A ticket in a production project
- Its instructions start with a «PROJECT MODE» block. The platform keeps it word for word, also after a summary of a long conversation. Every few minutes the platform reminds the AI of the mode with one line.
- The AI reads the code and the logs, and finds the cause.
- IF a change is needed, THEN the AI writes the exact change in its report: the file, the line, the new text, the command. Its report starts with
NEEDS THE USER: yes — PRODUCTION project: …. - You make the change in the maintenance copy (Live work: two projects).
- The platform does not add its test runner (
.tests/run.sh) to a production project. It still writes its own working files (.heroagent/,.claude/settings.json): the mode check needs them.
A ticket in a maintenance project
- The AI asks for one change at a time, the smallest that fixes the problem.
- The ticket waits. Its page shows Permission Required with the line
🛠 MAINTENANCE project — every change waits for your yes. Approve only this exact change. - Read the DANGER line and the change.
- Click
✓ Approveor✗ Reject. - IF you approve, THEN the AI runs that exact call once.
- IF the AI runs the same call again, or a changed call, THEN it asks you again.
- IF you reject, THEN the AI does not try another way. It writes the change in its report and stops.
✓ Approve All Similaris not shown in a maintenance project. Each yes is for one exact change, once.- A Codex ticket: the request is on the Approve / Reject panel at once, and the ticket waits for you, also when the AI wrote that it finished.
The DANGER level on every approval request
Every approval request shows a DANGER line, in every mode. In a Developer project it shows on the semi-autonomous and supervised requests too.
| Level | Colour | Meaning |
|---|---|---|
| HIGH | red | It deletes or changes data or the system. For example: DELETE, UPDATE, INSERT, DROP, TRUNCATE, ALTER, FLUSHALL, dropdb, rm -r, git reset --hard, git push --force, crontab -r. |
| MEDIUM | amber | It changes files or services. For example: a file change, rm, mv, > over a file, chmod -R, systemctl restart, kill, a script run, a Browser click. |
| LOW | green | It reads. |
- The words cover the databases of the Services catalog, the server's own MySQL and the dangerous system commands. The line names each word that caused the level, with the file and the line number.
- IF a command runs a file (
bash x.sh,php fix.php,python x.py,./x,mysql db < f.sql), THEN the platform reads that file at the request and shows its danger words. IF that file changes after your yes, THEN you are asked again. - A file change shows the file and its new content. An Edit shows the old text and the new text. A script that the Browser will run is shown in full.
"DE"+"LETE") or hidden in base64 is not found by words. The line names the usual tricks as «hidden code — read it yourself». That is why a production project refuses every change, not only the dangerous ones.The assistants follow the same rules
- The panel assistant and the companion can do no more than a ticket in a production or maintenance project. In a production project they only read. They tell you what they wanted to change and why.
- In a maintenance project a chat that can ask you (the assistant on an API provider, the Claude chat terminal) asks y/n. Before you answer, it shows the DANGER level and the words that caused it. A Browser script is shown in full.
- In a maintenance project a chat that cannot ask inside a tool call (the assistant on the Claude, Codex or Grok subscription, the companion's background workers) refuses the change. It tells you to open a ticket. The ticket's Approve / Reject panel asks you.
- The assistants can make a project's mode stricter and lock a project, after your yes. Only you make a project's mode less strict, on the panel. The assistants can never unlock a project.
The project lock
The padlock is on the project's card (🔓 / 🔒) and on the project page (🔓 Unlocked / 🔒 LOCKED).
- To lock: click
🔓on the card, or🔓 Unlockedon the project page. A box says what the lock refuses. ClickOK. - To unlock: click
🔒on the card, or🔒 LOCKEDon the project page. A box says what the project allows again. ClickOK.
A LOCKED project refuses these actions, from the panel, the assistants, the MCP tools and the panel's API:
- deleting the project;
- destroying its container;
- moving the project into a container;
- restoring a backup or a snapshot over it (a restore as a NEW project is allowed);
- importing a container image into it;
- a restore from the Git Manager's Backup History;
- restoring a container service's database backup into it;
- deleting its host database, or moving its host database into the container;
- a reset in the Git Manager (
Reset here,Force Reset); - deleting a container service (its data goes with it);
- an import in «extend» mode by the assistant (it copies files over the project);
- a shell command of a ticket or an assistant that deletes, moves away or empties its folder (
rm -r,mv,rsync --delete, also with a relative path), destroys its container or drops its database. This holds in every mode, for the project's own tickets and for the tickets of a linked project.
A LOCKED project still allows deleting a snapshot (it does not touch the project; the automatic retention deletes old snapshots as before; Kept ones stay), and the normal work: tickets, edits, backups, a new snapshot.
- Only you unlock a project, on the panel.
- IF you need a refused action, THEN unlock the project, do the action, and lock it again.
- The lock and the mode are separate. A
Developerproject can be locked. AProductionproject can be unlocked.
Live work: two projects (a live project and a maintenance copy)
Use two CodeHero projects for an app that real people use.
- The LIVE project. Set it to
🔒 Productionmode and lock it. An AI only reads there: it finds the cause of a fault in the code and the logs. - The MAINTENANCE copy. A second project, in its own container or on another CodeHero server.
- On the same server (5.8.0): on the live project, Backup & Restore → Maintenance copy → Create maintenance copy (Create maintenance copy). It needs a Recovery copy of the live project first (Backup & Restore → Recovery copy). It is prepared stopped, with its own passwords. Start maintenance sets
🛠 Maintenancemode and starts it. - On another server: make it from a backup of the live project, Projects → 📦 Import (Section 3). It starts in
Developermode and unlocked. Set it to🛠 Maintenancemode. - In
🛠 Maintenancemode every change waits for your yes. - IF the live database is outside CodeHero (a cloud database), THEN give the copy a database user that can only read. For example: a user on the cloud database's reader endpoint. The AI then sees real data and cannot change it.
- On the same server (5.8.0): on the live project, Backup & Restore → Maintenance copy → Create maintenance copy (Create maintenance copy). It needs a Recovery copy of the live project first (Backup & Restore → Recovery copy). It is prepared stopped, with its own passwords. Start maintenance sets
- A fix, step by step:
- Open a ticket in the maintenance copy. Approve each change on its page.
- Check the fix in the maintenance copy's preview.
- Commit and push it there: the copy's Git Manager → the repository → Changes → Commit and Push.
- On the live project: its Git Manager → the repository →
Pull. A pull from the panel is your own action: the project mode does not stop it.
- The config file stays outside Git. The app's config file holds the database address and the passwords. Each project keeps its own: the live one points to the live database, the copy to the read-only user. A pull never brings the copy's config file to the live project.
- PHP checks changed files every 60 seconds. Set
opcache.revalidate_freq=60in the live site's PHP settings. A host project: Production Deployment → Production PHP for this domain → its settings box (Section 32). A container project: a ticket sets it before you switch the project to🔒 Productionmode. A pulled change then shows on the live site within a minute. - Keep AI work on the maintenance copy (5.8.0). Settings → Security → 🛡 Protections → tick Keep AI work on the maintenance copy (Section 28, «Protections»). AI tickets then run only on the started maintenance copy; on the live project they are refused. Turn it on after Start maintenance of the copy. Before that, on the live project and on the copy: for each repository with a saved token, check its Remote URL, type the token again and press Save Token (Section 19, «Managed Git with the maintenance control»). A token saved before 5.8.0 is not sent while the switch is on.
Project links
Projects are isolated by default. A ticket works only in its own project. A project link lets the tickets of one project work in another project too. The other project decides: it allows your project on its own page.
The panel Project links — Allow access from is on every project page, for host projects and container projects. It is right after the Container Isolation (LXC) panel. It opens on a click, like the other panels. It lists every other project. Each entry shows:
- the tick;
- the project's name and code;
two-waywhen this project ticks it and it allows this project too;allows this onewhen it allows this project, but this project does not tick it (a tick turns it intotwo-way);+ networkwhen both projects have a container (Section 31, «Allow access from»).
The help line under the list says: «A ticked project's tickets may read and change this project's files, tickets, knowledge base and semantic search, under this project's mode and lock. Two-way: both projects tick each other.» The line above the list says how many projects may reach this project. For example: «No other project may reach this project» or «1 project may reach this project».
In this section, project B gives the access, and project A gets it.
Set up a link
- Open the page of project B, the project that must be reached.
- Click the panel
Project links — Allow access fromto open it. - Tick project A, the project whose tickets may work in B.
- Click
Save. The answer says, for example, «Saved. 1 project may reach this project.» - IF B is in production mode or LOCKED, and the Save lets in a new project, THEN a box first says what that project's tickets may do in B. Click
OKto save, orCancelto save nothing. An untick never asks. - IF B's tickets must work in A too, THEN open A's page, tick B and click
Save. Both entries now showtwo-way.
- A new tick counts from the next run of A's tickets. A ticket of A that runs now gets it at its next run.
- To end the link, untick A and click
Save. The next tool call of A's tickets in B is refused, also in a ticket that runs now. - After the upgrade to 5.7.1, a tick from 5.7.0 (made for the containers' network) counts for the tickets too. Check the list on each project page. Untick a project whose tickets must not work there.
What a tick gives
B ticks A. Then A's tickets may:
- read and change B's files: its web folder, its app folder and, for a container project, its container's files;
- use B's tickets: list, search, read, create, reply, close, start and wake them;
- search B's knowledge base, and add knowledge to it;
- search B's semantic index and its codebase map;
- read B's project details and its progress;
- reach B's container: run a command there with
crun, open its address and its preview.
- One tick works one way. B ticks A: A reaches B. B does not reach A.
- Two-way work = each project ticks the other.
- Every ticket of A gets a LINKED PROJECTS block in its instructions. It names B, its project id, its folders, its container, its mode and its lock.
- A link works between host projects too. The network rules work only between two containers (
+ network). - The assistants (the panel assistant and the companion) are yours. A link does not change what they may do.
B's rules still win
- IF B is in
🔒 Productionmode, THEN A's tickets only read B's files. Every change there is refused. - IF B is in
🛠 Maintenancemode, THEN every change of A's tickets in B waits for your yes, on A's ticket page. - IF B is LOCKED, THEN A's tickets cannot delete B, its folder, its container or its database.
- A's tickets never see B's secrets: B's
.secrets/folder, its host secrets folder and its backups are refused. - IF a value of B's secrets shows in a tool's output, THEN it is hidden before A's ticket sees it.
- A's tickets never get B's database password or B's preview key. The tools open B's preview with the key themselves.
- B's tickets and B's knowledge base work for A's tickets as they work for B's own tickets in that mode.
B's preview from A's ticket (5.11.0)
With «Ticket sandbox» on (Section 28), a ticket of A opens B's preview with a link key of its own. It never holds B's own key.
- The link key opens only B's preview. It works only while B allows A, and it stops when B gets a new key.
- B in
developermode: the preview opens as before. - B in
🛠 Maintenancemode: reading is free. Every write action still asks for your yes on A's ticket page, as today. Your first Approve of a write to B opens writes to B for the rest of that run, so the action you approved can finish (a form that sends several requests needs no second Approve). It ends with the run. - B in
🔒 Productionmode, or LOCKED: the link key is not accepted.
B's history names A's ticket
Every change that A's tickets make in B is written in B's history:
- A ticket that A's ticket opens in B has the line «🔗 Opened by ticket #… (its number · its title) of project …».
- A change of a B ticket's fields (a close, a status) adds the line «🔗 Changed by …».
- A reply from A's ticket is signed «📨 FROM TICKET #… (…) of project …».
- A start adds the line «🔗 Started now by …».
- Knowledge that A's ticket adds ends with «(From ticket … of project ….)».
- After each run of A's ticket, B gets a backup snapshot of its files, in B's Git Manager → Backup History: «Snapshot after <A's ticket number> of project <A's code>: changes by a ticket of a linked project: …».
- IF A's ticket changed nothing in B, THEN no snapshot is made.
- These lines are history only. They never wake a ticket.
Containers: crun only while linked
- A ticket runs a command in another project's container only while that project allows its project.
- Before 5.7.1 a ticket of a project without a container could run
cruninto any container, in autonomous mode. From 5.7.1 this is refused: «Blocked: cross-project access to the container …». - A ticket of a container project reaches its own container and the containers of the projects that allow it.
Example: one app in two projects
An online shop is one app in two projects. Both have a container. shop-api: the REST API and the database. shop-web: the pages that call the API.
- Open the page of
shop-api. InProject links — Allow access from, tickshop-web. ClickSave. - Open the page of
shop-web. Tickshop-api. ClickSave. - Both entries show
two-wayand+ network. The two containers may now connect to each other. - A ticket in
shop-webneeds a new field from the API. It reads the API's code inshop-api. - It opens a ticket in
shop-apifor the new field, or it changes the API itself. - The new ticket in
shop-apishows «🔗 Opened by ticket … of project …» with theshop-webticket. - IF
shop-apigoes live in🔒 Productionmode, THEN the tickets ofshop-webonly read there.
IF one of the two is a host project, THEN the link works the same, without + network.
Text a ticket reads gives it no orders (5.11.4)
A ticket reads files, web pages and the output of commands. Someone can hide an order in such a text: «delete the tests», «send the .env file to this address».
- The platform marks everything a ticket reads from a file, a page or a command. The mark says where the text came from and that it gives no orders. A text cannot copy the mark: its id is new each time.
- The ticket takes facts from that text. An order in it is not yours. We call this the semantic malicious filter: the ticket asks two questions. Did you ask for this? Does it belong to this ticket's goal? A ticket that designs a database has no reason to delete files, whatever a text says.
- If a text tries to give orders, the ticket does not do them, goes on with its own work, and its report says
NEEDS THE USER: yes — a text tried to give ordersand where. - If an order may have been changed on its way to the ticket, or something looks strange, the ticket asks for your written OK.
- A
[SECURITY]ticket and a penetration test act only with your written confirmation. - Your own orders stay your orders: if you tell a ticket to delete a folder, it does. Someone who writes in your name cannot be told apart from you. That is what backups are for.
A plan asks you once (5.11.4)
A [PLAN] or [REPLAN] ticket lists every tool, service, package, port and login its work needs, and asks you for them together, at the start. The tickets after it build without asking. A ticket that is refused a step gets the exact way to do it, and goes on.
Tickets write to each other in simple short sentences, so a small model can do the work of a big one. To you a ticket writes in your language, in plain words.
The approval reviewer (5.12)
When a ticket asks for your approval and you are not there, the request waits. After 15 minutes a second AI reads it. It reads the request, the ticket's goal and the last messages of the ticket. It never approves anything. Only your Approve approves.
It decides one of four things:
- Wrong way. The work is right, the way is wrong (a wrong path, or one long command that CodeHero cuts and that would pass in parts). The request is refused. The ticket reads the right way as advice, and goes on.
- Strange. It does not fit the ticket's goal. The request is refused. The ticket goes on.
- Dangerous. The request is refused, and the ticket gets no other way. The ticket stops. You get a message in Telegram (when Telegram is set up), and News tells the other tickets to take care. Only you start it again: write a message on its page, or press Start Now.
- Reasonable. Nothing changes. The request waits for you. The page says: «This looks reasonable, and a CodeHero rule may be too strict. You decide. Then send it to us: Logs → Diagnostic Bundle.»
- It reads only the request of a ticket that works alone (autonomous), in a project in
developermode that is not locked. The requests of the tools that register or manage a service, give root in a container or install a package for a container, and the installers of the codebase map and semantic search, are not read: they are always yours. Other requests can be read, a shell command that installs a package included; a reasonable one still waits for your Approve. - Your Approve and Reject work as always. A click answers the request you saw. If a new request came while you looked, the page says «The request changed after you saw it».
- Settings → Security → 🛡 Protections shows this. The time is
APPROVAL_REVIEW_MINUTESin Settings → system.conf. The line is not there by default (15 minutes). Add it,APPROVAL_REVIEW_MINUTES=0turns the reviewer off, then press Save & Restart.
9. Sequencing & Dependencies
Sequence Numbers
Control execution order: assign a number (1, 2, 3...) to each ticket. Lower numbers run first. Same number = run in parallel (as many at once as the installation's MAX_PARALLEL_TICKETS_PER_PROJECT slots allow). A higher number starts only when every lower-numbered ticket is done or skipped; a ticket left in awaiting_input holds everything behind it. A dependency is satisfied only by done/skipped, in relaxed and strict mode alike.
sequence_order=1: [Setup DB, Install deps] → Run in PARALLEL
sequence_order=2: [Build auth] → Waits for seq=1
sequence_order=3: [Users API, Products API] → Run in PARALLEL
Parallel Work and Lead Mode
A plan runs serially by default: one ticket after the other. Tickets share a sequence number (and run in parallel) only when you ask for parallel work and the planning ticket has proved that no two of them write the same file.
A document that several parallel tickets must add to and the product needs (a register, the CHANGELOG.md, a handover document) gets ONE owner ticket in the phase: the [RELEASE] when the phase has one, else the lead of the workers, else a build ticket after the group. The other tickets write their lines in their own SPEC FILE, under SHARED ROWS: <file>, and never edit the document; the owner copies them in, a [RELEASE] checks the document again before it builds the package, and the [REPLAN] checks that none is missing. Serial work and simple builds need none of this.
One case needs no approval, because nothing can collide: lead mode. After the planning ticket and its peer have agreed on the plan and your answers are in, a lead may build a part as [WORKER] tickets that report back to it, each a different job, with no file written by two of them, at most 5 at a time. The lead is the planner itself, or a build ticket that the plan names for a big part (its ticket text has a LEAD MODE: line; the planner stays the planner):
- the lead writes the shared files of the part first (contracts, routes, config, package files, shared CSS); a worker never touches them;
- each worker gets its own SPEC FILE and an
OWNS:line with the only files it may write, including its own log.specs/<NNN>-<part>.log; the platform refuses its writes outside that line (below); - the lead parks with
⏸ WAITING-FOR-ALL-TICKETS #a, #b (…)and is woken once, when every worker has answered or ended; - it reads each worker's log, runs its tests, checks in the git diff that the worker changed only its own files, sends findings back to that worker, and closes each worker itself;
- then it takes the workers' information — their
SHARED ROWS— and writes it where it must go.
The OWNS: line (5.10.0). It holds for every ticket whose text has one, not only for a worker. Inside its project the ticket writes only the files on that line: the platform refuses its other file edits, its common shell writes and its package installs. The change log .specs/000-changes.md is always allowed.
A part that touches money, permissions, security, deletion or concurrency still gets one group [VERIFY] from the other provider family, after the lead closed the last worker. For a build lead, the planner puts that [VERIFY] right after it.
Relaxed vs Strict Mode (deps_include_awaiting)
The flow decides who closes a ticket when the agent ends its turn (every run ends in awaiting_input). The agent's report starts with two lines the reviewer reads: NEEDS THE USER: yes/no and OPEN ISSUES AND DOUBTS: …. Before it writes them the agent checks its own report: finished or recorded work is reported as done, not as an open issue; a technical doubt it cannot settle is tried another way and then taken to one helper ticket; only what truly needs you becomes yes. yes always keeps the ticket open for you, with one exception (5.13.5): a yes that only lists checks the agent can run itself (for example «the preview checks have not been run») is asked once more before the ticket waits for you. A chain ticket ([VERIFY], [FIX], [PLAN], [REPLAN]) closes on its own no; its listed doubts stay on the record. A [PEER], [HELPER] or [WORKER] ticket is never auto-closed: the ticket that opened it closes it. A build ticket whose lines say no + none closes on those lines (the next [VERIFY] is the check). A report that contradicts itself (no followed by a list of open issues) or that has no two lines is sent back once: the reviewer writes to the ticket (📨 SYSTEM (auto-reviewer): …), the agent corrects its lines and the ticket closes without waiting for you; if the second report contradicts itself again, the ticket waits for you (never a loop). A build ticket whose SPEC FILE still holds a point under ## OPEN (a decision only you can make) and whose report says no is also sent back once (5.17.0); the second time it waits for you. A ticket parked with ⏸ WAITING-FOR-TICKET #id (number · title) — or ⏸ WAITING-FOR-ALL-TICKETS #a, #b (…) — waits for those tickets (see Tickets that open other tickets). A planning ticket cannot create tickets while a peer, helper or worker of the project is still open (the platform refuses), and a subscription window limit reported by the CLI pauses the ticket and retries every few minutes until the window is back.
The auto-reviewer, the watchdog (every 30 minutes it checks that a running ticket is not stuck) and the ticket summaries think in balanced mode by default, on the ticket's provider. Change it per role in heroagent.conf → role_think_modes (close_ticket_reviewer, kill_switch: off, basic, balanced or ultra).
| Mode | Behavior |
|---|---|
| Relaxed (default) | The auto-reviewer reads the final report and closes the ticket (done) when the work is complete and clean, so the next tickets start on their own |
| Strict | Nothing closes automatically; you review and close every ticket, and the run waits at each one |
In the panel: the New Ticket form has the box «Relaxed flow: auto-close when clean (untick = strict)», ticked by default. The ticket page shows both settings in Ticket Details («Flow: Relaxed · Mode: Autonomous»), and ✏️ Edit changes them. The flow and the Execution Mode are two settings: Autonomous / Supervised decide whether the agent asks before it writes, not who closes the ticket. A ticket that already waits for you and is turned relaxed (on its page, or with the project's bulk «relaxed» action) is reviewed at once and closes if its report is clean.
10. Sub-tickets & Parent Tickets
Break complex tasks into smaller pieces:
- Create a main (parent) ticket
- Create sub-tickets with Parent Ticket set to the main ticket
- Sub-tickets inherit project context + receive parent's conversation summary
Sub-tickets wait for parent to complete first, then receive context from parent's title, description, and last 50 messages.
Tickets That Open Other Tickets
Tickets open other tickets while they work: a planning ticket opens a [PEER] that reviews its plan (and [WORKER]s in lead mode, as a build lead does), a verifier opens a [FIX] for the builder, and any ticket may open one [HELPER] for a doubt it cannot settle. The platform records who opened each ticket (created_by_ticket_id). They talk with messages (codehero_update_ticket(reply=…), signed 📨 FROM TICKET #id): a working ticket reads a message at its next step, a parked ticket is woken by it. The platform makes sure nobody waits forever:
| Situation | What the platform does |
|---|---|
| A ticket opened by another ticket (peer, helper, worker, fix) ends its turn without replying to its opener | Sends the opener that ticket's final report — "This ticket, which YOU opened, ended its turn without replying to you. If it has not given you an answer, ask it again" — and wakes it |
| A ticket ends its turn waiting, while another ticket is parked waiting for it | Tells the parked ticket to ask again (📨 SYSTEM (waiting-check): …) and wakes it — at most twice per ticket since your last message; after that it is left for you |
A planner waits for several workers (⏸ WAITING-FOR-ALL-TICKETS) | Wakes it once, when all of them have answered or ended |
| A message is information only (for example a change to the specification) | Delivers it without waking a parked ticket (wake=false, shown as "ℹ️ FOR YOUR INFORMATION"); a ticket that reads it while waiting goes back to waiting |
A closed ticket (done or skipped) is never woken by any of these.
Who opened a ticket and who runs it (5.8.0). Every new ticket records who opened it and the account that runs it.
- You open a ticket on a page, or your assistant opens it for you: you are its opener.
- A ticket opened by another ticket (peer, helper, worker, fix, verify) keeps the opener of the first ticket, also in a linked project.
- A ticket runs as CodeHero's own account, the owner's. With «Ticket sandbox» on (5.11.0, Section 28), a ticket on a route that runs inside the sandbox works in its own closed space, as its project's own account.
- Nothing chooses another account for a ticket: not its title, not its parent, not a tool's arguments.
- A ticket from before 5.8.0 runs as before. Who opened it stays unknown.
- CodeHero checks the account before every run. If it cannot confirm it, the ticket stops and says why (Troubleshooting, «Not started — the account that runs this ticket could not be confirmed»).
- Each ticket's creation, every run and every hold go into CodeHero's history (5.8.0), with who did it.
When your answer changes the product. You answer a ticket's question and the answer changes a requirement (for example the payment deadline becomes 45 days instead of 30). The ticket records the change once, as a row in the change log .specs/000-changes.md (guide update.md), updates the specs and tests of the work that is still open, and sends an information-only notice to the unfinished tickets it concerns. Every ticket reads the change log first, so later tickets, the verifier and the replan know the change without you repeating it; finished work that still states the old value becomes an open item that the next [REPLAN] repairs.
11. Ticket Lifecycle & Actions
Ticket Statuses
| Status | Description |
|---|---|
open | Waiting to be processed |
in_progress | AI is currently working |
awaiting_input | AI needs your response |
done | Successfully completed |
failed | Something went wrong |
skipped | Manually skipped |
timeout | Exceeded max duration |
Ticket Detail

Ticket Conversation

(v5.16.4) The box Hide the tools, show only the texts above the conversation hides the tool calls and their results. Nothing is deleted, and the browser remembers your choice. Approval cards, errors and the Console tab stay.
The start of a run is one folded line (5.17.0). Each time a ticket starts, the text it was given (the instructions and the ticket's words) is kept once, as it was sent, and the conversation shows it as ONE folded line. The ticket reads again exactly what it read before, so the next run reuses what the AI provider already holds (cheaper and quicker). You cannot delete that line.
Folded steps (5.17.0). In a long run a ticket folds the steps it no longer needs word by word (many calls and results) into ONE short note. It asks for the details back with the tool codehero_unfold (it can search by a word); they come back as a NEW message and the note stays. A report, your messages and the running step are never folded. Nothing is lost from the history.
What a ticket sees from a web address (5.17.0). The HttpRequest tool also shows the useful answer headers (Allow, Location, Content-Length, Cache-Control, Set-Cookie, WWW-Authenticate): a cookie's name and attributes, never its value ([hidden]).
On a phone, tablet or foldable the conversation gets the screen. Up to 1100 px wide (tablets, an open Galaxy Fold) the menu is behind ☰ and the ticket details open from Details. Scrolling the conversation down hides the menu bar, and scrolling up shows it again. While you type, 📎 and 🎤 step aside so the text box gets the width. A long ticket title stays on one line. Coming back to the app after the screen was off picks up the messages that arrived meanwhile, with no refresh.
Before it starts (v5.1.0+) a ticket writes one line — ROLE: … · KIND: … · READING: …: what it is (it builds, checks, repairs, plans), what kind of work it understood (a change of what exists, a new page or site, a redesign of your own old site, a plan, a question) and what it reads first. When your words fit two kinds that give a different result, it asks you first.
Actions
| Button | What it does |
|---|---|
| Start Now / Force Next | Forced start: runs immediately, in parallel with whatever runs, ignoring its sequence number, its dependencies and the slot limit (for an observer ticket or a small change; the flag stays on the ticket) |
| Retry | Retry a failed ticket |
| Skip | Skip this ticket |
| Delete | Permanently delete ticket |
| Stop | Kill switch — stop AI immediately |
| Send Message | Add instructions — a working ticket reads them at its next step; an awaiting ticket re-opens. In a container project, /root on gives this ticket root inside its own container and /root off ends it (Section 31, 5.11.0) |
12. Auto-Retry
Failed tickets can automatically retry. Each ticket has retry_count (starts at 0) and max_retries (default 3). When a ticket fails, retry_count increments. If retry_count < max_retries, the ticket resets to open and tries again.
13. Multi-Provider Support
CodeHero routes through 7 cloud providers — five of them also on a flat-rate subscription — and a selected OpenRouter catalog (24 models shown below). Switch per task — never locked in. Local and own-server models: Ollama, vLLM and generic OpenAI-compatible endpoints (LM Studio, llama.cpp …) are supported adapters — they need configuration and are not enabled by default.
| Provider | Role models (master · senior · junior) | Native price (in/out per 1M) | Subscription |
|---|---|---|---|
| Anthropic | Claude Fable 5.1 · Opus 5.5 · Sonnet 5.5 (vision) | $10/$50 → $2/$10 | ✅ Claude Pro / Max — via the Claude Code CLI |
| OpenAI | GPT-6 Astra · GPT-6.1 Sol · GPT-6 Luna (vision) | $10/$50 → $0.10/$0.50 | ✅ ChatGPT Plus / Pro — via the Codex CLI |
| xAI Grok | Grok 4.7 · Grok 4.7 · Grok Build 0.1 (vision; 500K / 256K context) | $2/$6 → $1/$2 | ✅ SuperGrok — via the Grok Build CLI (5.0.1) |
| z.ai GLM | GLM 5.3 · GLM 5.2 · GLM 5.3 FlashX (vision) — plus GLM 5.1, 5V Turbo, 4.7, 4.6V and their Flash models | GLM 5.3: $1.40/$4.40 | ✅ GLM Coding plan |
| QwenCloud | GLM 5.3 · Qwen 4 Max (the senior since 5.16.3; vision, 1M context, pay as you go and Token Plan) · Qwen 3.8 Max · Qwen 3.8 Flash (vision, 1M context) · Qwen 4 Max Preview (vision, 1M context; Token Plan only) | $2/$6 → $0.15/$0.47 | ✅ Token Plan (or pay as you go) |
| OpenRouter | Qwen 3.8 Flash · Qwen 3.8 27B · Qwen 3.6 35B-A3B (vision) by default — the catalog below on any ticket | per model (catalog below) | — |
Providers may offer more models than their three role defaults; the codehero_get_model_table tool lists the accepted ones with their roles, vision, cost, score and the role the score earns, and the planning ticket can give a ticket any of them (the ticket's model). With inherited settings and the role's default model, when one model fills two roles the higher role thinks one step more (capped at pro); a ticket's own think mode or model wins.
QwenCloud stays a ticket provider, but it is slow and token-hungry: measured on a ticket that builds a small Python app, about 40-46 minutes and 1.4-1.5M tokens (Claude about 5 minutes / 300K tokens). CodeHero proposes it only when you ask for it; the same fact is in the provider's note that codehero_get_providers_info gives the planner.
OpenRouter Catalog with Pricing & Strengths
Prices per 1M tokens as shipped in this version's price table (estimates; OpenRouter's own page is authoritative). Sub marks a model whose family you can also run on a flat-rate subscription through its own provider. Smart weight is 1–10 (10 = arena frontier).
| # | Model | OpenRouter in / out (per 1M) | Sub | Smart | Best for |
|---|---|---|---|---|---|
| 1 | anthropic/claude-fable-5.1 | $10 / $50 | ✅ | 10 | reasoning, debug, mobile, web design, refactor (vision) |
| 2 | anthropic/claude-opus-5.5 | $4 / $20 | ✅ | 10 | web design, PHP backend, backend API, code review, databases, debug (vision) |
| 3 | anthropic/claude-sonnet-5 | $2 / $10 | ✅ | 9 | boilerplate, docs, PHP frontend, testing, web design (vision) |
| 4 | openai/gpt-6-astra | $10 / $50 | ✅ | 10 | reasoning, debug, mobile, web design, code review (vision) |
| 5 | openai/gpt-6-sol | $2 / $10 | ✅ | 9 | databases, PHP backend, backend API, frontend frameworks (vision) |
| 6 | openai/gpt-6-luna | $0.10 / $0.50 | ✅ | 7 | boilerplate, docs, PHP frontend, testing, backend API (vision) |
| 7 | x-ai/grok-4.3 | $1.25 / $2.50 | ✅ | 8 | reasoning, debug, backend API, code review (always-on reasoning, 1M ctx) (vision) |
| 10 | z-ai/glm-5.1 | free (as listed) | ✅ | 8 | frontend frameworks, PHP, docs (text only) |
| 11 | moonshotai/kimi-k2.6 | $0.73 / $3.49 | — | 8 | long-context reasoning, Chinese/English bilingual, code (vision) |
| 12 | xiaomi/mimo-v2.5-pro | $1 / $3 | — | 7 | code reasoning, agent tasks (compact MoE) (text only) |
| 13 | minimax/minimax-m2.7 | $0.279 / $1.20 | — | 7 | long-form generation, agent workflows (text only) |
| 14 | qwen/qwen3.6-plus | $0.325 / $1.95 | — | 7 | boilerplate, PHP backend, backend API, testing, docs (vision) |
| 15 | qwen/qwen3.7-max | $1.25 / $3.75 | — | 9 | reasoning, debug, refactor, code review, agentic coding (text only) |
| 16 | qwen/qwen3.8-max-0902 | $2 / $6 | ✅ | — | reasoning, agentic coding, code review (vision) |
| 17 | qwen/qwen3.8-flash | $0.15 / $0.47 | ✅ | 7 | OpenRouter master · cheap agentic coding, 1M context (vision) |
| 18 | qwen/qwen3.8-omni-flash | $0.15 / $0.47 | — | — | cheap agentic coding; text, image, audio, video input (vision) |
| 19 | qwen/qwen3.8-27b | $0.24 / $2.20 | — | 7 | OpenRouter senior · small open model — also runs on your own machine (vision) |
| 20 | qwen/qwen3.6-35b-a3b | $0.15 / $1 | — | 6 | OpenRouter junior · small open MoE model — also runs on your own machine (vision) |
| 21 | google/gemma-4-26b-a4b-it | $0.08 / $0.26 | — | — | small open MoE model — also runs on your own machine (vision) |
| 22 | google/gemma-4-31b-it | $0.09 / $0.34 | — | — | small open model — also runs on your own machine (vision) |
| 23 | openai/gpt-oss-20b | $0.02 / $0.09 | — | — | small open model — also runs on your own machine (text only) |
| 24 | openai/gpt-oss-120b | $0.15 / $0.60 | — | — | open model — also runs on your own machine (text only) |
effective_cost_weight = cost × 0.10 and prefers those routes automatically. A subscription run never falls back to API billing: the CLI subscriptions run without the paid key in their environment, and the GLM and QwenCloud plans use their own plan endpoint.Cost Weights (shipped defaults, 1-10 — lower = cheaper)
| Provider | Master | Senior | Junior |
|---|---|---|---|
| Anthropic | 10 | 7 | 4 |
| OpenAI | 10 | 4 | 1 |
| Grok | 4 | 4 | 2 |
| GLM | 4 | 3 | 1 |
| QwenCloud | 4 | 5 | 1 |
| OpenRouter (qwen3.8-flash / qwen3.8-27b / qwen3.6-35b-a3b) | 1 | 1 | 1 |
Smart Weights (shipped defaults, 1-10 — higher = stronger)
| Provider | Master | Senior | Junior |
|---|---|---|---|
| Anthropic | 10 | 10 | 9 |
| OpenAI | 10 | 9 | 7 |
| Grok | 9 | 9 | 7 |
| GLM | 9 | 8 | 7 |
| QwenCloud | 9 | 9 | 7 |
| OpenRouter | 7 | 7 | 6 |
The smart weights are starting values: a coming version measures every model and sets its score and role from the results.
No connection with your Claude / ChatGPT account's extras (v4.55.0+) — every Claude CLI CodeHero starts (tickets, the reviewer, the assistant) runs without the claude.ai connectors (Gmail, Google Drive, Calendar, Claude Docs), the skills and plugins synced from claude.ai, the Artifact tool and Remote Control; Codex runs without the ChatGPT apps and plugins. Only for those runs — nothing on disk is moved, and your own sessions are not touched. The codehero tools stay.
The lineup changes between versions: the Providers page (and the codehero_get_providers_info tool) shows the models, weights and strengths of your installation.
open. It tries again by itself when the window resets, and every 30 minutes at most while the limit lasts. It continues where it stopped; the wait is not a failed attempt, and the reviewer and the watchdog leave it alone. A message from you makes it try at once.14. Developer Roles
Each ticket stores a developer role; the concrete model comes from the provider's model_aliases in heroagent.conf, so a new model needs no change to the tickets.
| Role | Anthropic | OpenAI | Used for |
|---|---|---|---|
| master_developer | Claude Fable 5.1 | GPT-6 Astra | Only when you choose it (it costs many tokens) |
| senior_developer | Claude Opus 5.5 | GPT-6.1 Sol | Planning and replan tickets and their peers, verifiers, helpers, hard build work |
| junior_developer | Claude Sonnet 5.5 | GPT-6 Luna | Build work: trivial, simple and moderate |
The same role is not the same ability everywhere: compare the smart weights (Section 13). Anthropic's junior (Sonnet 5.5, smart weight 9) can take moderate work; a junior with smart weight 7 or less gets only trivial and simple work.
Role and Think Mode per Ticket Kind
The planning ticket sets them for every ticket it creates — economy without losing quality: the plan is made by two seniors of different families (the planner and its peer) reviewing it together, at most three exchanges; the build tickets, where most tokens go, run on junior. Master only when you choose it — on the project or on any single ticket; your choice always wins.
| Ticket | Role | Think mode | One step higher when |
|---|---|---|---|
[PLAN] / [REPLAN] | senior | balanced | pro: a replan after failed or blocked work, or a very critical core in scope · after pro, ask the user |
[PEER] (plan review) | senior, never below the planner, subject to the user's permission for the new ticket (GUIDE: planning.md §3) | the planner's, subject to the user's permission for the new ticket | — |
[HELPER] | the opener's role, never below it, subject to the user's permission for the new ticket (GUIDE: planning.md §3) | the opener's think mode, never below it, subject to the user's permission for the new ticket | one step up: something very critical, or a first helper did not solve it |
[VERIFY] | senior, the other provider family | balanced | pro: the parent is very critical |
[FIX] | the builder's provider and role, subject to the permission limits of GUIDE: planning.md §3 | the builder's, subject to the permission limits of GUIDE: planning.md §3 | round 2: one think step up · round 3: senior + pro |
[SECURITY] + its [VERIFY] | senior + senior of the other family | pro + pro — always | — |
[PERFORMANCE] + its [VERIFY] | senior + senior of the other family | balanced + balanced | the performance ticket one step up when speed is a requirement with numbers |
Build / [WORKER] | junior; senior for engineering or hard work — the ticket that creates it decides | balanced (5.1.4) — the role by difficulty | — |
[RELEASE] | senior | balanced | pro: the release failed once |
Start low, climb on evidence (5.0.5): every ticket starts at balanced (5.1.4: «να ξεκινάνε από balanced» — a junior needs a little help): junior + balanced, senior + balanced only where the work needs an engineer or is hard; off, fast and basic only when you ask for them or strategy eco steps down; PLAN, REPLAN and VERIFY start at senior + balanced. A failure or a verify finding moves one step up. Your own instruction always overrides these defaults.
Difficulty of a Build Ticket
| Difficulty | Signals | Role + think (strategy balanced) |
|---|---|---|
| Trivial | texts, labels, config values, docs; a copy of a pattern that already exists in the project | junior + balanced |
| Simple | a form, CRUD or static page on an existing pattern, simple validation, 1–2 files | junior + balanced |
| Moderate | a new feature with logic over a few files, built on a design that already exists | junior + balanced |
| Engineering | work that needs an engineer's thinking: designing a database schema / data model, the architecture of a module, an API contract, the first instance of a pattern others will copy, an integration design | senior + balanced |
| Hard | money, taxes, prices · permissions, tenant isolation · deletion, retention · concurrency, queues, locks · security, secrets · an external API with uncertain results · a migration of real data · an unclear bug · anything hard to test | senior + balanced |
Strategy eco moves one step down, to basic (never for engineering or hard work); performance moves one step up. A part that failed before goes one step up.
What a junior is told, so it does not stop for nothing (5.13.4). The guides and the ticket's context say it in plain words. A server that the task names is reached with plain ssh -i <key path> -o BatchMode=yes (the device tools are only for the Devices page). The app and its commands use the project's own database user, never MySQL's root, and never a password on a command line. A Node or a Python app in a container gets its web_app service first; the platform then serves the preview. The app never reads .secrets/: its settings live in its own config or .env. A server log that cannot be read is written «server log not available», and the work is finished.
15. Think Mode (Extended Thinking)
| Mode | Description | Best For |
|---|---|---|
| off | No extended thinking | Only when you ask for it |
| basic | Light reasoning | When you ask for it, or strategy eco one step down |
| balanced | Moderate analysis | Every ticket to start with (project default, 5.1.4); PLAN / REPLAN / VERIFY; a very critical core |
| ultra | Deep reasoning | Only on your explicit word for a ticket or its kind; never a project default |
A ticket never climbs to ultra by itself: after pro, it asks you. Think mode mostly buys speed and depth rather than cost — most tokens are the project context read again at every step.
How Each Provider Applies It
| Provider | off → basic → balanced → ultra |
|---|---|
Anthropic (API, claude CLI) | effort low → high → xhigh → max |
| OpenAI (API, Codex CLI) | effort none (GPT-6 Astra: low, its lowest) → high → xhigh → max |
| OpenRouter | by model: OpenAI and Claude models use the effort levels above (Claude's ultra is xhigh there); other models on/off |
| Grok, GLM, QwenCloud | by model: effort levels (Grok 4.7, GLM 5.3; on QwenCloud each model's own level, never a token budget — 5.10.0; Qwen's balanced is its medium, 5.11.0, and pro and ultra stay its xhigh), or thinking on / off; some models always think (Grok Build, GLM 5.3) |
| Ollama, vLLM | no thinking support |
A local LLM (custom1 / custom2, llama.cpp — Section 33) | 5.7.0: off = no thinking; the other modes think up to the mode's token budget, then the model answers |
Context Limit
Under Think Mode — on the project, in the new-ticket form and on the ticket page — Context limit is the size of a ticket's context, up to the model's maximum: 100K … 1M, or Model's maximum. Every value can be chosen on every model and is kept as chosen; a run takes at most its model's window (1M on a 262,144-token model runs with 262,144).
Inside, CodeHero compacts at 80 % of that size (the value cut to the model's window) — once, never 80 % of 80 %: a build on Auto (300K) compacts at about 240K; 1M on a 262,144 model at about 209,715. With the API providers CodeHero's own compaction runs there. The Claude CLI and Codex compact their own context inside a run at the ticket's value (within 80 % of the model's window), and every run of theirs starts within CodeHero's point; while they work, CodeHero still summarizes the stored history at the larger heroagent.conf thresholds, so it never outgrows one summary. A smaller context means fewer tokens on every call.
- Auto (recommended): by ticket kind and provider. A project value is inherited by its tickets, like the think mode; a ticket's own value wins.
- The compaction is never so low that the run would compact again at once (the fixed instructions + the kept history + 60K working room), and never above 80 % of the model's window.
- A fresh start for the AI (5.17.0). The start of a ticket no longer carries the knowledge snapshot that changed between runs; the ticket asks for the knowledge, the ledger and the guides with its tools, and a short reminder every few calls tells it to read them again. A re-run therefore re-reads nothing new. A ticket that builds a page has its page tools (Browser, PageAssert, screenshot) from its start.
- A local model that is not in the catalog (5.17.0) starts at temperature
0.6, the value the model makers give for code; the catalog models keep their own. - Planners write from your words (5.17.0). A specification is written from what you said, with no point made up: an unclear point stays an open item with an owner. (Nothing for you to do.)
- Tools on demand (5.18.0). On DeepSeek and GLM a ticket starts with the tools of its work; the rarer tools (the browser, the page checks, the screenshot, the process manager, the code map, the semantic search) load when the ticket asks for one. Measured on DeepSeek: about 13 % fewer input tokens and 5 % less time, with the same result. The switch:
deferred_toolsof each provider inheroagent.conf. Local models and the subscription routes always get every tool. - One road in every text the AI reads (5.18.0). The core, the guides, the notices CodeHero writes into a ticket, the tools' answers and the assistants were reviewed together: each situation has one step. A container ticket reads a short container text and opens the guide
container.mdwhen its work needs it. (Nothing for you to do.) - QwenCloud reaches 1M, like Claude and Codex. Grok runs with what its models hold: 500K on Grok 4.7 and 256K on Grok Build 0.1. Their Auto is the same as Claude's (by ticket kind: 450K for a plan, 300K for a build, 200K for a fix), up to what each model holds (5.13.3); with a Grok API key a prompt of 200K or more bills double.
| Ticket kind | Claude and API providers | Codex |
|---|---|---|
[PLAN] / [REPLAN] | 450K | 350K |
[VERIFY] — it checks several tickets and reads much data | 350K | 300K |
Build / [WORKER] / [RELEASE] | 300K | 250K |
[FIX] — one specific problem / [HELPER] | 200K | 200K |
[PEER] | the limit of the ticket that opened it | the same |
The order is plan > verify > build > fix. A [PEER] thinks about the same problem as the ticket that opened it, so it gets that ticket's own value, or the Auto of its kind in the peer's column (a peer of a planner: 400K / 300K); with no opener, a planner's. A verifier opens one [FIX] per finding (or per small group in the same place, at most five a cycle), which keeps every fix small.
These are the declared sizes; CodeHero compacts at 80 % of each. A planner sets a value only with a reason — 100K for a ticket that only runs tests, 500K–1M for a planning ticket that must read a very large baseline. The table is in heroagent.conf (context_limits).
16. Vision Support
Some providers can "see" — analyze screenshots, UI layouts, and visual content.
| Provider | Vision | Use For |
|---|---|---|
| Anthropic | Yes | UI verification, styling, visual QA |
| GLM | Depends | GLM 5.3 FlashX, 5V Turbo, 4.6V see; GLM 5.3 and 5.2 are text only |
| QwenCloud | Depends | Qwen 4 Max, Qwen 3.8 Max / Flash and Qwen 4 Max Preview see; GLM 5.3 and DeepSeek are text only |
| Grok | Yes | UI verification |
| OpenAI | Yes | UI verification |
| OpenRouter | Depends | Depends on underlying model |
| Ollama | No | Backend only |
| vLLM | No | Backend only |
17. Code Editor
The built-in Monaco Editor provides VS Code-quality editing in your browser.

- Syntax highlighting for all major languages
- Autocomplete with LSP integration
- Hover documentation — hover over functions for docs
- Go-to-definition — Ctrl+Click to jump to definitions
- Real-time error detection — squiggly lines for errors/warnings
- Multi-tab editing — when the tabs no longer fit, ‹ › buttons and a list of all open files appear; the mouse wheel scrolls the tabs, and the tab you open is always in view
- File tree — navigate project files in sidebar
- Search & replace — Ctrl+H
- Minimap — code overview on the right
sudo /opt/codehero/scripts/setup_lsp.sh to install language servers for full IDE features.18. File Explorer

- Directory tree with expand/collapse
- File preview for text, images, and code
- Upload via drag-and-drop or file picker
- Create, rename, delete files and folders
- Download files
19. Git Manager
Full version control through the web interface.

CodeHero automatically detects Git repositories in your project directory. Multiple repos per project are supported.
Clone & Init

Clone remote repositories (HTTPS/SSH), initialize new repos, and store Git credentials per repository.
Private addresses (5.8.0): a clone from an address on your own network is refused, unless Allow imports from the local network is on (Section 28, «system.conf»). While Keep AI work on the maintenance copy is on, every Clone is refused (Section 3).
Clone over old files: tick Replace local files with the repository's files — a backup snapshot is taken first (without it nothing is replaced); optionally also delete local files that are not in the repository (ignored files such as .env always stay, and so does another repository inside the folder). The dialog shows each step live with its time (backup snapshot, fetch, checkout). Files of another user (served web files often belong to www-data) are taken over when the repository tracks them, so Git can replace them now and pull later; the others keep their owner. Remove repository (Settings → Danger zone) deletes that repository's .git and .gitignore in its own folder and its record with the saved credentials; other files and the project's other repositories stay.
Changes & Commits

Laid out like an IDE's commit view: the changed files on the left, each with a tick — only the ticked files are committed (Commit / Commit and Push); an unticked file stays uncommitted, also after Refresh. Click a file to see it from the last commit to now on the right: Split = before | after side by side, Whole file shows the unchanged lines too, and fullscreen gives the view the whole screen. The diff viewer: one card per file (Added / Modified / Deleted / Renamed, +/− counts), old and new line numbers, the changed part of an edited line marked, Unified / Split (remembered), staged and not-staged changes apart, and Open in editor ↗. The same viewer is used in History and Backups.
Branches

View local and remote branches, create, checkout, merge with conflict resolution, and delete. Checkout on a remote branch switches to (or creates) your local branch that tracks it. With no branch checked out (a tag or a commit), the card shows detached @<commit> and a notice offers Create branch here, so the commits made there can be pushed. Push creates a new branch on the remote and makes it track it; History marks a commit pushed when a remote branch has it.
Conflicts
When a merge or pull stops on conflicts, a Conflicts (N) tab appears. A banner says what is merged into what, and each file shows its conflict blocks side by side (ours = your current branch, theirs = the branch being merged) with the differing words marked and the lines around them.
- Keep ours / Keep theirs / Keep both — per block; Ours / Theirs everywhere — every block at once (the changes git merged on its own stay), then marked as resolved
- Edit ↗ — opens the file in the Code Editor at that block's line
- Mark as resolved — refused while conflict markers remain
- Commit the merge when all files are resolved, or Abort merge
<<<<<<< markers.Tags

View, create (lightweight and annotated), push, and delete tags.
History

Commit log with author, date, message. Diff viewer per commit. Revert specific commits. Reset to any commit (soft/mixed/hard).
Stash

Stash current changes, list stashes, apply/pop, and drop.
Diff Viewer

Full-screen diff with inline or side-by-side comparison, syntax highlighting, and line-by-line navigation.
Backup History

After a power cut or a crash (5.11.0) — each snapshot reaches the disk before CodeHero says it is done. If a power cut still damages a project's snapshot history, the next snapshot keeps the old history aside (nothing is deleted), starts a new one and says so in the ticket's log, with the folder that keeps the old one (/opt/codehero/git-backups/<project id>.damaged-<date-time>). The list then starts again from the new history. A snapshot that cannot be made says «Snapshot failed: …» in the ticket's log.
A restored secrets folder (5.11.0) — with «Ticket sandbox» on, a restore (a snapshot, one file, a ZIP) keeps a restored .secrets folder closed to tickets and assistants, as the Secrets menu makes it. If it cannot, the restore's answer ends with «… still carries access inherited from the project folder»: restore again.
Auto-Commit & Auto-Push
Configure per repository: auto-commit when AI completes a ticket, auto-push after auto-commit.
Settings

Remote URL management, credentials, auto-commit/auto-push toggles, default branch configuration.
Git and tickets (5.8.0, changed in 5.13.4)
There are two kinds of repository.
| Repository | Whose it is | What a ticket may do |
|---|---|---|
The project's own repository (the project root's .git) | Yours | Read only |
| A repository in the Git Manager | Yours | Read only |
| A repository the ticket cloned or created in a NEW subfolder | The ticket's | Everything: clone, init, add, commit, branch, checkout, pull, fetch, push |
Rules for your repositories:
- A ticket reads them:
status,log,diff, branches, tags. - A ticket never writes into their
.gitfolder. In 5.13.4 the sandbox makes your.gitfolders read-only for the ticket. - If a ticket wants to commit, the refusal tells it to write in its report: the files, and a commit message. You commit in the Git Manager.
- The refusal is not a reason to stop. The ticket finishes the rest of its work.
Rules for the ticket's own repository:
- It is in a NEW subfolder of the project. It is not the project root.
- The Git Manager does not manage it.
- The ticket uses a token or a key BY PATH from
.secrets/. It never types or sees the value.
Other facts:
- A ticket keeps its own work with snapshots (CodeHero's backup copy of the files, never your repository). You see them in the project's Git Manager → Backup History.
- The check reads the words of a command. It is not a wall: a script a ticket runs is not read.
- You and your assistant keep every action of the Git Manager.
Managed Git with the maintenance control (5.8.0)
The switch Keep AI work on the maintenance copy (Settings → Security → 🛡 Protections, Section 28) is off at the start. With it off, Git works as before. While it is on:
On the live project (and on every other project that follows the server and is not a maintenance copy):
- The Git Manager keeps working (Pull, Commit, Push), with the checks below. Clone is refused (Section 3, «Imports while the maintenance control is on»).
- Before each Git command, CodeHero checks the repository's settings (
.git/config,.git/config.worktree). Ordinary HTTPS and SSH repositories pass. - Refused, with a reason: linked worktrees, submodules, Git LFS and settings outside CodeHero's list.
- A setting outside the list: Git Manager → the repository's card → Remove unsupported settings. It shows the exact lines it will remove; click OK and it removes only those lines, then checks the repository again. No console is needed. LFS settings are not removed: LFS stays refused while the switch is on. If the settings changed meanwhile, nothing is removed: press the button again.
- A refusal shows its own reason on the repository's card and in the message, never only «An error occurred».
- A project set Off for this project (its page → 🛡 Security — Protections) keeps Git as before.
On the maintenance copy:
- The Git Manager uses CodeHero's own repository on the server. CodeHero copies the copy's files into it, without
.gitand.secrets. The copy's own.gitis never used. - You see the changes and their diff. Then: the repository → Changes → Commit and Push. Every other Git action is refused there.
- The commits made there carry the same name and email as a Commit in the Git Manager on any project: the server account's Git name and email. Only when the account has none, «CodeHero» (
codehero@localhost). - A push that did not finish keeps the commit: press Changes → Push to try again. It is never retried by itself.
- Then open the live project: its Git Manager → the repository → Pull.
A saved token (the repository → Settings):
- Save Token ties the token to the Remote URL shown there. While the switch is on, the token goes only to that exact address. A scan or a changed remote does not send it elsewhere.
- A token saved before 5.8.0 is not sent while the switch is on: check the Remote URL, type the token again and press Save Token. Do it on the live project and on the copy.
- SSH keys and agents keep working.
Also:
- Git snapshots keep working, in CodeHero's own repository. Complete ZIP backups are separate.
- If the switch's setting cannot be read, Git is refused: finish an interrupted upgrade, then check Settings → Security → 🛡 Protections.
- A Git command that failed or was cut is never run again by itself. Check its result before you try again.
- With the switch off, the account's Git name and email are the defaults; the repository's own name and email win.
Repository hooks (5.8.0)
When CodeHero runs Git for you, a repository's own hooks do not run. This covers Commit, Push, Pull, Clone, the backups and the snapshots.
- A hook is a script inside the repository (
.git/hooks). Git starts it by itself. - A hook in an imported repository could run any command on the server. That is why CodeHero skips it.
- With Keep AI work on the maintenance copy off, Git LFS keeps working: before a push, the panel uploads the LFS files itself. With it on, a repository with LFS is refused (above).
- The panel uses the credentials you saved here, not a helper program the repository names.
- A commit or a tag the panel makes is not signed, even if the repository asks for signing.
Git while «Ticket sandbox» is on (5.11.0)
With «Ticket sandbox» on (Section 28), the Git Manager works as before. Every kind of repository works: plain ones, linked worktrees, submodules and Git LFS. You type no token again, and no new question appears. Backups, restores, imports, exports, snapshots and Project Files work as before.
The small differences:
- Pull fetches, then merges. The result and the conflict viewer are the same.
- Each Git call takes a little longer. A page with many Git calls loads a little slower.
- CodeHero saves the remotes of each repository (name and address). An address that appears in the repository's folder later is shown, not used. The repository's card says «the folder names <address> for <name> — not saved; Set remote uses it». To use it: the repository → Settings → Remote URL → Save Remote. A ticket cannot change the remote that CodeHero uses.
- A saved local remote whose repository now points somewhere else is refused. The message asks you to save the remote again.
20. Console (Real-time Output)

- Live streaming — See AI output as it happens
- Auto-scroll — Automatically follows new content
- Pause/Resume — Pause scrolling to read
- Color-coded — Different colors for different output types
21. Web Terminal

- Real shell access — Full PTY terminal via WebSocket
- Popup support — Open in popup for multi-monitor
- Full sudo access
- 256-color support with xterm.js
- Copy/paste — Standard clipboard operations
- It asks again (5.12.3) — before the server's terminal opens, the page asks for your panel password and a current 2FA code (the password alone while 2FA is off). The answer lets that browser open terminals for 30 minutes (a terminal already open stays open); a new panel password or a sign-out ends it (a sign-out also closes that browser's open terminals), and opening a terminal does not extend it. Only the owner can open it. The permission is made when you sign in: after the upgrade to 5.12.3, sign in again once (an older session sees «Sign out and sign in again to use the Terminal.»).
- A project's container terminal opens as before, except for a project in
productionmode or LOCKED: it asks the same. Only the container of a project opens; any other name is refused. - Every terminal that opens, and every one that is refused or fails to start, is a row of the security history (who, which terminal; never the password or the code). A terminal belongs to the browser tab that opened it: no other tab can type into it.
22. Package Manager

| Package | What It Installs |
|---|---|
| Development Tools | Node.js 22, Java (GraalVM 24), ffmpeg, ImageMagick, tesseract |
| Phone apps, Windows programs, Docker, .NET | Not installed on this server: phone apps and Windows programs are built and tested on a connected device (Devices); Docker and .NET run inside a project's container (Create Container → «Docker support»; the Services tab's .NET runtime) |
| Code Editor LSP | Language servers for Python, JS/TS, PHP, Java, C#, Kotlin, HTML/CSS |
23. Session History

View all past AI execution sessions: start/end times, duration, exit codes (0 = success), associated ticket, token usage, and full session log. Filter by date, project, or status.
24. Project Progress

Visual overview: completion percentage, ticket counts by status/type, sequence flow visualization, model distribution, and built-in AI assistant for project-specific chat.
25. Kill Switch
Instantly stop the AI when it's working on a ticket.
You do not need to stop a ticket to talk to it. Write in the ticket page or the mobile chat and press Send while it works: the message goes at once and the agent reads it at its next step (Claude, Codex and every API provider), in the same run — like a message from another ticket. A message that arrives as the run ends re-opens the ticket, so nothing is lost. Use the Kill Switch only to stop the work.
| Method | How |
|---|---|
| Stop Button | A split button ⏸ | ⏹ appears next to Send when the ticket is in_progress; the red ⏹ half stops at once |
| /stop Command | Type /stop in the chat field |
Pause (⏸ or /pause) | Since v4.50.16: the ticket finishes its current step, stops what it started, notes where it is and waits (NEEDS THE USER: yes). Continue with /resume, «συνέχισε» or any message |
| ⏸ Pause Project | Since v5.1.10, on the project page next to Archive: no ticket of the project starts and every running ticket gets /pause (use it before an upgrade). ▶ Resume Project sends /resume to the tickets it paused; a ticket you paused on its own waits for your own /resume. A paused ticket is resumed only by you: a message from another ticket waits until you resume it |
Change-ledger checks (/ledger) | Since v5.0.6: /ledger off <why> turns the change-ledger checks of the project off (no task card, no completion check, no rollout rule); /ledger on turns them back on. The project page has the same switch and the assistant can do it at your request; each switch is written as a row of the ledger with your reason |
| AI Assistant | Ask: "Stop ticket PROJ-0001" |
A stopped ticket stays stopped (5.12). A ticket you stop with ⏹ or /stop, or that the approval reviewer stops, is not woken by another ticket: not by its reply or its final report, not by the waiting-check, not by a status change, a start, a retry or a force. You start it again with a message on its page, or with Start Now. The assistant does the same when you ask it.
What happens:
- The agent stops immediately — together with everything it started: the Claude CLI or the Codex app server, their sandbox, and the command that was running.
- Since 5.8.0 also the commands Claude Code, Codex and Grok Build started themselves, each in a process group of its own (before, a long command of theirs could keep running after a Stop), inside the container too.
- The same stop runs when Keep AI work on the maintenance copy (Section 28) or a disk step (Section 31) stops a ticket.
- The known limit: a command run under
env -i(it clears its own environment) or undersudois not found this way. - A command the CLI was still preparing, or tries to start after the Stop, does not start: it answers «⛔ [CodeHero] This command was not run: the ticket's run is being stopped, or has ended».
- Ticket status changes to
awaiting_input. - A system message confirms the stop.
- You can provide new instructions or corrections.
Live Preview tab. It shows the project's page inside the panel. Since v4.50.10, when the app refuses to be shown inside another page (frame-ancestors 'none' or X-Frame-Options: DENY), the tab says so and offers Open in a new tab instead of staying empty. To see such an app there during development, let it allow the panel with CSP only: frame-ancestors 'self' https://<its own host>:<panel port> in development (never https://*:<panel port> — any host on that port could frame it; keep X-Frame-Options, browsers ignore it when frame-ancestors is present), 'none' in production.
26. AI Assistant

- Provider selection — Choose any active provider
- Model selection — Pick developer role
- Session management — Multiple chat sessions, saved history
- Popup window — Open in separate window
- Voice input — Speak instead of typing
- File upload — Share files with the AI
AI Project Manager
From the Projects page, click "Plan with AI" to start a guided project planning session. The assistant writes the specification with you (or imports a Spec Builder package), shows a preview with the settings, the day-0 inputs and the run settings, and after you confirm creates the project, its environment and exactly one ticket: the planning ticket ([PLAN] …). The planning ticket plans on the real installation — baseline, dry run, review rounds, and an agreement with a [PEER] ticket by the project's size and risk (another provider family when one is active, otherwise the same provider) — asks you what came out of that in one batch, and creates the first phase of tickets (with [VERIFY] tickets on a different provider after risky work; a real project runs in phases that each end with a [REPLAN] ticket). A small change on an existing project is one ordinary build ticket, not a plan.
The plan is checked before it starts (5.18.0). Each point of a specification has one status: open (a question for you), safe-default, technical or confirmed. A critical point is never a default: it stays open until you answer; money is critical. CodeHero creates no ticket while a line breaks these rules, both when the assistant creates the [PLAN] ticket and when a [PLAN] or [REPLAN] ticket creates the tickets of its plan. The AI fixes the lines it is shown. Which model to plan with: Plan with AI writes its best specification with a big or a mid cloud model (Claude, GPT).
The system shape is your decision (5.9.0). Which program of the product calls which while it runs, and when; what must be up for the daily work; what still works when one is down; and each check that holds or refuses a user's action. The assistant and the planning ticket ask you. Until you answer, the item stays an open question, never a ticket. A peer or a verifier reports a call or a hold that you did not approve, also when it works.
Checks and tests (5.9.0). A verifier keeps to the work it checks, and each finding names a concrete trigger in the application's real use: a case that can never happen is not a finding. A red test outside that work is recorded, and the next [REPLAN] runs it again. A ticket runs its tests once, after its last change. The full test suite runs at the final check, when a [REPLAN] accepts a release candidate, or when you ask; a [REPLAN] in the middle of a plan runs the core tests and the slower tests of the parts its phase changed. ultra and master_developer only on your word (Section 14, Section 15).
What the assistant and the companion may do (5.7.0)
The panel assistant and the companion follow the same rules as a ticket, with every AI provider. Nobody can click Approve for them, so a step that needs your yes is refused, and they tell you why and where you do it. (With «Ticket sandbox» on, an assistant shows you an Approve card instead: see «The assistants and «Ticket sandbox»» below.)
| They do by themselves | They cannot do — you do it here |
|---|---|
| On a device: Test, the emulator's check, list, live view, screen, show, place, start, stop, tap, type and key; the LLM server's status, temperature, start and stop (Section 33) | A command, a file copy, an install, a download, a higher temperature limit, stopping another project's emulator → the device's page (Devices → the device), or a ticket with the device's skill after your Approve of that exact call |
Read and Test a Local LLM slot (custom1, custom2); set it, and connect a device's LLM to it, after your yes on its card (5.17) | Without a card: change a slot → Settings → Providers → Local LLMs (every ticket on that slot would send its prompts to the new address) |
| Start a process (ProcessManager) with a command their command rules allow | A process in the platform's secret folders, or with settings that load other code → a ticket, after your Approve |
| — | Read the secrets of /etc/codehero (system.conf, api_keys.conf, credentials.conf) — refused to them |
| Tell you where a protection is and what it does (5.8.0) | Change a container's Limits, the switch Containers: block private networks or a project's allowed addresses → the project's Container tab (Section 31). Allow imports from the local network → Settings → system.conf (Section 28). They never switch a protection off |
A production or maintenance project, a locked project (5.7.1). The assistant and the companion follow the project mode and the lock, as a ticket does (Project modes and the project lock):
- In a
🔒 Productionproject they only read. They tell you what they wanted to change and why. - In a
🛠 Maintenanceproject a chat that can ask you (an API provider, the Claude chat terminal) asks y/n and shows the DANGER level first. A chat that cannot ask (the Claude, Codex or Grok subscription, the background workers) refuses the change and tells you to open a ticket. - They make a project's mode stricter or lock a project only after your yes. A less strict mode and the unlock are yours, on the panel.
- On a LOCKED project they cannot delete its folder, destroy its container or restore over it.
The assistants and «Ticket sandbox» (5.11.0)
With «Ticket sandbox» on (Section 28), the panel assistant, the companion and its background workers join the sandbox. You work as before: the assistant stays as easy as it was, autonomous tickets stay autonomous, and every hold starts again by itself.
- Where they work. The assistant runs its commands and its file work in a closed space of its own. That space has none of the server's secrets. The assistant can still work on every project.
- Every AI route. With «Ticket sandbox» ON, the panel assistant, the companion and its workers run walled on every AI route: the shell and the files of the Claude subscription, Codex and Grok are confined too, the AI login never enters the sandbox, and a power tool asks you once. A turn starts a little slower. «Full access for this chat» is the way to today's assistant.
- A power tool asks as before: one Approve card, and «ναι» or the button.
- A Claude Code Mode 3 chat starts its terminal again at each turn. It starts a new Claude Code session when the sandbox state changes (the switch or «Full access for this chat»), with a short summary of the chat, and after a web restart.
- «Platform Help» (the manual's questions and answers) on a Claude subscription, Codex or Grok route is text only: it has no tools, also with «Ticket sandbox» OFF.
- One card for a power step. These steps ask you once, in the chat: a change to a container; a change to a container's services (and their database passwords); devices (beyond looking and Test); a Local LLM slot; Git changes (commit, push, pull, reset, restore); restores and imports; an export for a migration; a project's mode, lock or ledger checks; the background workers; a notice on the News board; a reload of the platform; and the installers of the codebase map and of semantic search. A call that sends work to a ticket whose AI route runs outside the sandbox (a new ticket, a reply, a start, a retry) asks too.
- The card says «🔔 Needs your OK — …» and shows the whole call. A long call folds: show all opens it.
- Press Approve, or type «ναι» (or «yes») while one card waits. With two cards, press Approve on the one you mean. The assistant then goes on by itself.
- A call too big for a card is refused: «this call is too large to approve in the chat - use Full access for this chat».
- A restore or an import from a project's folder shows the file (its name, its size and a short fingerprint), or the folder's file count and each Git remote the import adopts. If the file changes before you press Approve, a new card appears.
- Inside a container the assistant has the rights of a ticket of that project (Section 31): the project's mode and its Root in the container and Tickets may install packages switches decide, and a step that needs your yes shows a card.
- A background worker cannot show a card. A step that needs your yes is refused for it. That step runs in a chat, where you can say yes.
- Full access for this chat. One switch under the chat box, in the assistant's window and in the companion's panel. It shows only while «Ticket sandbox» is on, and every new conversation starts with it off.
- On: THAT conversation works as before 5.11. Its commands and files run outside the sandbox, and it shows no cards. The badge says «🔓 full access», with «— from your next message» until your next message.
- Every other chat stays in the sandbox. A background worker never has full access.
- Only your click turns it on. The AI cannot. The history of who did what records it.
- It is for a chat in the sandbox.
- Hidden values. In the sandbox the assistant does not see a project's database password, a container's root password or a preview key. It reads «hidden — open the project's 🔐 Secrets page, or turn on full access for this chat».
- A command that was stopped. When a project changes under a running command, the chat reads «stopped: project … changed (…) - it may have done part of its work». The assistant looks and goes on.
- Attachments still work. Switch off: everything as before.
- Known limit. Your assistant chats are all yours, so they share one sandbox account. One chat can see what another chat of yours works on.
27. Telegram Notifications
Setup
- Create a Telegram Bot via @BotFather — send
/newbot, copy the token - Start a chat with your bot and send a message
- Get your Chat ID from
https://api.telegram.org/bot<TOKEN>/getUpdates - Configure in Settings — paste Bot Token and Chat ID, select notification types, Test & Save
Notification Types
| Event | Description |
|---|---|
| Awaiting Input | AI completed and needs review |
| Task Failed | Something went wrong |
| Watchdog Alert | Ticket appears stuck |
| A ticket asks me a question | Its report says NEEDS THE USER: yes (not a ticket waiting for another ticket, not your own pause) |
| Usage limit / credits used up | A provider's usage window or credits ran out — once per wait; the ticket retries by itself |
| Chain watch: a chain stopped | The hourly chain watch found a chain of tickets that stopped although work is left |
Send: Everything ticked above (as before) or Only when I'm needed — questions to you, stopped chains, usage limits, failures and stuck tickets only.
Chain Watch
Once an hour CodeHero looks at every project where work is left but nothing runs — only at the tickets that should run now (never a ticket out of turn) — and finds why the chain stopped: a ticket waiting for one that already ended or answered, a reply that was not acted on, a peer left open, a strict ticket nobody closed, a question to you, a failure with a passing cause. Settings → Chain watch: Off, Tell me what it finds (default) or Restart it when safe (wakes with a note or retries a passing failure, at most twice a day per ticket). It never touches a ticket you paused or stopped or one that asks you a question, and never closes, deletes or edits anything. Its small model (junior + basic) runs on the ticket's own provider, then on the next active provider of quick_call_failover in heroagent.conf.
It looks only at a chain whose waiting ticket changed within the last 7 days — an older stopped chain is left alone — and it tells you about a stopped ticket once: the same ticket is not reported again unless it changed after the notice.
Two-Way Communication
Reply directly to notifications from your phone. Start with ? for status queries without reopening the ticket.
28. Settings & Configuration

Open Settings with the gear button in the header. Settings is a page (5.16.4): the left column lists every section by group (General: Settings, Providers, License, Voice, Semantic search, Performance · Security: Security, Certificates, Domains, 🔑 API keys · Advanced: heroagent.conf, system.conf), and the section you click opens on the right. A big section has tabs along its top: Security (Account, Protections, Firewall (WAF), Keys and backups), Performance (Mode and values, PHP cache and JIT, System profile) and Settings (Identity, Notifications, Updates). On a phone the left column becomes a Settings: list at the top. Every section and tab has its own address you can bookmark, for example /settings/security#protections. Providers still opens its own window on the dashboard. The paths in this guide (Settings → Security → Protections) did not change. The sections:
Settings (General)
- Dashboard password — Change the admin password
- Session timeout — Auto-logout after inactivity
- Theme — Dark mode (default)
- Provider API keys — Configure keys for Anthropic, OpenAI, Grok, GLM, QwenCloud, OpenRouter — or sign in to a subscription (Claude Code, Codex, Grok Build)
- Telegram — Bot token, Chat ID, notification preferences
License
View license status, activation date, and expiry. Enter or update your license key.
Certificates
- Self-signed — Auto-generated on install (default)
- Let's Encrypt — Request free SSL certificates for your domain
- Custom — Upload your own certificate and private key
Domains
Configure custom domains for the dashboard and web project previews. The system auto-configures Nginx virtual hosts.
Always set both, on two different names (for example panel.example.com for the dashboard and apps.example.com for the previews). A browser sends a site's cookies to every port of the same name. With one name, a project page you show a customer runs on the same name as your panel. With two names, the panel's login never reaches a project's page.
One name (or none, an IP) is saved too (v5.9.0+): Save & Apply answers «One address: allowed» with its limits («Keep panel and app addresses separate», Settings → Security → 🛡 Protections).
heroagent.conf
Edit the main agent configuration file directly. Controls model aliases, token limits, provider settings, and daemon behavior. Auto-backup is created before each save.
system.conf
Edit system-level configuration: Nginx settings, PHP-FPM settings, and other server parameters.
Allow imports from the local network (5.8.0). An import by URL refuses addresses on your own network (Section 3). To allow them:
- Settings → system.conf.
- Add the line
ALLOW_LOCAL_NETWORK_IMPORTS=true. If the line is there withfalse, change it totrue. - Click Save & Restart.
- It is off by default. A missing line, or any other value, means off.
- Turn it on only for a source you trust on your own network.
- To turn it off: set
false(or delete the line), then Save & Restart.
Security
In a security test report, SKIP means the check was not completed. Passing tests of the source code does not prove the installed server passed; its version and checks need separate evidence.
| Feature | Description |
|---|---|
| Change Admin Password | Your panel password (and, optionally, a new username) |
| MySQL App User Password | The password CodeHero's own database user uses; the web services restart |
| MySQL Root Password | The server's MySQL root password |
| Enable 2FA | Turns on an authenticator app (Google Authenticator, Authy, Microsoft Authenticator …) — the owner only, while 2FA is off. A new phone: use Reset 2FA (5.9.0) |
| Disable 2FA · Reset 2FA | Off with your password or a code · a new secret and a new QR code (your password and a current code, 5.9.0). Both end your recovery codes |
| Recovery codes | Ten single-use codes for a lost phone: «N of 10 left» · Make new codes (5.9.0) |
| Security keys | A security key or a passkey as the second factor, beside the code: the list, Add a security key, Remove (5.9.0) |
| Backup encryption key | Your own age public key: every backup you download from the panel is encrypted for it (5.10.0, below) |
| Unlock Account | Clears a sign-in lock — your password and a current 2FA code (5.9.0). While your own tries are locked: the console's manage-2fa.sh unlock |
| Remember Device | Skip 2FA on trusted devices until end of month |
| Account Lockout | 5 wrong passwords for one account from one address lock it there for 30 minutes; 20 from one address lock that address. The locks stay when the panel restarts (5.8.0) |
Protections (5.8.0)
Settings → Security → 🛡 Protections:
- Keep AI work on the maintenance copy — off at the start. Tick it to turn it on for the server; a box asks first. AI tickets then run only on a live project's maintenance copy, never on the live project.
- What ON does: AI tickets start only on a maintenance copy that Start maintenance started. On every other project that follows the server, a new ticket, Start, Retry, Reopen, a forced start and the assistants' ticket tools are refused, and the message says why. A ticket that was waiting to start there is held («⚠️ Not started — «Keep AI work on the maintenance copy» is on …»); nothing of its work is lost. The AI tickets already running there are stopped within about 30 seconds: the agent, its commands and its Claude Code session. A project without a copy that must keep its AI tickets: set it Off for this project first. Imports by URL and the Git Manager's Clone are refused (Section 3). The Git Manager checks each repository's settings first; on the maintenance copy it offers Commit and Push (Section 19, «Managed Git with the maintenance control»). A token saved before 5.8.0 needs Save Token again.
- What OFF does: AI tickets start as before. A ticket it held starts again when you send it a message on its page.
- It never unlocks a project, changes a project mode or releases a hold. Under the switch the panel says whether it is enforced now: Enforced (no AI ticket runs where it is refused), Pending (some are not yet proved stopped — CodeHero stops and checks them again every 30 seconds, also after a restart, until they are), Not known now (the protections store cannot be read: new AI tickets wait, running ones are not stopped).
- It is CodeHero's own check of its tickets, not a wall inside the server: a ticket on the trusted owner's account can still reach the server. For a wall, put the maintenance copy on a separate CodeHero server. («Ticket sandbox», below, puts the tickets of the routes that run inside it in a closed space of their own.)
- A project can opt out: its page → 🛡 Security — Protections → Off for this project → Save. Follow server → Save puts it back.
- The project's panel also shows what is in effect for it, its role (the live project or its maintenance copy), Check (ready to go live: the same check as Production Deployment → Check dedicated hosting), and its container's limits and private-network rules.
- Trusted panel proxy (v5.9.0+) — off at the start; a NEW installation of 5.16.3 turns it ON after it checks the panel's route (if the check fails, it stays OFF and the last lines of the install say why; an upgrade never changes it). It decides which address the sign-in limits count (5 tries per account and address, 20 per address). OFF: the panel trusts the
X-Real-IPheader of every request that reaches it, as before — a program on this server (any site's PHP) can send a different address with each guess. ON: only requests CodeHero's nginx signs choose the address; the panel computes it from the connection and, behind your trusted upstream proxies, fromX-Forwarded-Forread from the right. A request it cannot verify gets «This sign-in could not be verified — trusted panel proxy: …» (503), and nothing is counted. Trusted upstream proxies: a load balancer or a remote reverse proxy by its exact address or network, separated by commas → Save; each must replaceX-Forwarded-Foror add the address it saw. Refused: this server's own addresses, loopback, the containers' network, the VPN clients' network (one remote proxy over the VPN by its exact address is fine), the whole internet. Turning it ON is refused while a panel location of nginx lacks the proxy line, or while nginx still reaches the panel another way — a block that passes to127.0.0.1:5000orhttps://127.0.0.1:9453, directly, in a file itincludes, through anupstream(http or stream), or in anyserver/proxy_passline of any file nginx loads (§32); while it is ON, a new secret, the list and a repair are refused the same way, and OFF always works. Aproxy_passto a variable address, or anincludewhose pattern CodeHero cannot read, is shown as «could not resolve: …» with its file, and refuses nothing: check that block yourself. If the configuration cannot be read at all («the inventory … is unavailable»), ON is refused and OFF still works. A change takes a few seconds: sign-in waits meanwhile, open sessions go on. Console:sudo /usr/local/lib/codehero/sandbox-ctl auth proxy status(on,off,trusted-set …,rotate,repair). - Keep panel and app addresses separate (v5.9.0+) — off at the start; for the whole server only (a project's page shows it read-only). ON refuses, before anything changes: a new port forward that is not TLS (TCP, Both or UDP); a TLS forward whose certificate covers the panel's or the previews' name, another name the panel answers on (a frontend block on 443 too) or this server's address (also when such a certificate is uploaded, issued or imported for a forward that uses it — the old one is kept; a renewal with the same names passes); a site on the panel's, the previews' or the database tools' exact name and port (every name and port of the new site; the Domain field holds one name); a site whose nginx file, with its includes, would send its backend another cookie line. What is there already is listed under the switch with its fix and marked ⚠ on the Container tab — nothing is changed. «Could not inspect the protected listeners» and «Store unavailable» are never OFF: new sites and forwards wait. A restore, an image import and a registered custom service keep their own forwards (listed while ON); a service port refused while ON is never opened later as «kept». OFF: as before; nginx keeps the panel's and the previews' sign-in away from your production sites anyway. One address (the panel sharing its name with the previews or a site, or an IP only) is allowed, with limits: a site on that name can SET cookies your browser sends to the panel and the previews (it can sign you out or break a preview's sign-in; it cannot read them); if you accepted a certificate warning for the panel, never accept one on another port of that address; a name pointed at this server elsewhere, CodeHero cannot see — sign in only at the panel's own name. Use two names for the most protection. Console:
sudo /usr/local/lib/codehero/sandbox-ctl separate-addresses status(on,off). - Recovery codes (5.9.0) — off at the start; your panel password and a current 2FA code change it. ON makes no code: make them in Two-Factor Authentication → Recovery codes → Make new codes. OFF ends every code at once (the unused ones and a set not yet confirmed), and every other browser signs out. ON again brings no code back. On the console, with the panel and the database down:
sudo /usr/local/lib/codehero/sandbox-ctl auth codes off.sandbox-ctl offturns OFF only the protections of the policy (Keep AI work on the maintenance copy, Keep panel and app addresses separate, Ticket sandbox, Ticket network limits). It leaves the codes: they block nothing, and removing them would remove a way in. - Security keys (5.9.0) — off at the start; your panel password and a current 2FA code change it. ON needs 2FA on and the panel at its domain name with a real certificate (Settings → Domains) — never an IP address; the server first checks, through its own web server, every address the panel answers on (up to 20 seconds). IF another site could take the panel's name on the panel's port (the same name, a wildcard such as
*.example.com, or a pattern), or a site listens on a specific address of that port where the panel does not, THEN ON is refused and the message names its file. ON makes no key: add them in Two-Factor Authentication → Security keys → Add a security key. OFF keeps the keys but refuses them, and every other browser signs out; ON again: they work again. On the console, with the panel and the database down:sudo /usr/local/lib/codehero/sandbox-ctl auth keys off.sandbox-ctl offturns OFF only the protections of the policy (above). It leaves the keys. - Ticket sandbox (5.11.0) — ON at the start on a new install from 5.11.1, when the install checks pass; an upgrade never changes it. For the whole server only (a project's page shows it read-only; there is no choice per project). The installer turns it on only when this server can run it; if a check fails it stays OFF and the last lines of the install say why. A copy of the installation brought back on a new server sets it to what the copy had. «Ticket network limits» starts OFF. ON: each ticket works in its own closed space, as its project's own account. A ticket reaches its own project and the projects that allow it (Project links). It does not reach the server's secrets or the other projects. While it is OFF, every panel page shows you, the owner, one red line under the header: «Ticket sandbox is off: a ticket runs as CodeHero's own account and can become root on this server. Turn it on: Settings → Security → 🛡 Protections.» (5.12.3). It stays until the switch is ON; nothing turns it on for you, and an upgrade never does. If the panel cannot read the switch, the line says «Ticket sandbox: its state cannot be read».
- CodeHero prepares your projects in the background, one by one. The list under the switch shows how far it is: «N of M projects ready», and each project as ready, preparing now, failed (with the reason), waits, or waits for its turn. Turning it on gives the project's own group write access to the project files (for example 644 → 664). Turning it off does not change them back.
- A ticket of a project that is not ready yet waits, and says so: «⚠️ Not started — the sandbox of this project is being prepared — it starts again by itself.» You do nothing. It starts when the project is ready.
- A new project is ready within about a minute (5.13.4): a project that is not ready goes first. If a preparation fails, CodeHero tries again by itself after 15 s, after 60 s, and then every 5 minutes; the list says why and when: «… — it tries again by itself in 60 s». A paused project says «paused» and holds no other project; it is prepared when you resume it. A project whose folder is not there yet says «waiting for its folder».
- A file with a line break in its name no longer blocks a project (5.13.4). If a name truly cannot be given the access, the list shows that one file in one line (a line break is written
\n) and says «rename or delete this file». Rename or delete it (the project's Project Files page, or a ticket); the next try prepares the project. - LogTail in the sandbox (5.13.4) lists only the logs the ticket can read, and every refusal names a call that works. A ticket of a container project reads the container's logs with
sudo tailinside its container; a ticket of a host project reads the project's own log files. If there is no log it can read, it writes «server log not available» in its report and finishes: it does not stop to ask you. The PHP log is the one of the PHP version the project really uses. - The project folders are mounted
nosuid(5.13.4). A ticket can nowmkdir,cp -randchmodin its project folder; the sandbox's set-id filter used to stop a junior at its first folder./var/www/projectsand/opt/appsare mountednosuidon the whole server by a root service of its own (codehero-nosuid.service, at every boot, before nginx, PHP-FPM, the panel and the daemon); no project file, owner or mode changes, and a set-id bit that a ticket puts on a file gives nobody a new user or group. A project in a folder of its own keeps the filter. The same service mounts the accounts' homes (/var/lib/codehero/accounts) and the host secrets folders (/var/lib/codehero/secrets)nosuidtoo, and makes/var/www/projectsand/opt/appstraverse-only for other accounts (mode 2775 → 2771): a site's PHP could list those folders and so read the names of every project (your customers' codes); now it cannot. It still opens a path it already knows, and nginx and the PHP pools pass through as before. One effect to know: each of the two folders is a mount of its own, so a rename from/tmpinto a project folder, made by an app's own code (Nodefs.rename, Pythonos.rename, Goos.Rename), answers «cross-device link». PHP'srename()andmove_uploaded_file()and themvcommand copy instead. If your app does this, keep its temporary files inside the project or copy them. - Turning it ON asks first. A ticket that runs outside the sandbox at that moment is stopped and held. Nothing of its work is lost. It starts again inside the sandbox by itself, within about a minute.
- Turning it OFF asks first. The tickets that run in the sandbox finish there. New tickets start as before, outside it. Nothing is reverted.
- You work as before: backups, restores, imports, Git and autonomous tickets. Every hold starts again by itself.
- Tickets on an API key or a local model, Claude subscription tickets (the usual Claude mode for tickets), Codex tickets (the ChatGPT subscription) and Grok Build tickets (the SuperGrok subscription) run inside the sandbox. A subscription ticket uses your normal login: the same login, the same usage, the same page, and no «outside» line. The login itself never enters the ticket's sandbox, and it renews by itself, as before. If it has really ended, the tickets of that AI wait (see «Not started — the AI login of claude needs you», Troubleshooting; for Codex the line says «codex», for Grok «grok»).
- A Codex ticket follows the ticket's full permission rules: autonomous, semi-autonomous or supervised, and the project mode. Its commands, its file changes and its tool calls are checked before they run.
- A Grok Build ticket follows the ticket's full permission rules too: CodeHero's hooks check its commands, its file changes and its tool calls before they run. Before the first Grok run after an upgrade or a change of the Grok program, CodeHero tests that these hooks load. If it cannot confirm it, the ticket waits («Not started — the Grok hooks could not be confirmed», Troubleshooting).
- Known limit. Grok lets a call through when one of CodeHero's hook programs is stopped. A harmful process that the ticket itself starts can stop such a program. That can skip the approvals, the rules and the secret-output filtering that only the hooks apply, for what the ticket can already reach: its own project, the writable folders of projects that allow it, and its own project's secrets. Other projects, the server's secrets and the logins stay protected by the sandbox itself (root inside a container in
developermode is still a known exception, Section 31). - A Claude Code Mode 3 ticket (a Claude subscription ticket set to Mode 3) runs inside the sandbox too, with your normal login. Each turn starts its terminal again and continues the same conversation, a few seconds slower. A command it starts in the background is refused there: it uses a foreground command, or ProcessManager for a server.
- The assistants join the sandbox too (Section 26), on every AI route: an API key, a local model, the Claude subscription, Codex and Grok.
- Known limit. A route the sandbox cannot take runs outside it. The box that asks before ON lists such routes; since 5.11.1 none is left. A ticket on such a route works as before 5.11, without the sandbox's protection. Its page says «ℹ️ This ticket runs outside the sandbox: …». What the other tickets of the project (and of the projects that allow it) write can steer such a ticket. When every ticket of a project uses a route that runs inside the sandbox, no ticket shows that line. That is information about the routes, not a promise of total isolation: root inside a container in
developermode is still a known exception (Section 31). - Known limit. The tickets of the same project share that project's account. So a running ticket of a project can use the AI connection of another running ticket of the same project, but it never sees the login. A ticket of another project cannot.
- Known limit. Your assistant chats share one sandbox account (Section 26).
- On the console, with the panel and the database down:
sudo /usr/local/lib/codehero/sandbox-ctl ticket-sandbox off(and… ticket-sandbox status).
- Ticket network limits (5.11.0) — off at the start. For the whole server only. ON: the tickets in the sandbox and the containers keep off your private networks: your local network and your cloud's internal addresses.
- These stay reachable by themselves: the project's own container, the containers of the projects that allow it, its devices, its Local LLM slots (Section 33) and this server.
- Another address: the project's page → 🛡 Security — Protections → Tickets may still reach (private addresses) → Save addresses. One address or network per line (IPv4). It is the same list as the Container tab's «This project's container may still reach» (Section 31).
- It also turns «Containers: block private networks» ON. While Ticket network limits is ON, that switch stays ON: its line says «on because Ticket network limits is on», and unticking it changes nothing.
- A container starts only when CodeHero sees the rules in place. Until then the panel says «The containers' rules are being put in place (…) - container starts wait and then go on by themselves.», and a ticket that waits says «… the network limits are being put in place — it starts again by itself». You do nothing.
- A ticket that is running keeps the rules it started with. New tickets get the new rules.
- OFF: the tickets in the sandbox reach private networks again. «Containers: block private networks» stays as it is.
- On the console:
sudo /usr/local/lib/codehero/sandbox-ctl ticket-network off(and… ticket-network status).
- After a power loss or a crash (5.11.0). A power loss or a crash can cut a change in the middle: a switch, a project's mode or lock, a delete, the root switch, Git. When the server starts again, CodeHero repairs the permissions by itself. Nothing stays stuck, and a ticket that waits starts again by itself. A change of yours that did not finish is done by one more click of the same button. A package install that was cut is finished by the next install of that project (the Container tab says so).
- Separate PHP for each project (5.11.2) — there is no switch. Every new project, and every project that comes back as a new one (Restore as a new project, a backup ZIP import), runs its PHP as its own account, in its own PHP pool, and its folders are closed to other accounts. The PHP of one site cannot read another new project's files, sessions or uploads. The web server follows no link that a site's own PHP made to another owner's file, on the previews and on the production domains (5.13.4). One limit: a link owned by CodeHero's own account is followed - only a ticket can make one, while «Ticket sandbox» is OFF (Securing CodeHero lists the limit). Moved into a container, a project’s PHP and its web server are one account, as in every container project: a folder that only PHP should read is served too when it lies in the web folder - keep such data in the app folder. Projects that existed before the upgrade stay on the shared PHP (
www-data) as they were. The Protections page says how many still use it and lists WHICH projects (name and code, each a link to its page). To give a project its own PHP: its page → Backup & Restore → make a backup → Restore as a new project → check it → delete the old one (move its domain after the check). CodeHero changes no project by itself. phpMyAdmin and the DB manager now run as their own account too; open them again from the panel after the upgrade. - Not yet available: Database through CodeHero, Container network limits, and the Security level (Dev / Production / Custom / Fortress). They come later.
- The containers' own controls stay on each project's Container tab: Containers: block private networks (what it covers is shown), Limits, and, since 5.11.0, Root in the container and Tickets may install packages (Section 31).
- Recovery checks pending (red): this installation was restored and stays held until its recovery checks finish.
- If the panel says the protections store cannot be read, use the console line it shows (Troubleshooting, «The protections store»).
To enable 2FA:
- Read «Do not lock yourself out» in Securing CodeHero first.
- Click Enable 2FA in the Security tab (it shows while 2FA is off; to move 2FA to a new phone, use Reset 2FA — your password and a current code — then enable it again).
- Scan the QR code with your authenticator app.
- Save the Manual entry code shown under the QR code in a safe place, offline. Or scan the QR code with a second authenticator at the same time. This code sets up a new phone with the SAME 2FA.
- Enter the 6-digit code and click Verify & Enable.
- Test a new sign-in in a private browser window before you close the old one. Use a new code there: a code works only once (5.8.0).
- Make your recovery codes (below).
Recovery codes (5.9.0) — your way in when the phone with the authenticator is lost, without the console:
- Turn the switch on: 🛡 Protections → Recovery codes (your password and a current 2FA code).
- Two-Factor Authentication → Recovery codes → Make new codes (your password and a current 2FA code). Ten codes are shown once. CodeHero keeps only a fingerprint of each one: nobody can show them again.
- Copy, Download or Print them. Tick I saved them, type one code back, your password and the next 2FA code, then Confirm the new codes. The code you typed is used up: 9 stay.
- Keep them safe: print them or write them down, and keep the paper with your important documents, not with the phone or the laptop. Or keep them in a password manager on another device than the authenticator. Never in a ticket, a chat, an e-mail, a project folder or next to the panel password.
- Each code works once. Using one signs out every other browser and remembered device.
- Few left → Make new codes. The old codes stop only when the new set is confirmed.
- Someone may have seen them → switch Recovery codes OFF first (🛡 Protections): they stop at once. Then ON, and make new codes.
- Phone lost: sign in with a code → Disable 2FA (your password) → Enable 2FA with the new phone → make new codes. Changing 2FA (Enable, Disable, Reset — here or on the console) ends the old codes.
- Codes and phone both lost: the console,
sudo /opt/codehero/scripts/manage-2fa.sh disable. - After a restore from a copy (the restored installation's card says so), a server snapshot, or the protected folders put back from a backup: make new codes. Limit: a whole-server snapshot, or the protected folders put back from an older backup, bring back that moment's codes — codes used since then work again — until you make new ones.
Security keys (5.9.0) — a USB/NFC security key, or a passkey on a phone or a computer, as the second factor beside the 6-digit code. A look-alike site cannot use its answer. It needs 2FA on and the panel at its domain name with a real certificate (Settings → Domains), not an IP address; open the panel at that name to add a key.
- Turn the switch on: 🛡 Protections → Security keys (your password and a current 2FA code).
- Two-Factor Authentication → Security keys → Add a security key → a name for it, your password and a current 2FA code → Continue → touch the key, or confirm the passkey, when the browser asks.
- Add two: keep the second in a safe place.
- The list says for each key «this device only» (a security key) or «synced passkey» (it follows your phone's or your computer's account), when it was added and last used.
- Every key you add or remove signs out every other browser and remembered device.
- A key lost: Remove it (your password and a current 2FA code). The last key may go: the code still works.
- «made for old.example.com — add it again here»: the panel's domain changed — add the key again at the new name.
- «Paused …»: use the code. The panel checks its web configuration again within minutes (after a change of Domains, a production domain, a certificate or a reload of nginx).
- «its counter went back: it may have been copied — remove it if unsure»: the key answered with an older counter than the last one; it is refused.
- A 2FA change (Enable, Disable, Reset — here or on the console) removes every key. A restore of the platform from a copy removes them too («The restore removed the security keys — add them again»).
- Phone lost: sign in with a key (or a recovery code) → Disable 2FA (your password) → Enable 2FA with the new phone → add the keys again. Everything lost: on the console,
sudo /opt/codehero/scripts/manage-2fa.sh disable. - Limits: the server checks its web configuration again every few minutes — a hand edit of nginx outside CodeHero is caught within 10 minutes. A whole-server snapshot, or the protected folders put back by hand, bring back that moment's keys: check the list after one.
Backup encryption key (5.10.0) — the Encrypted backups you download leave the server encrypted, and only you can open them (Section 4, «Encrypted and plain downloads»).
- On your own computer, install age (age-encryption.org; on Ubuntu the package
age). Runage-keygen -o key.txt. It printsPublic key: age1…. The file key.txt holds your private key: it never comes to the server. - Settings → Security → 🔒 Backup encryption key → Set the key → paste the line that starts with
age1, your panel password and a current 2FA code → Save. - The card shows when the key was set, its fingerprint and the whole key. Press Test: it downloads a short encrypted text. On your computer:
age -d -i key.txt <the file>. You see the text with this server's name and the key's fingerprint: your key works.
- Change the key: the same form. Keep your old private key: the copies you downloaded before stay encrypted for it.
- Remove the key (your password and a current 2FA code): downloads are plain files again.
- With 2FA off, the form needs only the password.
- A red line on the card: the key cannot be read. Downloads are refused meanwhile, never sent plain. Remove the key clears it, and Set the key replaces it. A folder found in the key's place is moved aside, never deleted.
- «The program age is not installed on this server»: no key can be saved. The next upgrade installs it (Section 29).
- Keep key.txt in two safe places, off the server. A lost private key means every encrypted copy is lost: CodeHero cannot open them.
- Never paste the private key (the line that starts with
AGE-SECRET-KEY-) into the panel, a ticket or a chat.
The old default password (5.7.0). A sign-in with admin123 (the password older versions published) opens only Set your password. You set your own; nothing is generated for you, and admin123 is refused as the new one. The page also asks for the one-time setup code the upgrade showed, unless you passed 2FA (Section 1, «The setup code»).
A new panel password signs out the others (5.7.0). Saving it signs out every other browser and device, and ends «Remember this device». This browser stays signed in (Section 1).
The database passwords (5.7.0). Changing the MySQL app or root password here also removes that password's lines from the old copies /etc/codehero/mysql.conf and /opt/codehero/install.conf (servers installed before 5.7.0). No stale password stays behind. A new database password has 8 to 128 characters: letters, digits and . _ @ % + = : , / ! ^ * -, no spaces or quotes. The page refuses any other password before anything changes. The page saves the new password, reads it back and signs in with it once. IF one of these steps fails, THEN MySQL keeps the old password, nothing restarts, and the page says what failed.
sudo /opt/codehero/scripts/manage-2fa.sh disable— 2FA off (a lost phone, and no recovery code). Sign in, then Enable 2FA again. Every panel sign-in ends, and the recovery codes end with the old 2FA (5.9.0).manage-2fa.sh statussays how many recovery codes are left.sudo /usr/local/lib/codehero/sandbox-ctl auth codes off— every recovery code ends at once (5.9.0), with the panel and the database down too. Every panel sign-in ends.sudo /usr/local/lib/codehero/sandbox-ctl auth keys off— every security key refused at once (5.9.0; they are kept), with the panel and the database down too.… auth keys dropremoves every key and turns the switch off (it also repairs a damaged record). Every panel sign-in ends.manage-2fa.sh disableremoves the keys too.sudo /opt/codehero/scripts/manage-2fa.sh unlock— clears the sign-in locks (5.9.0: root's, the same as Unlock Account); the 2FA codes already used stay used. It works whether the panel runs, is stopped or does not answer: the panel sees it before its next sign-in check — nothing is deleted, no restart is needed. It clears the locks first, then the database's old count; if the database does not answer, it says so on its own line and the locks are cleared all the same. A lock also ends by itself 30 minutes after it started. Or sign in from another address.sudo /usr/local/lib/codehero/sandbox-ctl auth setup show— the one-time setup code for Set your password (5.9.0).… auth setup makemakes one when none is saved; a code already saved is kept.sudo /usr/local/lib/codehero/sandbox-ctl auth limits reset— only when the sign-in page says the sign-in limits are lost or damaged in both places, or that the 2FA record table is full: they start again empty (5.9.0).sudo /opt/codehero/scripts/change-passwords.sh— a new panel or database password. It accepts only 8 to 128 characters: letters, digits and. _ @ % + = : , / ! ^ * -. Any other password is refused before anything changes: «Use 8 to 128 characters: letters, digits and . _ @ % + = : , / ! ^ * - (no spaces or quotes)». Choose another password. A panel password has at most 72 characters. «All passwords» stops at the first failure and says which passwords it changed. A new panel password set here ends every panel sign-in (Section 1). 5.9.0: it closes the panel's sign-in while it saves the new password; if it stops half-way, the panel opens the sign-in again by itself within a minute, and every sign-in of before has ended. 5.9.0: if the panel still runs the code of before 5.9.0 (an upgrade that is not finished), it changes nothing and says «Nothing changed: … has not taken the sign-in state over yet» — run it again after the upgrade completes.sudo /usr/local/lib/codehero/sandbox-ctl auth repair— the sign-in page says «Sign-in is unavailable» (5.9.0). It puts back the panel's sign-in state from root's store and says what it did.… auth statusonly shows it.sudo /usr/local/lib/codehero/sandbox-ctl egress status— «Containers: block private networks» (5.9.0): on, off or unknown (and why), and the addresses last in force.… egress set on|offsets it (the rules follow within 5 minutes).sudo /usr/local/lib/codehero/sandbox-ctl auth proxy status— the trusted panel proxy (5.9.0): ON or OFF, «applied» or what is pending and why.… auth proxy offworks with the panel and the database down (applied when the panel starts);… auth proxy repairfinishes a change cut short;… auth proxy rotategives a new secret;… auth proxy trusted-set 203.0.113.7(ornone) sets the trusted upstream proxies.sudo /usr/local/lib/codehero/sandbox-ctl separate-addresses status— «Keep panel and app addresses separate» (5.9.0): ON or OFF, and the panel's, the previews' and the database tools' names and ports as nginx serves them (or why they could not be inspected); it changes nothing.… separate-addresses offturns it OFF, also with the panel down.sudo /usr/local/lib/codehero/sandbox-ctl offturns OFF the protections of the policy (Keep AI work on the maintenance copy, Keep panel and app addresses separate, Ticket sandbox, Ticket network limits); with--project ID, only the ones a project may set.… ticket-sandbox offand… ticket-network offturn off one of the two (5.11.0). The trusted panel proxy, the recovery codes, the security keys and «Containers: block private networks» have their ownoffcommands (above).
- Web application firewall (WAF) (v5.4.0+) — once installed (Packages → WAF Security Setup → Run Setup): Block, Log only or Off for the Admin panel and the Previews. Each live site has its own mode and its own settings (off by default): Off until you choose (5.16.3). Log only lists what it would stop in the WAF log — start a site that way, then choose Block. Choose a site's modes on the project's page → Web application firewall — this site (section 32), or for many projects at once in the Projects table of the WAF card. Each project's preview can have its own mode; without it, the preview follows the server's Previews mode. phpMyAdmin has no WAF; it opens only from the logged-in panel. A FIRST install of the WAF (5.16.3) starts with Admin panel → Block, Previews → Log only; every live site is Off until you choose. An upgrade keeps what each live site does today: IF the server's Production domains mode was Log only or Block, THEN every live site without its own mode got that mode. The mode does not depend on the project's mode. To see what it stopped and how to let it through or switch it off, see the next part (5.16.3).
Voice
The speech-to-text engine and language used for voice dictation on every page.
Semantic search
Search by meaning, in Greek and English. The model you make the default serves every project that turns semantic search on (Project → Semantic search) and the assistant's memory. It runs on this server; nothing leaves it.
Performance (v5.4.0+)
MySQL, PHP and nginx tuned for this server — by its memory and processors and by what the server is for:
| Mode | For |
|---|---|
| Developer (default) | CodeHero as a development platform: MySQL's cache 1/8 of the RAM, PHP workers only when needed. |
| Hybrid | Development and some sites in production: MySQL's cache 1/4 of the RAM, PHP workers ready for visitors. |
| Production | The server serves sites: MySQL's cache 1/2 of the RAM, PHP workers 1/4, nginx for many visitors; the projects' production domains get their own PHP with cache and JIT. You choose Safe (every commit on disk) or Fast (about once a second). |
Your own values (key = value, for MySQL, PHP, the PHP pool and nginx) win over the mode. Apply says which MySQL values apply now and which after Restart MySQL.
The parts a mode touches — a checkbox on each card (MySQL, PHP, the PHP pool, nginx); a part left out goes back to its own settings. No mode changes what a preview shows: previews show a change at once, so the AI sees its own work.
PHP cache & JIT (its own Save) — the projects' production domains: Follow the mode (on in Production), On or Off, and each project can choose otherwise (Production Deployment → Production PHP for this domain); the previews (dev) only if you know you want it — the AI may not see its changes for up to 60 seconds. The cache is per file path: two files with the same name in different folders never mix.
Since 5.16.6 the live sites run on their own PHP-FPM (codehero-php-prod@<version>). A domain with Production PHP on always has the JIT (PHP 8.0 or newer, 8.3 too; PHP 7 has no JIT) and its own cache.
System profile (tuned) — sets the kernel and the CPU for a kind of work: throughput, low latency, or saving power. Click Install tuned, then choose a profile (or off) and click Apply; the block shows the active and the recommended profile. On a cloud server the difference is usually small (on Hetzner cloud servers we measured none); on your own hardware it can matter — measure before and after.
5.16.6: the profile codehero-apps. Install tuned now starts with CodeHero's profile for web apps: BBR, no slow start after a pause, room for HTTP/3, on top of tuned's own profile for the machine. Measured between two servers with 50 ms delay and 1 % loss, a 1 MB answer: 0.6-0.7 s at worst instead of 2.8-4.8 s. IF tuned is already installed, THEN choose codehero-apps (first in the list) → Apply. The upgrade never changes the active profile.
29. System Updates
Two kinds of updates: the packages of this server and of its project containers (the Updates page, v5.4.0+), and CodeHero itself (Dashboard Update below).
The Updates page (v5.4.0+)
Menu → Updates. A badge on the menu shows the waiting updates — red when critical ones are among them, amber for security ones — and the dashboard shows a System updates card.
| Importance | What it means |
|---|---|
| Critical | An Ubuntu security notice of priority critical or high fixes it |
| Security | Another security fix: a lower-priority Ubuntu notice, the -security updates, or a PHP security release (php.net) for PHP from the PHP source |
| Update | Bug fixes and new builds |
- One card for This server and one for each running project container: Install critical, Critical + security, All or Selected. Every install asks first; services restart as needed — the server itself never.
- A package always keeps its supplier (Ubuntu's from Ubuntu, the PHP source's from the PHP source). Held packages and your Never install list (
php8.3*= a whole family) are left out. - This server needs a restart → Restart the server… (it asks first; the restart starts one minute later — the page shows the time and a countdown, then reloads by itself when CodeHero is back; the tickets go on afterwards).
- While an install runs a banner at the top shows a spinner, what is installed and the running time; when it ends a green Done or red Failed banner shows the log until you close it (✕), or for one hour. On every machine (Install critical, Critical + security, All) reports every machine. A package the package server does not have yet (404) is skipped and named; the rest is installed.
- This container needs a restart (after libc6, systemd…) → Restart the container…, or Restart them all… — it asks first, never during an install, and names any ticket running in it.
- Automatic updates: Off (default), Critical only, Critical + security or Everything — once a day at the hour you choose, the project containers too — then Save.
- A check every 6 hours (or Check now). History lists every install. Telegram tells you about new critical updates and about automatic installs.
- An old unsigned repository list (5.7.0). Containers that got MySQL 5.7, a custom MySQL version or MariaDB's repository before 5.7.0 had a repository list without a signature check. While such a list is still there, that machine's updates refuse and say so. The way out: Apply security on the project's Container tab (Section 31) signs it. The upgrade to 5.7.0 already signs the lists of the running containers.
Search, groups, pages — search by name, notice or source; group by importance, source or notice; 50 a page. The install buttons act on the whole list, whatever page; Select all shown ticks every match. On every machine installs on the server and every container. Clean up removes what updates left behind (old kernels — never the running one —, unneeded packages, downloaded files).
AI tools — Claude Code, Codex and Grok Build: the version on this server and the newest one, marked new; Update (or Update all) installs it with the tool's own installer. Running tickets keep their version.
Dashboard Update
- Download the release ZIP (
codehero-pro-release-X.Y.Z-x86_64.zip, or-arm64.zip) - Settings (the gear) → Settings → the Updates tab → 📦 Manual Update: drop the ZIP there (or click to select it)
- Click "Install Update"
- Watch real-time console output
- Page auto-reloads on success
CodeHero PRO does not download updates by itself — the old download from GitHub was removed in v4.55.1.
Signed releases (5.7.0). The panel installs only a ZIP signed by CodeHero: it checks the signature and every file before it runs the upgrade. A changed, unsigned or older (before 5.7.0) ZIP is refused with the reason. Each release's notes list the SHA-256 of its ZIPs; sha256sum <zip> shows yours. A ZIP the panel refuses can still be installed from the command line (below), after you checked it.
No downgrade from the panel. The panel never installs a release older than the installed version: it refuses it and says so. The same version installs again. A downgrade you want runs only from the Linux console: sudo ./upgrade.sh --allow-downgrade (-y alone never confirms a downgrade). Never go below 5.7.0 with hardened containers (Section 31).
Ask AI to fix the problem (5.8.0). After a failed upgrade, this button asks an AI to read the error log. The AI explains the problem. Then it offers the panel's fixed fixes by name, each with a ▶ Run button:
- Finish an interrupted package install
- Refresh the package lists
- Check the web server configuration
- Show the free disk space
▶ Run All Fixes runs the offered fixes one after another. Their output goes to the upgrade's console. Then run the upgrade again. Anything else the AI suggests is shown as text: the panel never runs it. The panel has no page that runs a free-form command as root.
The upgrade to 5.7.0:
- If the server still uses the database passwords older versions published (
claude_user, MySQLrootwith a password), the upgrade gives them new random ones. A password you chose is never touched. The new ones are in/etc/codehero/credentials.conf(root only); you never type them. The upgrade log says one line per account. - The old copies
/etc/codehero/mysql.confand/opt/codehero/install.conflose only the password lines whose value is kept insystem.conforcredentials.conf(or is a published default). A MySQLrootpassword that onlymysql.confhad moves tocredentials.conffirst; if it is the published one, it is replaced too. Every other line stays. - The panel and the daemon restart. Every panel sign-in from before ends, even one still open in a browser: sign in once more (Section 1). A running Claude Code session (Mode 3) ends and continues at the ticket's next turn. An interactive Claude Code you run on the server must be started again to get the new password.
- If the log says «Database passwords: not changed» or «not checked», the passwords stayed as they were: change them in Settings → Security.
- If the log says «Database passwords: changed, but a step failed», a new password is in effect and saved; the services restart onto it. Nothing to do.
- If the upgrade stopped half-way while it changed these passwords (a power cut, a killed process), it left the file
/etc/codehero-protected/db-rotation.journal(5.9.0; before:/etc/codehero/db-rotation.journal; root only), which keeps both passwords. Run the same upgrade again: it says «an earlier run stopped half-way», then finishes or undoes the change and checks it. ERROR lines that name the journal mean the same: fix the cause they name (the disk, MySQL), then run the upgrade again. Nothing to do by hand. - 5.9.0: a journal left in
/etc/codeheroby an older version is finished once by the upgrade, then that place is never read again — a journal that turns up there later (an old copy of the settings) is only kept, never run. - 5.9.0: if the upgrade says «two rotation journals … neither is run», both places hold one. Keep only the one of this server's own unfinished upgrade: move the other out of its folder (for example
sudo mv /etc/codehero/db-rotation.journal /root/), then run the upgrade again. - A login with the old panel password
admin123opens only Set your password (Section 1). The upgrade shows a one-time setup code in a box (PANEL SETUP CODE: …) that this page asks for. «Ask AI to fix the problem» after a failed upgrade hides that code before the log goes to the AI. - Project containers no longer reach each other (Section 31, «Allow access from»). The upgrade says so. If one project uses another project's container service (a shared database or cache), tick the first project on the serving project's page (
Project links — Allow access from; the Container tab in 5.7.0). On a server with containers, the upgrade installsnftableswhen it is missing. - The previews ask every request for the project's key, this server's own requests too (Section 32, «Preview links and their key»). If a script or cron job of yours calls a preview URL from this server, it must send the key now. The tickets' tools send it by themselves.
- CodeHero's Python packages live in its own Python. The system Python gets only a few pinned packages (bcrypt, mysql-connector-python, pyotp, qrcode, pillow), never one that replaces a package of Ubuntu.
The upgrade to 5.7.1:
- Every project starts in
Developermode and unlocked (Project modes and the project lock). - A tick in «Allow access from» from 5.7.0 now also lets that project's tickets work in the project that ticked it (Project links). Check the panel
Project links — Allow access fromon each project page. Untick a project whose tickets must not work there. - A ticket of a project without a container can no longer run
cruninto another project's container, unless that project allows its project.
The upgrade to 5.8.0:
- Sign-in and 2FA locks stay when the panel restarts. A 2FA code works only once (Section 1).
- An import by URL from your own network is refused, unless you allow it (Section 3). If you import from a server on your own network, set Settings → system.conf →
ALLOW_LOCAL_NETWORK_IMPORTS=true→ Save & Restart first. - Containers work as before: no limits and no private-network block until you set them (Section 31, «Limits» and «Private networks»).
- Your containers start only through CodeHero from now on (Section 31). A running container keeps running. The ones with Auto-start on server boot on still start at the server's boot, after CodeHero's checks. The upgrade completes only when every container has this check. If a container's settings are being changed (Apply security or Remove security runs), the upgrade waits for it.
- If the upgrade ends with «The upgrade is NOT complete: …», do what the line says and run the upgrade again. It names the container whose settings were still being changed, or the protections store (Troubleshooting, «The protections store»). Until it completes, no new ticket starts.
- If the upgrade stops half-way (a power cut, a closed window), run the same upgrade again. It finishes the 5.8.0 steps, the protections store's first set-up too. Your switches, limits and settings stay as you set them.
- A container with PostgreSQL: press Apply security again (or Apply security) on its Container tab. Its superuser
postgresthen signs in only from inside the container and from the server (Section 31). - Tickets run as before. Each new ticket records who opened it and the account that runs it (Section 10).
- CodeHero starts one history of who did what (tickets, project modes and locks, devices, protections, container starts, disk steps and limits). There is no page for it yet.
- The upgrade sets up the protections store, every protection OFF (Troubleshooting, «The protections store»).
- Your projects work as before. Create maintenance copy is new in the Backup & Restore panel of a container project (Create maintenance copy).
- Delete asks for the project's code. It stops, deleting nothing, when there is a link on the way to the project's folder or the folder is outside
/var/www/projectsand/opt/apps(Section 4, «Danger Zone»).
The upgrade to 5.9.0:
- nginx stops and starts once: for a few seconds every site on this server is unreachable. Choose a quiet moment (below, «The panel's own socket»).
- Run it on the server's console or with Settings → 📦 Manual Update, not in the panel's own Terminal.
- If your nginx has a block of your own for the panel that passes to
127.0.0.1:5000orhttps://127.0.0.1:9453, change it toproxy_pass http://codehero_panel;BEFORE you upgrade (Section 32, «A frontend block for the panel»). - If the upgrade stopped on such a block, it stopped at the panel's switch-over, not before: the new programs are already copied and the daemon is stopped, so the panel answers 503 and no ticket starts. Your sites stay up. The message names the file. Change the block to
proxy_pass http://codehero_panel;, then run the same./upgrade.shagain: it completes. - You stay signed in. If nobody changed the panel password since 5.7.0, everyone signs in once more, and «Remember this device» asks for the 2FA code again. Right after the panel restarts, the 2FA code of that moment is refused once: enter the next one.
- Every new switch starts OFF: Trusted panel proxy, Keep panel and app addresses separate, Recovery codes and Security keys (Section 28, «Protections»). Your own choices stay (below, «What an upgrade keeps»).
- The port forwards are rebuilt to answer only this server's own addresses (Section 31, «Allow access from»).
- If it ends with «The upgrade is NOT complete: …», the version stays the old one and no new ticket starts. Do what the line says, then run the same upgrade again: it resumes where it stopped.
The upgrade to 5.10.0:
- It installs the Ubuntu package
agewhen it is missing. The backup encryption key needs it (Section 28). Every later upgrade checks it again, and a new installation installs it too. - No key is set after the upgrade: downloads stay plain files until you set one.
- If you shared a diagnostic bundle or a project backup before 5.10.0, press New Key on each project (its Secure URL changes) (Section 32, «The preview key stays out of logs and outputs»).
- A device join command made before the upgrade no longer works. Make a new one (Section 33, «Add a device»).
The upgrade to 5.11.0:
- Your projects and tickets work as before. The new switches Ticket sandbox and Ticket network limits start OFF (Section 28, «Protections»). Root in the container and Tickets may install packages start ON: a container's sudo works as before (Section 31).
- Each live site's domains,
wwwnames too, go into its list (Section 32, «Domains of this site»). If a site cannot be added (a certificate the panel cannot read, a name another project serves), it stays as it was, a line names it, and that step runs again at the next upgrade. - CodeHero's logs and the projects' snapshots are closed to the server's other accounts. A script of yours that read them as another account no longer can.
The upgrade to 5.11.1:
- Your projects and tickets work as before. Ticket sandbox stays as it was: the upgrade never turns it on or off (a new install from 5.11.1 starts with it ON when its checks pass).
- The first Grok Build ticket after the upgrade (with the sandbox on) makes one tiny model call to test CodeHero's hooks. If it has to wait, it starts again by itself.
- A site live on a port other than 443 with Redirect HTTP → HTTPS: press Save site settings once, so that its redirect keeps the port.
The upgrade to 5.11.2:
- Your projects work as before. Projects that existed stay on the shared PHP; new projects get their own PHP account. Open phpMyAdmin again from the panel.
- To give an older project its own PHP account: Backup → Restore as a new project, check it, then delete the old one.
The upgrade to 5.11.3:
- Your projects work as before. A restore or an import cut in the middle now shows a red notice on the project page, and its tickets wait until you choose: Restore again or I checked it — dismiss.
- A move into a container cut in the middle is kept safe and the page says so. From 5.11.4 on, Finish the move on the project page ends it.
The upgrade to 5.11.4:
- The upgrade changes no project, and finishes no move by itself.
- A move into a container cut in the middle (by this version or an older one) ends with one click: the project page shows Finish the move. The project's tickets wait until the move is finished.
- A new move no longer loses a file written while it copies, and has no time limit.
The upgrade to 5.12:
- It is the last upgrade that changes a project. ONE TIME, it gives the files root left in the projects' folders to CodeHero's own user, and writes the current words and protections into the nginx files of the previews and the domains. From 5.12 on no upgrade does this (below, «What an upgrade keeps»).
- If this one-time step fails, it ends with «The upgrade is NOT complete: the one-time step 5.12.0 did not finish …»: the version stays the old one and no new ticket starts. Fix the cause (the lines above it name it), then run the same upgrade again. It goes on with the parts left: a change of yours to the file of a finished part stays.
- certbot, which renews your domains' certificates, moves to the versions of this release, and from now on only when a release changes them.
- A ticket of a container project: a command on the server that pipes into
sed,awk,xargsor a similar program, or usesfind … -exec, can run a command of its own. Only the listed filters and the print-only forms ofsedandawk(sed -n '1,20p',awk '{print $1}') pass; other scripts and programs are refused with «wrap it with crun». The refusal shows the repair: the whole command in the container, orgrep,head,tail,wc,sort,uniqorcutbehind the pipe. The ticket repairs it by itself. - A
sudobehind another program (setsid sudo …,… | xargs sudo …,find … -exec sudo …) is refused. If the project has a container, the answer is «wrap it with crun», in every mode. If it has none, an autonomous ticket gets the refusal with the repair and goes on (a package install, a new service or a login may still ask), and a semi-autonomous or supervised one is refused. Asudowith a wildcard (sudo ls /var/log/*.log) loses the read-only shortcut; the normal rules decide the refusal or approval. Host diagnostics must still read the host. - Every container made before keeps its container kind and its LXC settings: the upgrade converts none.
- The approval reviewer starts: a request for approval that waits 15 minutes is read by a second AI. It never approves. To turn it off:
APPROVAL_REVIEW_MINUTES=0in Settings → system.conf, Save & Restart. - A ticket you stop stays stopped.
- In
developermode, ordinary refused steps go back to an autonomous ticket with repair guidance; an install, a new service or a login may still ask. Existing exact approvals and the approvals ofmaintenancemode remain. - The upgrade adds the table
approval_reviewsand the columnprojects.container_idmapby itself (proved on a jump from 5.11.3).
Command Line Update
cd /root
# Extract the ZIP file provided with your CodeHero PRO license
sudo apt-get update && sudo apt-get install -y unzip # a fresh Ubuntu has no package lists yet
unzip codehero-pro-release-X.Y.Z-x86_64.zip # ARM64 servers: codehero-pro-release-X.Y.Z-arm64.zip
cd codehero
sudo ./upgrade.sh
X.Y.Z is the version of the ZIP you downloaded: use its exact file name.
| Option | Description |
|---|---|
--dry-run | Preview changes without applying |
-y, --yes | Auto-confirm all prompts (never a downgrade) |
--allow-downgrade | Install an older version on purpose (5.7.0) |
What an upgrade keeps (5.9.0)
An upgrade keeps your own settings: your MySQL timeouts (wait_timeout, interactive_timeout), your WAF settings (SecRuleEngine, SecAuditLogParts, SecResponseBodyAccess in /etc/modsecurity/modsecurity.conf, and a rule file you edited) and your choice to delete /etc/mysql/mysql.conf.d/codehero-dev.cnf (MySQL's binary logs come back that way). The WAF's rules are written again only when a release brings new ones, with an nginx reload, never a restart. A one-time upgrade step runs once, when the upgrade passes its version; one that fails runs again at the next upgrade.
From 5.12 on an upgrade leaves your projects as they are: their files and owners (a file you keep as root's stays root's), the nginx files of your domains and previews (your own directive stays, and so does a site you took QUIC out of) and your choice to delete /etc/mysql/mysql.conf.d/zz-codehero-speed.cnf. A release that must change such a file does it once, and its notes say so.
Four things happen at every upgrade, and the upgrade says them before it asks:
- The commands of running tickets end, in every running container too. The tickets start again by themselves when the upgrade completes.
- The containers' firewall rules are written again from the database.
- The WAF's rules are written when the version brings new ones.
- nginx reloads: a few seconds. Only if the reload fails it restarts: a short break for every site.
The panel's own socket (5.9.0)
The 5.9.0 upgrade moves the panel from the port 127.0.0.1:5000 to its own socket /run/codehero-web/panel.sock; nothing listens on port 5000 any more. ONE TIME, nginx is stopped and started instead of reloaded: for a few seconds EVERY site on this server is unreachable (the upgrade says so). A panel page open in the browser reconnects by itself. The upgrade completes only when the panel answers on its socket through nginx and the trusted panel proxy's policy is applied («panel proxy: applied»); else the version stays the old one and running the upgrade again resumes. Run it on the server's console or with Settings → 📦 Manual Update, not in the panel's own Terminal: from there it cannot move the panel and ends with «The upgrade is NOT complete: … run it from the console (sudo ./upgrade.sh)». A frontend block of your own for the panel (§32) goes straight to codehero_panel: if nginx still has a block that passes to 127.0.0.1:5000 or to https://127.0.0.1:9453 — directly, in a file it includes, through an upstream (http or stream), or in any server / proxy_pass line of any file nginx loads — the upgrade stops at the panel's switch-over, not before (the new programs are already copied, the daemon is stopped, the panel answers 503 and no ticket starts; the sites stay up), and names the file: change the block to proxy_pass http://codehero_panel; and run the same ./upgrade.sh again, and it completes; better, change it before you upgrade (so 127.0.0.1:5000 stays out of nginx's routes: give an app of yours another port); such a block added after the move stops the next upgrade at its end (the version stays the old one until it is changed). The panel proves it serves on its socket with an answer signed with its own key, which a program that took port 5000 cannot give. The same restart point moves «Containers: block private networks» into the protections store when it still has to (§31): right after the move to the socket, the panel and the daemon stop once more for that moment, then start again.
Backup and rollback (v4.54.1+)
Before it changes anything, the upgrade saves a folder /var/backups/codehero/upgrade-<old version>-<time>/, readable by root only: the program (opt-codehero.tar.gz), the settings of /etc/codehero (etc-codehero.tar.gz) and the platform database (database.sql.gz), with the commands to go back in ROLLBACK.txt. The newest 5 are kept. The backup encryption key (Section 28, 5.10.0) is one of these settings: the upgrade's backup and the installation's own copy hold it. The upgrade also keeps the logs in bounds: the platform's logs (/var/log/codehero/*.log) are rotated daily and kept 7 days, the system journal keeps at most 500 MB, and logrotate is installed when the server has none.
The ROLLBACK.txt of the 5.7.0 upgrade works: its copy of /etc/codehero carries the new database passwords. A rollback to an OLDER upgrade's backup brings back the old published database password, which MySQL no longer takes: set it again in Settings → Security.
Since 5.9.0 the folder also holds nginx's files and the services' units as they were (transport.tar.gz, transport.manifest) and restore-transport.sh, checked before anything changes. The first backup of an upgrade that does not finish is its recovery baseline (/etc/codehero/upgrade-baseline): running the upgrade again keeps it, it is never pruned while the upgrade is unfinished, and every ROLLBACK.txt of that upgrade names it. ROLLBACK.txt ends with sudo bash restore-transport.sh: the files and units as they were, systemctl daemon-reload, the old panel first on its port, then nginx (started if the upgrade left it stopped, else reloaded), then the daemon — and it takes the old panel back only when the process on 127.0.0.1:5000 belongs to CodeHero's panel service and answers (on the socket: a signed answer). The two archives leave the logs out (*.log, a device tunnel's tunnel.log, a log folder of the program): a growing log no longer stops the upgrade; any other file that changes while it is read still does, with tar's own words — run the upgrade again.
Going back from 5.9.0 or later (its ROLLBACK.txt): before the old panel starts, the steps make a new sign-in epoch and ask for a new panel password (change-passwords.sh, choice 3). The restored copy would otherwise open again the sign-ins that were ended after the backup, with the password of before the upgrade. Every browser signs in again. Upgrading again later makes a new sign-in epoch and key once more.
An upgrade to 5.9.0 or later completes only when the panel has taken its sign-in state over («panel sign-in: ready»).
- If it ends with «The upgrade is NOT complete: the panel's sign-in state is not ready — …», the version stays the old one and no new ticket starts.
sudo /usr/local/lib/codehero/sandbox-ctl auth repairsays why. Fix that, then run the upgrade again.- A new installation in the same case ends with «INSTALLATION NOT COMPLETE» (exit code 1).
30. Config File Editor
Edit system configuration files directly from the web interface:
- heroagent.conf — Main agent configuration (providers, models, tokens)
- Nginx config — Web server settings
- PHP config — PHP-FPM settings
Features: syntax-highlighted editor, auto-backup before saving, restore from backup, validation before apply.
31. Container Isolation (LXC)
Run each project in its own LXC container with a full service stack. Since v4.6.3, containers include a Service Manager for installing web apps, databases, and caches from a built-in catalog.

Setting Up a Container
- Go to Project Detail page
- Scroll to Container Isolation (LXC) section
- Select Base Image (Ubuntu 24.04 LTS, the default, or Ubuntu 26.04 LTS; a Debian 12 container keeps its address through restarts too, since 5.12.4: CodeHero writes it as a systemd-networkd file there, as Ubuntu gets a netplan file), Disk Size (5-100 GB; databases, test suites and snapshots fill 10 GB fast)
- Optionally enable Auto-Snapshot and DB Migration
- Click "Create Container"
Container Management
| Action | Description |
|---|---|
| Start / Stop | Boot or gracefully shut down the container |
| Resize Disk | Grow (or shrink) the BTRFS volume, 1-100 GB. It takes a snapshot first, stops the container for a few seconds, resizes, checks the new size and starts the container again. When a step fails, the disk keeps its old size and the container starts again — unless its disk cannot be checked (error, below). The restart empties the container's /tmp, as any reboot does |
| Snapshot | Instant BTRFS snapshot with automatic DB freeze |
| Migrate DB | Move host database into the container |
| Destroy | Remove container and all data |
| Auto-start on server boot | Toggle to automatically start the container when the server reboots (enabled by default) |
- Every disk step is checked (5.8.0). Resize Disk, a snapshot Restore and a container image export or import change the disk only after the container has really stopped and its disk is free. When a step fails, nothing is changed and the container starts again as it was — unless its disk cannot be checked (next point).
- Disk held (5.8.0). Each disk step is written down before it starts, in CodeHero's protected store. While it runs, or when it was cut (the panel stopped, the power went) or could not check the disk afterwards, the Container tab shows Disk held with the reason, the container shows
error, and nothing starts it: not Start, not a restart of the server, not LXC by itself. The project's running tickets are stopped first and its tickets wait, each with the reason; the other projects go on. Nothing was deleted. A step whose running tickets cannot be stopped does not run, and holds the disk too. So does a ticket that an earlier stop (for example Keep AI work on the maintenance copy) could not prove stopped yet. On a held disk only Check the disk, a snapshot Restore and a container image import run. - To go on: press Check the disk on the Container tab. The container stops, its disk is unmounted and mounted again. When the disk mounts with its system folder, the hold goes: press Start, then a message on each waiting ticket continues it. If it says «still in use», restart the server at a quiet moment (from your cloud provider's page) and press Check the disk again. If it says the disk does not mount, restore a backup of the project (Backup & Restore) or import its container image.
- CodeHero's containers start only through CodeHero (5.8.0): the server's boot starts the ones with Auto-start on server boot on, after the checks. A container started any other way is refused by LXC's start check.
- A LOCKED project (5.7.1): Destroy, a snapshot restore, Migrate DB to Container and Delete Host DB are refused. Unlock it first (The project lock).
- There is no move from a container back to the host (removed in 5.7.1). The host would end up with other PHP and database versions than the container had.
- The way out of a container: a backup (Backup & Restore → Complete), then an import as a new project (Projects → 📦 Import, Section 3).
- The move of a host project into a container stays. It is refused on a LOCKED project.
- The move copies the project's folder into the container first, then removes it from the server (5.9.1). If the copy fails (for example, the container's disk is full), the move stops with «Copying … into the container failed … nothing was deleted on the host», and the project's files stay on the server.
Security hardening (5.7.0)
A container shares the server's kernel, and the claude user has the same uid inside and outside (on purpose: the files belong to the same user, and crun relies on it). So the container's own root must not reach the server. From 5.7.0 every container is hardened: AppArmor (LXC's profile, no nesting), a seccomp filter (no kernel modules, no kexec, no open_by_handle_at, no bpf …), the dangerous capabilities dropped, /proc/sys and /sys read only, no device of the server. The services of the catalog, systemd, crun, backups, snapshots and images work as before.
| On the Container tab | What it does |
|---|---|
| Applied | A new container gets the hardening when it is made: the tab shows «Security hardening: Applied». |
| Apply security | A container made before 5.7.0 is not changed by the upgrade and not restarted; the tab shows «Not applied» and this button. It keeps a copy of the container's settings, restarts the container (its sites and services stop for about a minute), and checks that it runs and that every service that ran before runs again. If something does not come back, the old settings return, the container starts again, and the panel says why. Press it when a short restart of that site suits you. While one of its tickets runs, it refuses («Not now»). |
| Apply security again | The same button on a container that is already hardened. No restart. It refreshes the steps inside the container: its database repositories signed, its database root (and PostgreSQL's postgres, 5.8.0) from inside and the host only, its services without their own mount sandbox (below). It restarts only a service that had failed. |
| One press at a time (5.8.0) | A second press while Apply security, Apply security again or Remove security runs is refused. The answer says the hardening is being applied (or changed) already: wait for it to finish. |
| Remove security | For an old project that needs something the hardening blocks. It keeps a copy of the hardened settings, takes the hardening off, restarts the container (about a minute) and checks it. If the container does not start or a check fails, the hardened settings come back by themselves. Apply security puts it on again later. Only you can do it, from the panel: nobody inside the container can take the hardening off. |
| Remove security on a stopped container | For a container that does not start with the hardening. The hardening is taken off while the container is stopped, then it starts and is checked. If it does not start without the hardening either, the hardening comes back and the container stays stopped: the hardening is not what keeps it from starting. |
| Put back by themselves | Apply security and Remove security put the old settings back on any failure — a time-out or an error of a check too — and check them. If the panel stops in the middle (an update, a restart), the next press, or simply opening the Container tab, finishes putting them back, and the tab says what it put back. |
- Services without their own mount sandbox. A hardened container cannot give a service the private mounts systemd makes for its sandbox (
PrivateTmp,ProtectSystem,ReadWritePaths…): allowing those mounts would let the container's root make/proc/syswritable again, which the hardening closes. So a hardened container gets the file/etc/systemd/system/service.d/zzzz-codehero-lxc.conf: its services run without their own mount sandbox (LXC's ownzzz-lxc-service.confdoes the same for some). Without it, Redis from the catalog failed to start (status 226/NAMESPACE). It is written when the container is made, by Apply security, after an image import, and by Apply security again. A container with nesting keeps LXC's own profile and does not get it. - The database's
rootin a container (MySQL / MariaDB) logs in only from inside the container and from the CodeHero panel (phpMyAdmin, Adminer — through the host's bridge address). New containers get it at once; an existing one with Apply security (no restart for this step; if phpMyAdmin could not log in afterwards,rootis put back as it was, and the answer says so). A desktop SQL client through a forwarded port uses the project's own database login (or an SSH tunnel), notroot. - PostgreSQL's superuser in a container (5.8.0). The
postgreslogin works only from inside the container and from the server. New containers get it at once. An existing one gets it with Apply security or Apply security again (no restart; PostgreSQL only reloads its settings). The project's own database login works as before, from anywhere it worked. If PostgreSQL does not accept the new settings, the old ones come back, and the answer says so. A settings file you changed by hand is left as it is. - Old repository lists. Containers that got MySQL 5.7, a custom MySQL version or MariaDB's repository before 5.7.0: the upgrade signs the lists of the running ones, Apply security the others. A list whose key cannot be fetched is switched off (renamed
*.list.unsigned-off) until a later repair; installed databases keep working. - An AI ticket can read a container's LXC settings (
/var/lib/lxc/<name>/config,/opt/codehero/config/lxc-*.conf) but cannot change them. Container settings change through the Container tab. - A project that runs containers inside its container (Docker) sets
"nesting": truein its manifest: it keeps nesting and LXC's common seccomp. - The settings live in
/opt/codehero/config/lxc-hardening.confandlxc-seccomp.conf. A hardened container needs them to start: never delete them, and never go back below 5.7.0 with hardened containers.
Containers without root (5.12)
A container with root (every container made before 5.12, a later one made with the box unticked, and one that keeps root for a service never measured without root) shares the server's user numbers: its root is root on the server, hardened as far as that can be. A container without root shares no number with the server. Root inside it is nobody outside; so is the claude user. A bug in the kernel can still beat it: it is one more wall, not the last one.
| What | How |
|---|---|
| Where to choose it | The box Container without root on Create Container, Restore as a new project and Import. The box starts ticked (5.12.1). A container made by an assistant's tool or by a ticket is without root too. Untick the box to keep root, for example when a service was never measured without root, or when you need a kernel module, a device file or docker run --privileged. A service never measured keeps root by itself, and the creation log says why. |
| What you notice | Everything works as before: the file manager, the editor, Git, backups, snapshots, images, the tickets of every AI, PHP, Node, Python, MySQL, MariaDB, PostgreSQL, Redis. The container cannot load a kernel module, make a device file, change the kernel's settings, or run docker run --privileged. A ticket knows which kind it works in: when a service needs one of those things it stops and tells you, and does not work around it. |
| The kind, plainly | The Container tab shows Container kind: «Without root on the server», «With root» (an older container, one made with the box unticked, or one that keeps root for a service never measured) or «Its kind cannot be confirmed» (follow the reason the tab gives; Check the disk can resolve disk problems that can be mended). |
| Docker | A container without root can run Docker. To get one: Create Container → keep Container without root ticked (it starts ticked), then tick Docker support. The second box is always there and works only while the first is ticked. It prepares the container for Docker; install Docker inside it afterwards, by a ticket or yourself (the package docker.io). On a server where a container without root cannot be made, a create with Docker is refused and nothing is made: a container with root and Docker is never made in its place. A backup or an image of such a container makes one again, or is refused; it never gets root. The page offers no Docker box for a container with root. Its data lives inside the container's own disk (the folder .codehero-docker), so a snapshot or an image holds it. A ZIP backup does not: a project restored from a ZIP as a new project starts with an empty Docker store (over an existing container with Docker, it keeps its own), and the answer says so (Docker pulls its images again). IF Docker fails with open sysctl net.ipv4.ip_unprivileged_port_start … permission denied, THEN open the Container tab → AppArmor → off → Save and restart. Only you can do it, from the panel (the switch is shown for a container without root that has Docker). On an older LXC (5) Docker always runs without AppArmor, whatever the switch says; the Container tab says so, and the setting stays on record. |
| An old container is never converted | The upgrade converts no existing container. A snapshot restore and a ZIP restore keep an old container's kind and security settings while they restore its data: the settings of a backup are not applied to it, and the answer says so. An image import can rewrite its settings, as before 5.12. A container with root and Docker is never converted. |
| The way up | Backup & Restore → make a backup → Restore as a new project with Container without root ticked → check the new project → delete the old one. The old project is not touched until you delete it. A container with Docker is never converted: make a new project with the box ticked and put your code and data there. Until it is raised, an old container keeps one exposure a container without root closes: a setuid-root file inside it can be run with root rights from the server side through the container's disk path. |
| Backups and images | They say the kind, the AppArmor setting, whether there is Docker and the LXC version. A backup from before 5.12 says nothing and comes back with root, as it was, when you untick the box; ticked (as it starts), you get one without root. A service never measured in a container without root (the answer names it and its version) keeps the project with root (only the catalog's measured versions were measured; a custom service never is). A backup of a container without root with Docker that would be rebuilt with root is refused instead («… cannot be rebuilt without root here (…): Docker is never given root in its place. Nothing was changed»), as an image already is; a backup of an old container with Docker is not refused, it stays with root as before. Export and import of an image of a container without root work. The import reads it on a private path before it is published; the old image is kept until the new container runs, and a cut import is taken back whole by Start or Check the disk. When the import changes the guest or Docker numbers, the Docker folder is moved to this container's numbers first, and the older snapshots that no longer fit are deleted (the answer says how many). |
| A backup of a container without root | As a new project, it asks for its kind again, ticked or not. It keeps root when a service in it was never measured in one, or when this server cannot make a container without root; the answer says why. If it has Docker and would be rebuilt with root, it is refused instead. Unticking the box never turns one without root into one with root. Over an existing container, the destination keeps its kind. If you want a container with root, make a new project and untick the box on Create Container. |
| Snapshots | A snapshot of a container without root is checked on a copy before it replaces anything. If it holds files of an id such a container cannot show, nothing is changed and the sentence says which. The files of CodeHero's own accounts go back to the container's claude. A snapshot keeps the container's settings: when they differ, the answer says so. |
| A backup restored over it | Over an old container it leaves the container with its own settings. Over a container without root it keeps its kind, its ids and its nesting, and can restore the AppArmor setting and a seccomp list that fits, from the next start; the nesting stays the destination's, and a Docker container keeps its nesting policy. |
| Not yet | A maintenance copy of a container without root. Create maintenance copy answers «A container without root has no maintenance copy yet: nothing was changed.» The built-in Create maintenance copy / Start maintenance workflow is unavailable for this kind. A separately imported project is not a managed maintenance copy. The one-click maintenance copy for this kind comes in the next version. By hand (the steps the answer points to):
|
Limits — memory, CPUs and processes (5.8.0)
By default a container may use the whole server. A limit keeps one container from taking what the server, the panel and the other containers need. Where: the project page → Container tab → Limits.
- Click Use recommended. It fills in half the server's memory, every CPU but one, and 4096 processes.
- Change a field if you want. An empty field = no limit.
- Click Save limits.
| Field | What it limits | At the limit |
|---|---|---|
| Memory (MB) | The most memory the container may use | The server stops some of its programs |
| CPUs | The most CPU power, in CPUs (1.5 = one and a half) | The container gets slower; nothing stops |
| Processes | The most programs at once | A new program cannot start |
- A saved limit is in force at once, with no restart. It stays after every restart of the container or the server.
- The line under the fields shows the recommended values, the server's size and what the container uses now.
- If the memory you type is less than the container uses now, the panel asks first.
- Every start checks the limits first (5.8.0): Start, a restart, the server's boot, an image import. If they cannot be put in force, the container does not start. It shows
error, and the line next to Limits says «Not in force: …» with the reason. Do what the line says, then press Save limits and Start. - If the answer says «Saved, but not in force yet», the next start puts the limit in force first.
- While Apply security or Remove security runs, Save limits saves nothing: «try again in a minute».
- If the database does not answer at a start, the container starts with the limits it had last.
- To remove the limits: empty the three fields, then Save limits.
- No limits by default. The upgrade changes no existing container.
Private networks — one switch for the server (5.8.0)
A container reaches the internet and this server. Through this server it can also reach your private networks: your office or home network, your cloud's internal addresses, and your cloud's metadata service (169.254.169.254; on some clouds it hands out the server's keys). The switch Containers: block private networks closes these private networks for every container on this server. It is off by default.
Where: the project page of any project with a container → Container tab → Private networks.
- Turn it on: tick Containers: block private networks. The panel asks first: click OK. The rules apply at once. The line next to the switch says «Private networks blocked for the containers».
- Let one project still reach an address: on that project's Container tab, type each address or network in This project's container may still reach, one per line (for example
192.168.1.20or10.20.0.0/16). Click Save addresses. - Turn it off: untick the switch. The panel asks first: click OK. Every container may reach private networks again.
- The switch is one for the whole server. The list is per project: only that project's container gets its addresses.
- 5.11.0: «Ticket network limits» (Section 28) turns this switch ON too. While it is ON, this switch stays ON: its line says «on because Ticket network limits is on», and unticking it changes nothing. Its tickets use the same list of addresses: the project's page → 🛡 Security — Protections → Tickets may still reach (private addresses).
- Before you turn it on, list on each project the addresses it uses on your network: a database, a file share, an API.
- Still reachable with the switch on: the internet, this server, the other containers (as «Project links — Allow access from» decides, below) and the CodeHero VPN's devices (as each device's «What it reaches» decides, Section 33).
- What a blocked connection looks like. A program in the container waits, then fails with a time-out (for example «Connection timed out»). A ticket says in its report that it could not connect. The panel shows no message for each connection. The fix: add that address to the project's list, then Save addresses. Or turn the switch off.
- The list takes private IPv4 addresses only: one address, or a network of /8 or narrower; at most 32. An internet address is refused: the internet is never blocked. IPv6 cannot be allowed per project; IPv6 private networks stay blocked for every container.
- The rules stay after a restart of the server and after an upgrade. The server checks them every 5 minutes and puts them back if another program removed them.
- If the line says «The rules in place are not the ones the switch and the projects' lists ask for», wait up to 5 minutes, or click Save addresses: the rules are applied again.
- 5.9.0: the switch is kept in root's protections store, never in a file the panel can replace. The upgrade moves your setting there once, when it restarts CodeHero's services; until then the setting of before keeps working as before. While MySQL does not answer (a boot), each container keeps the addresses that were last in force — root reads them from the rules themselves.
- 5.9.0: if the switch shows half-ticked and the line says «The switch «Containers: block private networks» cannot be read», CodeHero does not know it, so it blocks private networks for every container, with no address allowed, until it knows. It is never read as off. The line ends with «the rules in place were checked» when CodeHero saw those rules, or «blocking not verified» when it did not. On the server's console
sudo /usr/local/lib/codehero/sandbox-ctl egress statussays why. Tick or untick the switch on the Container tab to set it again. - 5.9.0: if a container does not start and says «Not in force: private networks», the switch is on (or cannot be read) but the rules that block private networks are not in place — or, with a switch that cannot be read, the rules in place still let a container reach some addresses. CodeHero never starts a container unprotected. CodeHero applies the rules again within 5 minutes; or click Save addresses. Then click Start.
A move into a container that did not finish (5.11.3)
A move of a host project into a container can be cut in the middle: the panel restarts, the server crashes, the power goes. CodeHero never overwrites or destroys a container disk that may hold your project's files (5.11.3), and since 5.11.4 one click ends the move.
- The project page says: «The move into a container did not finish. Your files are safe — in the project folder, in the container's disk, or both. The site may be unavailable or incomplete until the move is finished. Press Finish the move: it gathers every copy of your files and moves the project again.» The Projects list shows «⚠ container move did not finish» on the card.
- Create Container never makes a new container over a disk that is already there: «This project's container disk already exists, so CodeHero will not create a new container over it (that would replace what is in it). Your files are safe — in the project folder, in that disk, or both. Press Finish the move on the project page.» Nothing is changed. The same answer comes from the migrate, from the assistant's
createand from a restore. - Finish the move (5.11.4) is the button on the red notice and on the Container tab. It never resumes a half-made container: it gathers, checks, and only then removes it. The dialog says: «CodeHero gathers every copy of this project's files into its folder, checks that none is missing, removes the unfinished container and moves the project again. It takes a few minutes and needs free disk space. The site may be down meanwhile. If two copies of a file differ, the one last in use is kept.» In order: (1) every copy of each folder — the project folder, the container's disk, the folders an earlier move set aside — is merged into the project folder: a file that is in only one copy is added, a file that differs keeps the copy last in use, nothing is deleted; (2) every name of every copy, and every kept file, must be in the gathered folder; (3) only then the unfinished container and its disk are removed; (4) the project is moved again, with the host database when Migrate host database is ticked (it is ticked when the project has a database). A cut at any point leaves a state the same click handles again; nothing is destroyed before the check. The upgrade finishes no move by itself: you press the button.
- A service row of another version or route stays, and the requested one is added beside it. A row that cannot be used (switched off, of another kind, or a second active web app on the route) stops the finish with a sentence and is left as it is. Finish the move also needs the container running: «is the container running?» → start it and press it again.
- It stops, with the files safe, and says why: «The container's disk could not be opened (…). Nothing was changed.» · «Finishing the move needs about … GB free and this server has … GB. Nothing was changed.» · «No copy of the files of … was found: not in the project folder, the container's disk or a set-aside folder. Nothing was changed. Restore a backup of this project.» · «The gathered folder of … is missing … files (for example …). The container was not touched: press Finish the move again.» · «Your files are gathered in the project folder, but the old container could not be removed (…). Press Finish the move again.» · «This project has no move to finish.» when there is nothing to finish · «The move is recorded, but this project's container and its disk are gone. Nothing was changed. Press Destroy container on the Container tab to clear what is left of it, then press Finish the move: it builds the container again from the project's files.» when the move is recorded and the project is marked as in a container, but the container and its disk are gone (nothing is changed) · «This project was being restored or imported when it stopped: delete it and import the backup again.» for a project that was being restored as a new project or imported when it stopped.
- Destroy (5.11.4) is also on the red notice of a half-made move, next to Finish the move. It is offered only when the disk has no system folder (so no project file can be inside it), or when a container without root was cut while it was being made, before the project's files went in (5.12); every other half-made state has Finish the move only. It asks first, removes that broken disk and nothing else — never the project's folders. When the answer is «The container's disk could not be opened (its system folder is missing) …» or «… (it was cut while it was being made, before the project's files went in) …», press Destroy, then Finish the move; if a project folder is gone too, restore a backup (Backup & Restore). A container without root whose Destroy was cut (nothing of the container is left, only its id range and records) shows a red notice with Destroy alone: press it to finish the removal. If the page shows no Destroy (the container was cut when its disk had just been made), press Finish the move, or delete the project.
- When the project is in its container but its database was not moved: «The project is in its container, but its database was not moved: …. Press Finish the move to try again.» The project's tickets wait until the move is whole.
- The project's tickets do not start while a move is unfinished, also when an older version cut it: «Not started — the move of this project into a container did not finish: finish it on the project page — it starts again by itself.» A running ticket is not stopped. They start again by themselves when the move is whole.
- Mark as Done is not offered for such a project, and Reset only while there is no container disk. A stale page cannot get past this: the server refuses both with the sentence above. Reset still works when no disk and no container exist (a move cut before anything was made: there is nothing to lose).
- The project folder is not deleted in place. A move copies it into the container, renames it to
<folder>.moved-<time>, copies it again (a file written meanwhile is not lost), makes the link, and removes the renamed folder only after the move's commit is proved, and only when a full comparison and a check of the processes find nothing in it to keep. There is no time limit for the copy. A renamed folder that is kept is named on the project page: «Some files changed during the move and are kept in …: check them before you delete it. Deleting the project removes it.» - One container step of a project runs at a time: «a container step of this project is already running» (a second create) and «a container step of this project is running: try again when it ends» (a destroy, Reset, Finish the move or a delete while a create runs).
- Delete Project asks first: «This project's move into a container did not finish: some of its files may be only in the unfinished container's disk, and deleting the project deletes them. Delete anyway?» If you confirm, it also removes the half-made container (its LXC container, its disk and mount), the renamed folder, the folder a Finish gathered, and everything else of the project. Make the optional Complete backup first if you want a copy.
- A move cut by 5.11.3 or older left no record of what the move asked for: Finish the move then moves the project as the page does (nginx only); services you added to the project by hand before are added again by you. A project that is already in its container with only its database left is moved with the Migrate host database button of the Container tab.
Root and packages in the container (5.11.0)
Two switches sit on the project's Container tab, in the box under Private networks. Only you set them. A ticket cannot change them.
Root in the container — ON at the start.
- ON, in a project in
developermode: the tickets keep the container's sudo, exactly as before. Nothing changes for you or for the AI. - ON, in
🛠 Maintenancemode: every root command waits for your Approve. - In
🔒 Productionmode, or a locked project: a ticket only reads, whatever the switch says. - You can turn it OFF in every mode. Turning it OFF asks first. The running tickets of the project stop and start again by themselves. They have no sudo then: a package goes through the package tool (below), and root needs your yes for each ticket.
- Turning it ON asks first. The box says: root lets a ticket change anything inside this container. A ticket that is fooled while it has root can keep control of the server. The containers are privileged.
- Every ON and OFF is written in the history, with your name.
Tickets may install packages — ON at the start.
- A ticket installs a package with one tool of CodeHero, by the package's exact name. Nothing is removed. Every install is written in the history.
- ON: the install runs by the ticket's execution mode. Autonomous runs it. Semi-autonomous and supervised ask you.
- OFF: every install waits for your Approve.
- In
🛠 Maintenancemode every install waits for your Approve. In🔒 Productionmode there are no installs. - An install that a crash or a restart cut is finished by the next install. The tab shows a line: «An interrupted package install (…) is finished by the next install.»
Root for one ticket — for a project whose «Root in the container» is OFF, in developer mode.
- The ticket asks on its Approve / Reject panel: «Root inside this ticket's own container (…), until the ticket ends — or until you write /root off.» A box asks you to confirm.
- Or you write
/root onin the ticket's message box./root offends it. Only your message in that box gives root: a reply sent by a ticket, or through an assistant's tools, never does. - It ends when the ticket is done, skipped or deleted, or when you write
/root off. It also ends if the project leavesdevelopermode or is locked. - Every grant and every end is written in the history.
Allow access from — containers of different projects (5.7.0)
From 5.7.0 the containers of different projects cannot reach each other. Each container still reaches the server and the internet. A project can let other projects' containers in: its project page → Project links — Allow access from (5.7.1; in 5.7.0 it was on the Container tab).
- Open the project whose container must be reached (the one that serves, for example its database).
- The project page →
Project links — Allow access from: every other project, each with a tick. - Tick each project whose container may connect to this one.
+ networkmarks a project that has a container too. - Click
Save. The rules apply at once.
- A tick lets that project's container open connections to this project's container. The replies come back by themselves.
- From 5.7.1 the same tick also lets that project's tickets work in this project (Project links, Section 8).
- Two-way talk = each project ticks the other. The list shows
allows this onenext to a project that already allows this one, andtwo-waywhen you tick it too. - Nothing ticked = isolated (the default). The line says «No other project may reach this project».
- The panel opens on a click.
- Not affected: the server, the previews, phpMyAdmin and the database tools, backups, the internet, port forwards and the VPN. A port you forward to a container stays reachable from everywhere it was, other containers included.
- A forward answers only connections to this server's own addresses (5.9.0): its public address when it is on the server itself, the containers' bridge address 10.0.3.1, the VPN's 10.77.0.1 and 127.0.0.1. A connection from the server, or from a container, to another server on the same port goes to that server, not into the forwarded container (before 5.9.0 it went into the container). The upgrade to 5.9.0 replaces the old rules once, also those a removed container left behind, and lists each rule it removed in
/var/lib/codehero/forward-rules-removed-5.9.0.txt(each line puts its rule back). A firewall rule of your own is left: an accept no forward points to stays. CodeHero writes the rules again after every start of a container and checks them every 5 minutes; a save for the next boot that failed is tried again at each check. - If the server is behind a router's NAT (the public address is the router's, not on the server), a connection from the server or from a container to that public address goes through the router, as for any other port: it reaches the container only if the router sends it back (hairpin NAT). Use the server's own address instead, for example 10.0.3.1 from a container.
- After the upgrade to 5.7.0 every existing container is isolated. If one project uses another project's container service (a shared database or cache), tick it on the serving project's page.
- If this server's kernel cannot tell replies apart, each allowed pair talks both ways, and the line says so. If the line says «the container rules are not active on this server»,
Saveapplies them. - Each container can use only its own address. It cannot pretend to be another container or the server (5.7.0).
- The rules follow the running containers by themselves. After a container starts or restarts, they follow within a minute. Until then, that container may not answer.
- If the line says «the container rules do not yet match the running containers», wait a minute. Nothing to do.
- If the line says «refused the address check towards the server», this server's kernel refused that part. The rules between containers still apply.
- The rules are CodeHero's own nftables table on the containers' bridge (
lxcbr0). They touch no other table, no port of the server and no SSH. A server with containers needsnftables(setup and the upgrade install it). - The network rules work only between two containers. A link with a host project gives only the tickets' part (Project links).
Snapshots
BTRFS snapshots provide instant backup and restore, in three tabs:
| Tab | What is in it | Deleted |
|---|---|---|
| Automatic | The snapshot taken before a ticket's first run | The newest 20 are kept (any number; 0 = all) — older ones go one at a time, only while no ticket of the project runs |
| Kept | The snapshots you create, the one before a Resize Disk, and every 📌 kept one | Never automatically — only by your Delete |
| Safety | The copy taken right before every restore, so a restore can be undone | The newest 5 are kept |
- 📌 Keep moves an automatic snapshot to Kept; Unpin moves it back.
- Restore rolls the container back, services and databases included; a Safety snapshot of the current state is taken first. When the restore cannot finish, the container goes back to that Safety snapshot (5.8.0).
- Delete while a ticket of the project runs asks: delete now (it may slow the ticket down), or when no ticket runs.
- hold ≈ (next to the count, v4.55.0+) = what deleting all of them would give back — more than the sum of the per-row sizes: data that several snapshots share is in none of them alone.
- After the upgrade to 4.51.0, a project with more than 20 automatic snapshots shows a banner: pin the ones you want to keep; Apply now deletes the rest at once; otherwise the limit applies by itself 7 days after the upgrade.
Databases in a snapshot. Just before a snapshot each running database is flushed — by its service's pre_snapshot.sh (in /opt/services/<service>/, beside backup.sh; post_snapshot.sh runs right after), or the same built-in command for a service without one: MySQL/MariaDB FLUSH TABLES, PostgreSQL CHECKPOINT, MongoDB fsync, Redis SAVE, SQL Server CHECKPOINT. Nothing is locked and nothing can hold the snapshot up: a stopped database or container is skipped, every step has a time limit, a failure is only logged. A snapshot is consistent even without them — taken in an instant, like a power cut, after which every database recovers on its own; the flush only makes that recovery quick.
Disk space. A snapshot holds the old versions of the files that changed since it was taken — the limit keeps that bounded. Since v4.50.8 MySQL in a new container runs without binary logs: a development container replicates nothing, and MySQL 8 kept them for 30 days — gigabytes on a project whose tests rewrite the database, kept again by every snapshot. The upgrade never changes an existing container; to switch them off in one, run in its Terminal:
printf '[mysqld]\nskip-log-bin\n' > /etc/mysql/mysql.conf.d/zz-codehero-dev.cnf
systemctl restart mysql
rm -f /var/lib/mysql/binlog.[0-9]* /var/lib/mysql/binlog.index
Log limits. Since v4.54.3 a new container keeps its logs bounded: logrotate runs every day (so the rules that nginx, PHP and MySQL ship take effect), the app's own logs — logs/, storage/logs/ and var/log/ in the project folder, and pm2's — are rotated daily with the last 7 kept, and the system journal keeps at most 200 MB. The upgrade never changes an existing container; to add log limits to one, run in its Terminal (the paths cover the default project folders):
apt-get install -y logrotate
systemctl enable --now logrotate.timer
mkdir -p /etc/systemd/journald.conf.d
printf '[Journal]\nSystemMaxUse=200M\n' > /etc/systemd/journald.conf.d/codehero.conf
systemctl restart systemd-journald
cat > /etc/logrotate.d/codehero-app <<'EOF'
/var/www/projects/*/logs/*.log /var/www/projects/*/storage/logs/*.log /var/www/projects/*/var/log/*.log /opt/apps/*/logs/*.log /opt/apps/*/storage/logs/*.log /opt/apps/*/var/log/*.log /home/claude/.pm2/logs/*.log {
daily
rotate 7
missingok
notifempty
compress
delaycompress
copytruncate
su root root
}
EOF
chmod 644 /etc/logrotate.d/codehero-app
Each installed package brings its own rule — one per PHP version (php7.4-fpm, php8.4-fpm …), MySQL/MariaDB, PostgreSQL, Redis, nginx. MongoDB brings none; a new MongoDB install gets one, and in an older container with MongoDB add it with:
grep -rqs /var/log/mongodb /etc/logrotate.d/ || { printf '%s\n' '/var/log/mongodb/*.log {' ' daily' ' rotate 7' ' missingok' ' notifempty' ' compress' ' delaycompress' ' copytruncate' ' su mongodb mongodb' '}' > /etc/logrotate.d/mongodb-codehero && chmod 644 /etc/logrotate.d/mongodb-codehero; }
Container Services
The Service Manager (v4.6.3+) lets you install, control, and manage services inside the container without touching the command line.
Every ticket of a container project receives the services with their ports, logins and scripts — and, since 4.60.2, every language runtime installed in the container, each version with the exact command to call it (node22 · npm22 · npx22 and its folder, python3.12, php8.3 with its FPM socket, go1.22, ruby3.3, Java's JAVA_HOME, dotnet). Several versions can be installed side by side, and a plain node may not exist: the list says which plain names work and how to put a version's folder on the PATH for a command or the test runner.

Installing Web Apps
- Click "+ Add Service" → Web App
- Select Language, Version, Server/Framework, and Path
- Click Install

Supported Languages & Frameworks
| Language | Versions | Frameworks |
|---|---|---|
| PHP | 7.4 – 8.5 | php-fpm, Laravel, Symfony, WordPress |
| Python | 3.8 – 3.13 | Flask, Django, FastAPI, Gunicorn, uWSGI |
| Node.js | 18, 20, 22 | Express, NestJS, Next.js, PM2 |
| Go | 1.21 – 1.23 | Gin, Echo, Fiber |
| Ruby | 3.2 – 3.4 | Puma, Rails, Sinatra |
| Java | 8, 11, 17, 21, 25 | Spring Boot, Tomcat |
| .NET | 8.0, 10.0 | Kestrel |
Java 25 and Tomcat (5.14.0).
- OpenJDK 25 installs in a container on Ubuntu 24.04 and 26.04 (+ Add Service → Web App, Language Java; or a ticket's
install). A container without root runs it. - If an install names no Java version, it gets 25.
- Before, the Tomcat server started
java -jar app.war, which never runs a WAR. Ubuntu's own Tomcat held the port, so the preview said «It works !» while the Services tab said «running» for an app that was not there. - Now Tomcat runs the project's WAR in its OWN Tomcat inside the project:
- Build the WAR and put it in the project folder as
app.war. - The app is served at
/, on 127.0.0.1 at the service's port, as the project's user. Its Tomcat folder is<project>/tomcat. - CodeHero writes the service's port into that Tomcat's
server.xmlat every start. - Ubuntu's own
tomcat10service is switched off.
- Build the WAR and put it in the project folder as
- If
app.waris missing, the start stops with «app.war is missing in <folder>: build the WAR and put it there as app.war». - Tomcat 10 runs Jakarta EE programs: a WAR must use
jakarta.servlet.*, notjavax.servlet.*. - If the preview shows «It works !», your app is not running. Open a path of your app instead.
PHP apps and shops in a container (5.15.0).
- A PHP app on
/takes addresses of the formindex.php/route(the back office of PrestaShop 8, Symfony and others). The web server runs the PHP file and gives it the rest of the path. - A PHP response with big headers works now. Magento's Content-Security-Policy header is 4.3 KB, and it gave a 502 before. The container's PHP and the preview have bigger buffers.
- The Server list of a PHP web app has two new entries:
magentoandprestashop.laravelandsymfonyserve from the folderpublic/,magentofrompub/. The other servers serve the project folder. - A new skill and guide,
shops, gives a ticket the steps for a Laravel, WordPress with WooCommerce, PrestaShop or Magento shop. The business inputs (currency, taxes, payments, shipping) stay yours: a missing one stops the ticket with «NEEDS THE USER: yes». Magento needs OpenSearch 2 (below) and 4 GB of memory. - An upgrade rewrites no project's web server file. A project gets the new blocks when its web server files are next written: a new project, an install or removal of a service, a restore. Its backup does not call that file «changed by hand».
Installing Databases & Caches
- Click "+ Add Service" → Database / Service
- Select Database type and Version
- Click Install

Supported Databases
| Database | Versions | Port | DB manager (🗄️) |
|---|---|---|---|
| MySQL | 5.7, 8.0, 8.4 | 3306 | phpMyAdmin |
| MariaDB | 10.11, 11.4 | 3306 | phpMyAdmin |
| PostgreSQL | 14 – 17 | 5432 | Adminer |
| MongoDB | 8.0 | 27017 | Adminer |
| MSSQL | 2022, 2025 | 1433 | Adminer |
| DuckDB | 2.0 | 9494 | Adminer |
| RabbitMQ | 3.12 (Ubuntu 24.04), 4.0 (Ubuntu 26.04) | 5672 | — (queue; its page opens through the preview) |
| Mosquitto | 2.0 | 1883 | — (MQTT broker) |
| OpenSearch | 2 | 9200 | — (search; no password) |
| Keycloak | 26 | 8180 | — (sign-in, SSO; its pages open through the preview) |
| Metabase | 0.65 | 3030 | — (BI; its pages open through the preview) |
| Grafana | 13 | 3000 | — (monitoring; its pages open through the preview) |
The last six rows are new in 5.15.0. They have no 🗄️ DB manager. Their own section follows the Caches table.
DB manager (v4.52.0+): the 🗄️ icon of a database service opens it in a tool on the server, never
inside the container — phpMyAdmin at https://<server>:9454/ for MySQL / MariaDB, Adminer at
https://<server>:9454/dbmanager/ for PostgreSQL, MSSQL, MongoDB and DuckDB. Two MySQL services on different
ports each open their own. Both open only from the panel, with a one-time token (60 seconds, used once)
— never a user or password in the URL; opened any other way they show no login form.
Caches
| Cache | Version | Port | Persistence |
|---|---|---|---|
| Redis | 7 | 6379 | RDB snapshots |
| Memcached | 1.6 | 11211 | None (memory only) |
Queue, MQTT, search, identity, BI and monitoring services (5.15.0)
Six more services are in the catalog. Each installs in a container on Ubuntu 24.04 and 26.04, on x86 and on ARM. None asks you to accept a licence.
| Service | What it is for | Port | Smallest container memory (x86 / ARM) |
|---|---|---|---|
| RabbitMQ | A queue between your programs (AMQP) | 5672 | 256 MB / 256 MB |
| Mosquitto | An MQTT broker for devices and apps | 1883 | 256 MB / 256 MB |
| OpenSearch | Search over your documents | 9200 | 1024 MB / 1280 MB |
| Keycloak | Sign-in for your users (SSO), with roles | 8180 | 1024 MB / 1024 MB (PostgreSQL included) |
| Metabase | Questions and dashboards over your SQL data | 3030 | 2048 MB / 2048 MB |
| Grafana | Dashboards over time series, and alert rules | 3000 | 512 MB / 512 MB |
- 256 MB is the smallest limit the panel offers. Mosquitto itself needs under 32 MB.
- If the container's limit is lower than the number above, the install still runs and says: «<name> needs at least N MB of container memory on this machine and this container has M MB: the kernel can kill it for lack of memory. Give the container more (project page → Container tab → Limits).» It is a note, never a refusal.
- If OpenSearch, Keycloak or Metabase does not start or stops by itself, the container's memory is too low. Raise it (Container tab → Limits), then press Start.
- Size and time: OpenSearch downloads about 1 GB (1.25 GB on disk). Metabase's program is 714 MB, and its first start takes about 90 seconds. Grafana adds about 1.4 GB on disk. Choose a Disk Size to match.
Install one.
- Click + Add Service → Database / Service.
- In the Database list choose RabbitMQ (group Queue), Mosquitto (MQTT broker), OpenSearch (Search), Keycloak (Identity (SSO)), Metabase (BI) or Grafana (Monitoring).
- Read the lines under the list: «Needs about N MB in the container.», «Needs PostgreSQL in this container: install it first.» and «Licence: …».
- Click Install.
- The row shows its group (Queue, MQTT broker, Search, Identity (SSO), BI, Monitoring) in the Type column. It has the buttons of a database (Service Control, below), Backups and 🔒 Change Password. It has no 🗄️ DB manager.
- Keycloak and Metabase keep their data in the project's PostgreSQL. If the container has no PostgreSQL, the install is refused before it changes anything. Install PostgreSQL first.
- RabbitMQ has one version per system: 3.12 on Ubuntu 24.04, 4.0 on Ubuntu 26.04. The Version list shows the one that fits.
- OpenSearch installs the newest 2.x release (it has its own Java). Keycloak 26 and Metabase 0.65 run on Java 21, which the install adds.
The login of each service.
| Service | Login | Keys on the 🔐 Secrets page |
|---|---|---|
| RabbitMQ | admin, vhost / (guest is deleted) | RABBITMQ_USER, RABBITMQ_PASSWORD |
| Mosquitto | admin (anonymous clients are refused) | MOSQUITTO_USER, MOSQUITTO_PASSWORD |
| OpenSearch | none: no password, no TLS, it answers on 127.0.0.1 inside the container only | none |
| Keycloak | admin in the realm master | KEYCLOAK_USER, KEYCLOAK_PASSWORD |
| Metabase | the e-mail admin@codehero.local | METABASE_USER (holds admin), METABASE_PASSWORD |
| Grafana | admin | GRAFANA_USER, GRAFANA_PASSWORD |
- The password is made at the install. Read it on the project's 🔐 Secrets page. The same values are in
.secrets/codehero-db.env, and the row's Connection Info shows them. - A ticket uses the login BY PATH and never prints it.
- To change a password use the 🔒 Change Password button of the row. Never change it in the service's own console. OpenSearch has no password, so it has nothing to change.
Web pages of the services.
- RabbitMQ (its management page), Keycloak, Metabase and Grafana have a web page. It opens through the project's preview. It needs no extra port and no firewall change.
- The address is
https://<server>:9867/<folder>/<name>/.<folder>is the project's folder name (the first part of the project's preview address).<name>israbbitmq,keycloak,metabaseorgrafana. Example:https://<server>:9867/myshop/grafana/. - On a server with an apps domain,
<server>is the apps domain. On a local install without one, it is the server's IP address (the address stored with the project). - The link is on the service's row: open the row → Connection Info → the line UI (the engine's own login). The link carries the project's preview key. Without the key the page shows «Access Denied».
- Two gates: the preview's key lets you in, then you sign in with the service's own login (table above).
- The services listen on
127.0.0.1inside the container. Never open their raw ports (15672, 8180, 3030, 3000, 9200) from outside. - Grafana and Metabase send no usage data and check for no updates: the install turns that off. You may turn it on inside the program.
- If you add or change the apps domain later, install Metabase again from the Services tab. Its data stays.
- A project restored as a new project installs the service again with its new folder, so the page works there too.
Devices outside the server (port forward).
- A device or a server outside the container reaches Mosquitto or RabbitMQ only through a port forward that you add: Container tab → Port Forwarding → Host port → Container port → + Add.
- Mosquitto: host port 8883 → container port 1883, with TLS ticked (the server's certificate). Never open 1883 to the outside.
- RabbitMQ: host port 5672 → container port 5672, or host port 5671 → container port 5672 with TLS ticked.
- Never forward the pages' ports or OpenSearch's 9200. The pages use the preview. OpenSearch has no password.
Backup and restore.
- Each service has Backups → Backup Now on its row, like a database. Its data is also in a Quick or Complete ZIP, a snapshot and a container image. A restore as a new project installs the service again in the new container and brings its data.
- RabbitMQ: a backup stops the broker for about 15 seconds (stop, copy, start). No confirmed message is lost. The connections close, so an app must reconnect. The backup holds the messages, the users, the queues and the exchanges.
- Mosquitto: the broker keeps running and the clients stay connected. The backup holds the stored messages (the retained ones too), the password file and the settings.
- OpenSearch: the backup is a snapshot of every index, and the service keeps working. A restore puts the indices of the backup in place of the indices now there. Indices whose names start with a dot are system indices and are not part of it.
- Keycloak: its data is in the project's PostgreSQL (database
keycloak), so PostgreSQL's backup carries it. The Services-tab backup of Keycloak also exports every realm with its users. That starts a second Java process (about 400 MB more memory for a moment). A restore of that file replaces your realms of the same name. Themasterrealm (Keycloak's own admin and its password) is not replaced: the admin password stays the one the Services tab shows. - Metabase: the backup is ONE archive: the database
metabaseand the key that opens the saved passwords of your data sources. Never make a new key. Without it Metabase does not start. - Metabase password: it needs at least one digit (Metabase's own rule). A Change Password without a digit is refused with that sentence; the passwords the platform makes always have one.
- Grafana: the backup is an online copy of Grafana's database (dashboards, data sources, alert rules, users) and the key for the saved data-source passwords. Files in
/etc/grafana/provisioningare not in it: put dashboards in through Grafana's page or API. - Keycloak and Metabase restart by themselves after the Services-tab restore of PostgreSQL and after a restore over a project: they held the old pages and connections in memory. If a restart fails, the restore's notes name the Services-tab step: press Restart on the row.
- A restore (the Services-tab restore of the service, a restore over a project, as a new project, a snapshot restore) can bring back an older password of Mosquitto, RabbitMQ, Keycloak, Metabase or Grafana. The platform checks the saved password against the engine at the end of the restore. If the saved one does not work, it uses the password the container keeps; if that does not work either, Mosquitto, RabbitMQ and Grafana get the saved password again, and for Keycloak and Metabase the restore's notes say what to do (they change a password only with the current one). A password is never in a note.
Licences.
- Mosquitto (EPL-2.0 / EDL-1.0), RabbitMQ (MPL-2.0; Erlang is Apache-2.0), OpenSearch and Keycloak (Apache-2.0): free. There is nothing to accept.
- Metabase and Grafana are AGPL-3.0: free to use, inside a company too. If you change the program and offer your changed copy to others over a network, you must give them your changes. Metabase's Enterprise features and Grafana Enterprise are separate paid licences. This is not legal advice. The install form shows the licence line.
Service Control
Each service has action buttons: Start, Stop, Restart, Delete. Bulk actions at the top: Stop All, Start All, Refresh Status, Full Backup.
Oracle 23ai Free is experimental. A ZIP backup does not carry its data: the backup says «Oracle's data is not in a ZIP backup: keep it with snapshots or a container image.», and a restore from a ZIP says the same, says that Oracle must be installed again from the Services tab, and never counts it as restored. Keep an Oracle project with snapshots or a container image. In RC testing its install took about 30 minutes and ran in the background; check the Services tab for completion. Since 5.12.4 the install enables Oracle's unit, so it starts by itself after the container restarts (an Oracle installed before 5.12.4 stays disabled: press Start on its row after a restart; install log: «Oracle starts after a restart of the container: yes»). After a snapshot restore, press Start if its row shows it stopped.
A version never measured in a container without root (5.12.4). For a container without root, the install form shows, next to a version nobody has measured there (for example Oracle 21c-xe), «<name> <version> has not been measured in a container without root: it may not work. For root, make the project's container with «Container without root» unticked.» The same sentence is in the answer and the install log of that install (also of the codehero_manage_service install). The install still runs: you decide. A container with root says nothing.
SQL Server: you choose the edition (5.14.0).
- The Install form has one more choice for SQL Server: Edition (Express, Developer, Standard or Enterprise). Express is selected at the start.
- Standard and Enterprise show an amber tag «needs commercial licence». CodeHero asks for no product key; you must own the licences. Developer has every feature but is not for production.
- Beside Install the form says «Install = you accept Microsoft's licence terms». Pressing Install is your acceptance. CodeHero never accepts Microsoft's licence for you. A ticket that installs SQL Server names the edition and passes
licence_accepted: true; your Approve of that call is the acceptance. - The Services tab shows the edition in its Server column. The row's own Install button (an engine that is not installed) asks again with «Install = you accept Microsoft's licence terms».
- SQL Server needs at least 2 GB of memory. If its setup refuses for memory, the install says «SQL Server needs at least 2 GB of memory; this container has N MB: raise the container's Limits (Container tab → Limits), then press Install again».
- SQL Server Agent runs on Developer, Standard and Enterprise (CodeHero turns it on). Express keeps it off: Microsoft's licence does not include it there.
- A restore or an import is never stopped by the edition or the licence: it installs the edition of the backup (Express when the backup has none) and goes on.
- SQL Server 2022 and 2025 install on Ubuntu 24.04 and 26.04 (x86 only). 2025 uses Microsoft's own package list for Ubuntu 24.04 and later.
- SQL Server 2025 now counts as measured in a container without root: the install form shows no «has not been measured» sentence for it.
SQL Server has its own login for the project (5.13.5).
- Every project's SQL Server has a login of its own, and a database that this login owns. Its name and password are
DB_USERandDB_PASSWORDon the project's 🔐 Secrets page. The same values are in.secrets/codehero-db.env. - Your app connects with that login. It never uses
sa, the administrator's login. - CodeHero makes the login when it installs SQL Server. It makes it again when a ticket starts in a Developer project, if the login is missing. A login that is there keeps its password.
- If the login could not be made, the install says why.
.NET and SQL Server in one container (5.13.5).
- The .NET SDK comes from ONE package source: Ubuntu's, or Microsoft's only for a version Ubuntu does not have.
- Before, a container that had SQL Server and later got the .NET SDK could stop
dotnet buildanddotnet publishwith «No SDKs were found». The apps that were running were not touched. - If a container is already in that state, run the same .NET install again from the Services tab. It repairs the SDK and says «(the SDK was repaired: one package source)». A ticket does it by itself when it sees «No SDKs were found».
.NET and SQL Server in either order (5.14.0).
- In 5.13.5 a container that got the .NET SDK first and SQL Server after stopped half-way. apt refused every command with «Conflicting values set for option Signed-By». SQL Server was installed and running, but its tools, its service row and the project's login were missing.
- Now every Microsoft package source in a container uses ONE key file,
/usr/share/keyrings/microsoft-prod.gpg. It holds both of Microsoft's keys, each checked by its fingerprint. - The two installs work together in either order, on Ubuntu 24.04 and 26.04.
- If a container from 5.13.5 is already left half-way, run the same install again from the Services tab (SQL Server or .NET). It repairs the container, and apt works again.
MySQL and MariaDB added later (5.14.0).
- A MySQL or MariaDB added to a container after it was made (the Services tab, or a ticket's
install) now gets the project's own login and database at once. Before, the app'sDB_USERgot «Access denied». - The login is
DB_USER/DB_PASSWORDon the project's 🔐 Secrets page. The same values, and the database nameDB_NAME, are in.secrets/codehero-db.env. Your app uses them, neverroot. - CodeHero makes them only when they are missing. An account that is there keeps its password. Then it logs in as the project to prove the login.
- A ticket's start in a Developer project makes them too, for a container that already had such an engine.
- If the login is NOT ready, the ticket is told. Otherwise nothing is said.
- MariaDB now runs the database's events. Its event scheduler is off by default (MySQL 8's is on), so a restored copy kept its events and never ran them. A MariaDB installed from 5.14.0 starts with
event_scheduler = ON(the file/etc/mysql/mariadb.conf.d/60-codehero-events.cnf). A restore as a new project installs MariaDB the same way. - A maintenance copy that is being prepared still holds its events.
How tickets build .NET, SQL Server and Java apps (5.14.0). The texts a ticket reads for these stacks are now short numbered steps with a check.
- .NET: the connection string is in
<project path>/.env, one value per key (DB_NAME,DB_USER,DB_PASSWORD). It is never inappsettings*.json, and the app never signs in assa. - .NET: the ticket runs
dotnet publishfirst, then makes ONE install withstart_commandandinternal_port, restarts the service after every publish, and checks the app withcurl. It never starts the app withdotnet run,nohup,setsidor&. - SQL Server: the ticket writes T-SQL (
TOP,[name],IDENTITY(1,1),NVARCHAR), not MySQL's. Ifmssql-serverstopped at start, memory is short, and the ticket tells you to raise the Limits (Container tab → Limits). - Java: the ticket builds with the project's wrapper (
./mvnwor./gradlew), usesjakarta.servlet.*for Tomcat, reads a secret from.env, and checks a Spring Boot app at/actuator/health.
Database Backup & Restore
Database services support Backup (timestamped native format; since v4.55.0 a MySQL / MariaDB backup keeps the stored procedures, functions and events too — a service added before 4.55.0 as well) and Restore (from backup file). Full Backup is the project's Complete backup — files, every database, services, tickets, the same as Backup & Restore → Complete (+ tickets); it shows in the Backup History and restores from there (before v4.55.0 it ran an older backup that missed most databases and the binary files). Backups can be downloaded from the web interface. Since v4.55.1 these dumps are kept with the project's backups, in /var/backups/codehero/<CODE>/services/<service>-<version>/ (before: inside the program's folder, /opt/codehero/backups/<id>/ — the upgrade moves them, the old place is still read); after a project delete they are listed under Deleted projects. The dump taken before Delete Host DB goes there too.
With a backup encryption key (Section 28, 5.10.0) a dump downloads encrypted, for example dump_20261030_211500.sql.gz.age. Decrypt it on your own computer before you upload it back. The Services tab refuses an encrypted dump, also a renamed one, for an upload or a Restore, before anything changes: the dumps already there stay as they are.
Password Management
Database credentials are auto-generated during installation. Change passwords anytime — connection scripts and backup scripts are automatically updated. Change Password of SQL Server works in a container without root too (5.13.5). Before, it answered «Password change failed: Sqlcmd: Error: …» there, and nothing changed.
Container Terminal
Full shell access inside the container with three modes: Inline (embedded), Popup (new window), Full Page (full-screen). Uses xterm.js with copy/paste support. Since 5.12.3 only the container of a project opens, and a project in production mode or LOCKED asks for your panel password and a current 2FA code first (the password alone while 2FA is off), as the server's terminal does (Section 21).

Custom Services Made by Tickets (4.61.0)
A ticket can create a service the catalog does not have — a worker of your app, an engine the catalog lacks — inside the project's container. The platform then treats it like any other service: it backs it up, restores it, moves it with the project and shows it in the Services list with a purple custom badge.
- Reuse first. What is already there comes first, then the catalog; a custom service only for a real gap — never the same or a similar engine.
- nginx is part of every container (never listed as a service): a custom web app listens on a local port and declares its path; the container's nginx routes it. A service that is itself a web server is refused.
- You approve every new service on the ticket's Approve / Reject panel: the service, type, engine, role, version, ports, path, its data and any similar service you already have. The
[PLAN]asks for all planned services at once; one Approve covers every ticket of the project. A catalog install by a ticket asks too. The click answers exactly the request on your screen. - Ready before the build: the plan writes an ENVIRONMENT table and its SETUP ticket proves each service works (a real operation and a test backup) before any build ticket starts.
What it is: the ticket writes its files in the project (.services/<name>/, kept with your code) and the platform copies them into the container's /opt/services/<name>/: service.json, install.sh (runs again without questions — twice at registration, and again by itself on a restore into a new container) and its own start / stop / status / backup / restore scripts. The platform writes platform.env with the project's folders, so a project restored under a new name never runs against the old one's paths.
Backups and restores: every backup level — Quick too — holds each custom service (folder, config files, its data). Restoring into the same project stops it, brings config and data back and runs it again if it was running; restoring as a new project or importing a container image installs and registers it again for the new project. A failed restore is never started, not even at the next container start. Snapshots run the service's own snapshot scripts, and a rollback reports the services that no longer match.
The container itself (4.61.1): a ticket only reads its state — and creates it when the project has none yet (the container alone; every service after it with your approval). Stopping, destroying or moving the container and restoring or deleting a snapshot are yours: from the panel, or by the assistant only after your explicit yes for that operation.
Moving to a server that still runs a version before 4.61: everything else comes back; that version reports the custom services as «Install … failed» and leaves them out. Restore the backup on a 4.61 server, or upgrade that server first.
In the Services list: Delete only unregisters a custom service — its folder and data stay; its ports, path and scripts change through its folder (with your approval when anything you approved changes). A backup made by 4.61.0 restored on an older version restores everything except the custom services.
When to Use Containers
| Scenario | Recommendation |
|---|---|
| Simple static websites | Container not needed |
| Projects needing specific runtime versions | Use containers |
| Projects requiring databases | Use containers |
| Client projects needing isolation | Use containers |
| Multi-service architectures | Use containers |
32. Production Deployment
Deploy CodeHero behind a production-ready setup with custom domains and SSL.
Domains of this site (5.11.0)
A live site answers on one domain or on several, each with its own certificate. Open the project's page → Production Deployment; it is the same for a host project and a container project.
- The first deployment. While the site is not live the panel says «This site is not live yet.» and shows one form. Type the domain and choose its certificate: a stored one (the ones that cover the name come first, marked ★) or New Let's Encrypt certificate with your email (the domain's A record must point to this server). Set the Port (443 unless you need another) and Redirect HTTP → HTTPS, then press Go live. Everything is sent in one step, so a name that another project serves on 443 can go live on, for example, 8443, and nothing is left half done.
- The list. Once the site is live, Domains of this site shows every domain: its certificate (Let's Encrypt or Custom), the date it ends (amber under 14 days, red when past), and «covers ✓» or «does not cover ✗» (visitors of a name the certificate does not cover see a browser warning). The primary is the site's main name and is listed first.
- Add a domain. Type the name, choose a stored certificate that covers it (★) or New Let's Encrypt certificate (made for that one name), press Add domain. The other domains are not touched. A site has at most 20 domains, and a name that another project serves on the same port is refused.
- Also www.<name>. Under the name and certificate fields, the tick Also www.<name> (it shows the name you typed) adds
www.<name>as a domain of the site in the same step, with Go live and with Add domain. It is ticked at the start for a bare domain (example.com, example.gr, example.co.uk) and not for shop.example.com. It is hidden for a name that starts with www. With New Let's Encrypt certificate, one certificate covers both names (both A records must point to this server). With a stored certificate, it must cover both names: ★ marks a certificate that covers the name you typed, and with the tick on it must coverwww.<name>too. If it does not, the panel says «The certificate does not cover www.<name>. Choose one that covers both names, or a new Let's Encrypt certificate.» and nothing changes. If the site already haswww.<name>, nothing is added. The two names are two domains: Make primary and Remove work on each. Change certificate never adds www. - Make primary and Remove are on each row. Remove asks first and names the domain; removing the last one takes the site offline. The certificates stay (Settings → Certificates).
- Change certificate is on the primary: replace a custom certificate, move to Let's Encrypt, or repair «does not cover», without taking the site offline. To change another domain's certificate, make it the primary first. If the primary was changed in another tab meanwhile, the panel refuses with «This site's domains changed in another tab — reload and check them.» Open the panel again.
- Site settings. The Port and Redirect HTTP → HTTPS are the site's, for every domain. Save site settings publishes all the domains again with them. A site live on a port other than 443 with Redirect HTTP → HTTPS now sends visitors to that port. A site published before 5.11.1 gets it the next time you press Save site settings.
- Remove from production takes the whole site off: the confirm names every domain, the nginx site is deleted, the certificates stay.
- On a phone each domain is a small card and every field is on its own row.
Production PHP for this domain (5.16.6)
Host projects only. Open the project's page → Production Deployment → Production PHP for this domain.
- Each PHP version has a second PHP-FPM for the live sites:
codehero-php-prod@<version>(for examplecodehero-php-prod@8.5). The previews keepphp<version>-fpm. - Why: one PHP-FPM has ONE shared cache. Before 5.16.6 a live site got the JIT only for files it opened before its preview, the preview could run the live site's code and settings, and every preview change emptied the live sites' cache.
- Now a live site with Production PHP on always runs with the JIT (PHP 8.0 or newer, 8.3 too; PHP 7 has no JIT) and its own cache (files checked every 60 s). Measured: a CPU-heavy function 20 ms instead of 130 ms (PHP 8.5), 31 ms instead of 186 ms (PHP 8.3).
- The preview is as before: no JIT, every change seen at once. A preview change no longer empties the live sites' cache.
- Reset PHP cache reloads the PHP that serves that domain. Every live site of the same PHP version compiles its files again.
- The upgrade moves every existing live pool by itself (each live site stops for about a second).
- A project has ONE live pool for ALL its production domains.
- Switch the JIT off or change a setting: choose Off (the live site uses its preview's PHP), or write one line
opcache.jit = offin the settings box, then click Save PHP settings (Defaults puts PHP's production values in the box). Any php.ini value can be changed there, one per linekey = value. - PHP workers for this domain:
pm(dynamic / ondemand / static), max children, start, min / max spare, requests before a restart. Empty = the server's mode (Settings → Performance). Save workers saves them, Use the server's empties the fields. Under the fields you see the memory they may take. IF all live sites and previews together could take more than the server's RAM, THEN a red warning shows (a warning, never a refusal). - The preview's own PHP settings: project → PHP Settings → Preview PHP settings. Add your own lines
key = value. The JIT andopcache.validate_timestamps = 0are refused there (the preview must show every change at once). A project on the server's shared PHP (an older project) uses.user.iniinstead; that file reaches the live site too. - A PHP version change (PHP Settings → Save) moves the preview AND the live site, with your settings for both. Only what the new version cannot take is left out, and the answer says what.
- Containers: a container project's preview AND live domain run the SAME PHP and nginx inside the container. CodeHero does not change them: you do, or a ticket with the skill
tuningon your word. HTTP/3 needs nothing inside a container. - Static files of live sites: images, css, js with
?v=are kept by the browser a year; any other link an hour, then the browser asks again and gets304when nothing changed (before: 30 days for every name). Put?v=<version>on your css/js links and change it when the file changes. A browser that cached a file before 5.16.6 can keep it up to 30 days once. The upgrade changes only those lines in each live site's nginx file (nginx is tested first; everything is put back if it refuses). - The nginx version is hidden on Ubuntu 26.04 too: Ubuntu's own
server_tokens build;line is now a comment and CodeHero'sserver_tokens offapplies. A line you wrote yourself stays.
What the WAF stopped, and how to let it through (5.16.3)
Where you see it: the WAF item in the top menu (5.16.4), or Open the WAF log under What it stopped in Settings → Security → Web application firewall (WAF) and on a project's page. Those two places show only a count: the hits in the last 24 hours and in the last 7 days. The list is on the WAF log page (next part).
The WAF log page (5.16.4)
Open WAF in the top menu (next to Logs). On a phone the menu is hidden: press ⋮ (the last four items: Updates, Logs, WAF, News) or ☰ (the whole menu).
- Filters (left; on a phone they fold above the list — press Filters): Projects (tick one, several, or All projects; No project = the panel and unknown sites), Where, What happened (Refused / Logged only), Rule number, Request contains, Parameter name, Client address contains, From and To (date and time), Search. Press Apply filters; Reset filters clears them. No filter = everything.
- Tabs: All hits, By rule, By request, By project. A group shows its count, its newest time and its top requests, parameters and projects; Show these hits opens its hits. 50 hits a page, Previous and Next.
- A hit shows the time, refused or logged only, where (Admin panel, Preview, Live domain and the host), the project, the request path, the parameter NAMES (never a value), the rules and the score, with Allow this and Switch this rule off for this site (or for the previews, for the panel). Each asks first.
- HTTP/3 (5.16.6): browsers send no Host header over HTTP/3. Before 5.16.6 a live site's «Log only» hit over HTTP/3 was only in All hits, not on the site's own WAF view. Now every inspected request is named by the server block that served it, and the host column shows the site. No site's nginx file changed for this.
- From a project's page, Open the WAF log opens this page with that project chosen:
/waf?project=shop,/waf?project=shop,blogor/waf?project=all. - Clear history… asks first and names the projects, the places and the number of hits. It empties only this list. The server's log file and the firewall's settings are kept.
How to let a request through:
- Admin panel and Previews: on the WAF log page each hit has Allow this and Switch this rule off for the panel (or …for the previews). Allow this lets through only that rule, for that parameter, on that path; it shows only when the parameter and the path are known. Switch this rule off … works for the whole area (every page and every parameter); a box asks first. In Settings → Security, Admin panel: what is let through and Previews: what is let through list each allowance and each rule that is off. Press Remove to take one back.
- Live sites: open the project's page → 🛡 Web application firewall — this site. The WAF log page has Allow this and Switch this rule off for this site on each hit of the project; the project's page lists what is let through, with Remove.
How to switch it off:
- One rule only: use Allow this or Switch this rule off ….
- Look without refusing: set the area to Log only.
- Off for one area: set Admin panel or Previews to Off.
- Off for one live site: set its Live domain to Off on its page, or in the Projects table.
- Off for one preview: set its Preview to Off, there too.
- Off completely: set Admin panel to Off, Previews to Off, and every live site to Off.
If something on the panel breaks behind Block: 1. Set Admin panel to Log only. 2. Open WAF in the top menu and look at the hits. 3. Use Allow this, or switch that one rule off. 4. Set Admin panel back to Block.
The WAF installs on Ubuntu 26.04 too (before 5.16.3 its setup failed there). A ticket knows the server has the WAF and what its modes are, and reads GUIDE: waf.md BEFORE it writes a form, an upload or an API. A ticket never turns the WAF off and never changes its rules; it names the page, the parameter name and the rule id in its report, and you decide.
Web application firewall — this site (5.11.0)
Each live site can have its own firewall settings. Open the project's page → 🛡 Web application firewall — this site (a panel after Production Deployment; click its title). It is the same for a host project and a container project. The firewall must be installed first (Packages → WAF Security Setup); if it is not, the panel says so and links there.
- The state line says «Live domain: …» (the mode now), «Preview: …», the names its live file answers to, and whether the live file exists («live file: yes»). While the live domain is Off, a line says the settings do nothing while the live domain is Off: choose Log only or Block.
- Preview (5.16.3): Follow the server's Previews mode (now: …), Block, Log only or Off.
- Live domain (5.16.3): Off, Log only or Block. A live site is Off until you choose. The sensitivity, address lists and exclusions below apply to the live domain. The project's mode plays no part. Start a site with Log only, see what it would stop, then choose Block.
- Sensitivity: Follow the server, or 1 to 4. 2 and up find more attacks and refuse more good requests — try Log only first.
- Request body limit (MB): from 1 to 1024; empty is the server's limit.
- Sensitivity (preview), Threshold (preview) and Threshold (live) (5.16.4): the preview has its own sensitivity (Server default or 1 to 4). The threshold is how many points a request may collect before it is refused: 2 to 100, empty is 5. A higher number refuses less. The preview and the live domain are separate.
- Rules switched off for this site (5.16.4): a whole rule, for every page and parameter of THIS project only, for the preview and for the live domain separately (up to 50 each). Remove takes one off. In the list of what was stopped, Switch this rule off for this site adds the rule (it asks first; the hit's Where decides preview or live domain). The order: Allow this (one rule, one parameter, one page) < Switch this rule off for this site < Switch this rule off for the previews / the panel (Settings → Security).
- Deny addresses and Allow addresses: one address or network per line (up to 100 in each). A denied address gets 403 in Block mode; in Log only the request is recorded and let through; with the mode Off these lists are ignored. An allowed address is never checked; allow wins over deny, so an office inside a denied network can still come in.
- Extra rule packs: cPanel, DokuWiki, XenForo. WordPress, Drupal and Nextcloud are on for every site.
- Exclusions: each row is one rule left out for one path and one parameter (up to 80). Remove takes a row off the form; Save keeps the change.
- Save sends the form. Remove this site's own settings (it asks first) removes them all: the live domain is Off again, the preview follows the server's Previews mode, the lists and every «Allow this» go (5.16.3). «Saved — the live file did not need a change» is a success: the settings were saved, and the site's nginx lines are the same (for example when the mode is off). A site that is not live yet only saves its settings; its lines are written at its first deployment.
- What this site's firewall stopped (5.16.4) shows a count: the hits in the last 24 hours and in the last 7 days. Open the WAF log opens the WAF log page with this project chosen: its hits, with Allow this («Let requests to /search pass rule 941100 for ARGS:q on this site? Only that rule, that parameter, that path.») and Switch this rule off for this site.
- The Where column (5.16.3) says Live domain (with its host) or Preview (with the project's folder). Allow this on a preview hit adds one exclusion of the previews, not of this site (Settings → Security lists it, with Remove); the live domain is not changed.
- Two tabs: a save made from older settings is refused with «This site's firewall settings changed in another tab — reload and check them.» Close and open the panel to read them again. A save and a domain change of the same site wait for each other («Another change of this site's domains is still running» means try again in a minute). «The firewall did not answer in time; the result could not be confirmed» means check the state line before you try again.
- The settings are kept when the site is removed from production: a new deployment brings them back. Deleting the project removes them.
- On a phone every field is on its own row and the list of what was stopped scrolls sideways.
Check dedicated hosting (5.8.0)
For one app on its own CodeHero server — its live project and its maintenance copy: the live project's page → Production Deployment → Check dedicated hosting. It changes nothing. Each line is ✓ (ok), ✗ (a hold: fix it before the app goes live) or • (a note), with the menu that fixes it: the live project in Production mode and locked, its copy in Maintenance mode; the panel, the previews, the live site and the copy each on names of their own (Settings → Domains); for each a certificate a browser trusts, at least 14 days left (a self-signed one fails, also with the right name); it reads what nginx serves, and a saved setting that differs from it is a ✗ — Save & Apply or Deploy again; the panel's sign-in cookie and CodeHero's protections in the nginx files (Save & Apply, Deploy); no plain TCP port forward (it is reached under the panel's name past nginx); both containers capped and in force, leaving the server at least 2 GB or a fifth of its memory and one CPU, each below 90 % of its memory limit since it started — run a real build in the copy, then check again.
How to set up the WAF for a new live site (5.16.7)
Follow the steps in this order. Nothing is refused until step 8.
- Install the WAF once: Packages → WAF Security Setup → Run Setup.
- Put the site live: the project's page → Production Deployment → Go live. A new live site is Off: the WAF does not look at it yet.
- Open the project's page → 🛡 Web application firewall — this site. Set Live domain to Log only. Press Save. The state line says «Live domain: Log only».
- Use the site like a visitor for a few days: every page, every form, search and upload, the login, the admin pages.
- Open WAF in the top menu. Under Projects tick the site. Press Apply filters. Open the tabs By rule and By request.
- Decide for each hit. A false positive is the app's own normal request: a page and a parameter the app sends, again each time a user does the same action. THEN press Allow this (one rule, one parameter, one page). An attack is a path the app does not have (
/.env,/wp-login.php), or many different rules on one request. THEN do nothing: Block will refuse it. Not sure? THEN do not allow it. Ask first. - IF one rule keeps stopping many pages, THEN go one step up. Narrowest first: Allow this · Switch this rule off for this site · a lower Sensitivity or a higher Threshold · Log only. Never Off only to make a hit go away.
- IF a few days pass and the hits left are only attacks, THEN set Live domain to Block and press Save.
- After Block, look at WAF from time to time. A visitor says «403 Forbidden»: find the hit, press Allow this.
- The previews follow Settings → Security → Firewall (WAF) → Previews (a first install: Log only). One preview can have its own mode on the same panel (Preview).
Make a live PHP site fast (5.16.7)
Follow the steps in this order. It is for a host project (not a container project).
- Settings → Performance → Mode and values: click Production (the server serves sites) or Hybrid (development and some live sites). Read The values for this server. For Production choose Safe or Fast. Click Apply. IF some values wait, THEN click Restart MySQL.
- Settings → Performance → PHP cache and JIT: set The projects' production domains to Follow the mode (on in Production) or On. Click Save PHP cache & JIT. Leave Also the projects' previews (dev) unticked: the AI must see its own changes at once.
- Settings → Performance → System profile: IF tuned is not installed, THEN click Install tuned. Choose
codehero-apps. Click Apply. - Put the project live (Domains of this site above).
- Project → Production Deployment → Production PHP for this domain: Follow the server or On — its own PHP (cache + JIT). Click Save PHP settings. The line under it says «runs on its own PHP … pool». IF it says «Not running», THEN click Save PHP settings again and read the reason.
- Leave PHP workers for this domain empty: the server's mode is right for most sites. IF you need more, THEN fill the fields and click Save workers. A red warning means all pools together could take more than the RAM.
- Put a version on your css and js links (
style.css?v=2) and change it when the file changes. The browser then keeps the file for a year. - A per-folder setting that must travel with the project (
upload_max_filesize) goes in.user.ini(the table «Which one to use» in Section 4). - New code on the live site is seen within 60 seconds. IF you do not want to wait, THEN click Reset PHP cache.
- Open the firewall for UDP
443(Section 34) so browsers can use HTTP/3. IF UDP is closed, THEN they use HTTP/2. Nothing breaks.
A frontend block for the panel (5.9.0)
Settings → Domains gives the panel a name of its own on its port — the simplest way. To serve it on port 443 under your own name, add a server block to THIS server's nginx that goes straight to the panel's upstream codehero_panel, with the trusted panel proxy's line in both locations and the /api/internal/ refusal:
server {
listen 443 ssl;
server_name codehero.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/codehero.yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/codehero.yourdomain.com/privkey.pem;
client_max_body_size 500M;
location ^~ /api/internal/ {
return 403;
}
location / {
proxy_pass http://codehero_panel;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
include /etc/nginx/codehero-panel-proxy.conf;
proxy_read_timeout 300s;
}
location /socket.io {
proxy_pass http://codehero_panel;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
include /etc/nginx/codehero-panel-proxy.conf;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400s;
}
}
Never proxy_pass https://127.0.0.1:9453 (the recipe of before 5.9.0): a local proxy hop makes every user arrive from 127.0.0.1 and share one sign-in lock. Behind a load balancer or a reverse proxy on ANOTHER machine, put its exact address in Trusted upstream proxies (Settings → Security → 🛡 Protections).
Domain Setup
- Point two names at the server: one for the dashboard (e.g.
panel.yourdomain.com), one for the previews (e.g.apps.yourdomain.com) - Configure both in the Settings → Domains tab
- The system will automatically configure Nginx; projects are then at
https://apps.yourdomain.com/project-name/
Why two names: a browser sends a site's cookies to every port of the same name. With two names, a project page you show a customer never receives your panel's login. This matters most for an app on a forwarded container port: it is not behind the preview's checks, so it must not share the panel's name.
Preview links and their key (5.7.0):
- The first page of a preview link (
?key=…) tells the browser to send onlyhttps://<server>:9867/as the Referer. So the key never reaches another project or site. Every other page is unchanged. - An app that reads the Referer on that first page (a «back» link) gets the site's root.
- The key stays in that page's address and in the browser's history. Share preview links only with people who may see the project.
- On the previews port nginx no longer follows
X-Accel-Redirectfrom a project. An app that uses it for protected downloads sends the file from PHP in the preview (readfile). Production domains still follow it.
Every request needs the key — this server's own too (5.7.0). Before 5.7.0 a request from the server itself (localhost) needed no key. Now every request needs the project's key.
- A ticket's tools (Browser, PageAssert, Screenshot, HttpRequest, WebFetch) send their own project's key by themselves.
- A ticket's shell and tests send it like this:
curl -sk -H "X-CodeHero-Preview-Key: $CODEHERO_PREVIEW_ACCESS" <preview URL>. - A project never gets another project's key. Another project's preview stays closed to it.
- Without the key the preview shows «Access Denied — Use the secure URL with key from CodeHero dashboard.»
A script or cron job of yours that calls a preview URL from this server:
- Open the project page. The key is in the 🔐 Secure URL address, after
?key=. - Send it in the header
X-CodeHero-Preview-Key: <the key>, or add?key=<the key>to the URL. - Or call the project's production domain instead. It needs no preview key.
If a tool of yours cannot send the key, switch 🔐 Secure URL off on the project page (it shows Public). Then that project's preview needs no key — for anyone who reaches the port.
The preview key stays out of logs and outputs (5.10.0):
- What an AI ticket sees shows every preview key as
[hidden]: its tools' outputs, its stored conversation and the logs. Its own commands that use$CODEHERO_PREVIEW_ACCESSkeep working. - You may paste a Secure URL or a key into a ticket message (or a description, a reopen text, a Telegram reply). It is accepted. The stored message shows
[hidden]. The ticket uses its own key by itself. - A ticket reads the previews' shared logs only with its LogTail tool. Its shell may not read them.
- The project page and the ticket page still show the key. The assistant and the companion see
[hidden]: read the key on the project page. - If you shared a diagnostic bundle or a project backup before 5.10.0, press New Key on each project (the project page → 🔐 Secure URL). Its Secure URL changes: send the new one to whoever must see the preview.
SSL Certificates
Let's Encrypt (Recommended):
- Go to Settings → Certificates
- Enter your domain name
- Click "Request Certificate"
- Certificates auto-renew every 90 days
Custom Certificate:
- Go to Settings → Certificates
- Select "Upload Custom"
- Provide your certificate (.pem) and private key
Ports
CodeHero installs no firewall. A published site needs ports 80 and 443 open; who reaches the panel (9453) and the previews (9867) you choose with your cloud's or your router's firewall — see 34. Ports and Your Firewall, and the three levels in Securing CodeHero.
33. Connected Devices & the CodeHero VPN
Devices (in the menu) holds the machines CodeHero uses outside its own server: a PC or a Mac at home or at the office, a server elsewhere — for a local LLM, Android / iOS builds, tests or releases. Name a device in a ticket («build on Mac-Office») and the ticket works on it. Each device has a name, a system (Linux / macOS / Windows), a connection and its purposes.
| Connection | When |
|---|---|
| CodeHero VPN (recommended) | The machine joins CodeHero's own WireGuard network. Works behind any router: nothing to open at home. |
| Direct | No VPN: CodeHero connects straight to the machine's SSH. On the same network (home, office) there is nothing to open; from outside, you forward ONE port on your router to it. |
Turn the VPN on (once)
- Devices → the VPN card → Install VPN.
- Give CodeHero's public address — prefer a domain (e.g.
vpn.example.com): if CodeHero moves to another server, you change the DNS and every device follows by itself. An IP works too, but a move then needs a new config on every device. Never the panel's own name: with the hosts line (below) your laptop would look for the VPN inside the VPN. - Keep port 51820/UDP open towards the server (your cloud firewall, if you use one) and turn the VPN on.
What a device reaches (5.7.0)
Each VPN device has the setting What it reaches (through the VPN): Devices → the device → Manage → Save.
| Setting | The device reaches |
|---|---|
| The server only (default) | This server itself: the panel, phpMyAdmin, the previews, SSH and its forwarded ports. Nothing else through the VPN: no other device, no container. |
| The server + its projects' containers | Also the containers of the projects allowed on it (Projects), directly. |
| The whole VPN | Also the other VPN devices and every container (CodeHero as a VPN server). |
- Always, whatever the setting: CodeHero reaches the device (SSH, the LLM tunnel), and the containers of the projects allowed on the device reach it.
- The server's own VPN rules decide it. A device's own WireGuard settings cannot widen it.
- At the upgrade to 5.7.0 every existing device gets The server only.
- A team member's laptop that uses a device's LLM server over the VPN (its VPN IP:port + key) needs The whole VPN on the laptop's own device entry. CodeHero itself reaching the LLM (a Local LLM slot, the tunnel) needs nothing.
- A device that opens a container directly (the second or third setting) also sends the containers' network through its tunnel. Add it to the
AllowedIPsline of the device's WireGuard config, for exampleAllowedIPs = 10.77.0.0/24, 10.0.3.0/24. The project's container address (its Container tab) shows the network:10.0.3.x→10.0.3.0/24. Linux, joined by its command: the file/etc/wireguard/chvpn.conf, thensudo systemctl restart wg-quick@chvpn. macOS, joined by its command: the same file, thensudo wg-quick down chvpn; sudo wg-quick up chvpn. Windows, joined by its command: the fileC:\ProgramData\CodeHero\chvpn.conf(Notepad, run as administrator), thenservices.msc→ «WireGuard Tunnel: chvpn» → Restart. A config file or QR imported in the WireGuard app: the tunnel → Edit → theAllowedIPsline → Save. The server routes the answer back; its rules still decide what passes.
Use the VPN to close your ports (5.7.0)
With your laptop in the VPN you can close the panel's ports to the internet and still use the panel. The VPN card's button Use the VPN to close your ports shows the steps for your server, in this order:
- Join your laptop (and every computer you open the panel from) to the VPN: + Device, connection CodeHero VPN, then Get the command or Config file / QR. The server only is enough to open the panel.
- Add the hosts line it shows to the laptop's hosts file: the panel's name → the server's VPN address (
10.77.0.1with the default network), so the certificate still matches. Windows:C:\Windows\System32\drivers\etc\hosts(open Notepad as administrator). macOS / Linux:/etc/hosts(withsudo). Take the line out to use the panel without the VPN again. - With the VPN on, open the panel through it and sign in. Only then close the ports.
- On your cloud's firewall (or your router), close:
9453(the panel),9454(phpMyAdmin),9867(the previews — only if nobody outside the VPN must see them), and each forwarded port that only VPN devices use. - Keep open: the VPN's UDP port (
51820), and80/443if you publish sites or use Let's Encrypt.
- SSH is your own decision. Some clouds have no web console: if you close SSH and the VPN stops, you can lose your way into the server.
- While
9453is closed, a new device joins with Config file / QR (the join command needs the panel first). - Without a domain there is no hosts line: through the VPN the panel is at
https://10.77.0.1:9453(the browser warns about the certificate). - CodeHero shows the steps. It never changes a firewall or SSH.
Add a device
- + Device → its name, system, connection, the SSH user and port, and its purposes (LLM, Android dev, iOS dev — a Mac only —, General). CodeHero logs in with a password or a private key.
- Open it → Connection → Get the command for its system and run that ONE command on the machine (as an administrator). It saves the join script on the machine, then runs it. It works once: a second run downloads nothing. A step failed? Fix it, then run the saved file again, within the hour. A new command cancels the old one. The panel's certificate is checked against its pinned key.
- In a minute the device shows online, with every address: the VPN IP, its own IP, and the public IP it connects from.
Where the command is (5.10.0). A line under the buttons follows the last command:
- «The command is waiting: the device has not downloaded it yet. It works until 14:32.»
- «Delivered at 13:40 to 203.0.113.7. Not joined yet.» Not your device? Press Get the command: it cancels that command.
- «Joined at 13:45. The file went to 203.0.113.7 at 13:40.»
- «The last command ended at 14:32. Nothing joined with it.»
The Events tab shows each delivery too. A command someone else downloaded first does not work on your machine.
What that one command does: it downloads CodeHero's join script from your CodeHero ONCE (over HTTPS, the certificate checked), saves it in your home folder (codehero-join.sh; on Windows codehero-join.ps1), then runs it. The script:
| System | Run it in | It does |
|---|---|---|
| Windows 10 / 11 (tested 2026-10-25, Windows 11 Pro) | PowerShell as Administrator | installs WireGuard (winget); turns on the OpenSSH Server feature if it is off (the first time Windows downloads it: a few minutes to more than half an hour — 35 minutes on our test PC); adds CodeHero's key; joins the VPN; makes only the VPN network «chvpn» Private (SSH answers there); adds a task that keeps the VPN after every restart, before anyone logs in |
| Linux (tested; apt or dnf) | a terminal, with sudo | installs WireGuard and the OpenSSH server if missing, turns SSH on if it is off; adds CodeHero's key; joins the VPN (started at every boot) |
| macOS (tested 2026-11-19 and 2026-11-20, MacBook Pro M5) | No command. The device's page → Download the config → the WireGuard app from the Mac App Store (its icon is in the menu bar → Manage Tunnels → Import tunnel from file) → Activate | Then Remote Login on (System Settings → General → Sharing) and, on the device's page, Credentials: the Mac's user name and password → Save → Test connection |
The config instead of the command (Windows, Linux; 5.18.0). Config file / QR on the device's page gives its WireGuard config: the WireGuard app (wireguard.com/install; for Linux that page shows how) → Import tunnel(s) from file → Activate. It gives ONLY the VPN. CodeHero still needs SSH on the machine: on Windows «OpenSSH Server» installed and running, startup Automatic (steps 1–3 and 6 of «A Windows PC on your own network» below) and the VPN network Private: only PowerShell as Administrator changes it, Set-NetConnectionProfile -InterfaceAlias <the tunnel's name in the WireGuard app> -NetworkCategory Private, and Windows may set it back (the command does both and keeps it Private; with the config you do them yourself, or CodeHero cannot log in); on Linux the SSH server on. Then Credentials: the user name and password → Save → Test connection. Choose ONE: a command and a config on one machine — the last one wins and the other stops.
It changes no SSH setting and no firewall rule on any system. A Direct device on your own network needs no script: turn its SSH on and give CodeHero its IP, user and password (below, for Windows).
If a step fails (5.10.0). The script stops with «STOP: …» and says what to do:
- A step before the join: fix it, then run the saved file again. The STOP line shows the exact command (
sudo bash ~/codehero-join.shon Linux). It works until the command's hour ends. - The join step, «CodeHero refused this file's key, or did not answer»: if the panel did not answer, check that the machine reaches it, then run the saved file again. If CodeHero refused it (used, replaced by a newer command, or its hour is over), make a new command.
- A step after the join: «CodeHero has this join already». To join again, press Get the command and run the new command.
- The same command run twice: «STOP: nothing new was downloaded (it works once)». Run the saved file, or make a new command.
After an upgrade to 5.10.0, a rollback or a restore of the installation, an earlier command no longer works: make a new one.
Other ways, same steps: Script, For an AI agent (a .md file for Claude Code or another agent ON the machine) and Steps by hand. Each button shows a command that downloads that ONE file, once, and saves it in the machine's home folder (5.10.0). Choose one: the first download uses the command up. VPN only: Config file / QR for your own WireGuard client (shown once: CodeHero does not keep its private key).
Your device's security is yours. CodeHero changes nothing in the machine's SSH settings or firewall: it adds its own key and pins the machine's host key. If you want more protection, use your router's or your cloud's firewall.
A Windows PC on your own network
Tested on 2026-10-25 with a Windows PC on the same home network as CodeHero. (vendor docs) marks a step we have not tested yet.
Which connection
| Where CodeHero runs | Connection |
|---|---|
| On the same network as the PC (home, office) | Direct, with the PC's own IP (e.g. 192.168.1.50). Nothing to open on the router. |
| Elsewhere (a cloud server) | CodeHero VPN. |
| In a virtual machine with NAT (Hyper-V «Default Switch», VirtualBox «NAT») | Direct, added by hand (below). CodeHero reaches the PC, but the PC cannot reach CodeHero, so the join command cannot work. |
On the PC (once, as an administrator)
- Turn on Windows' own SSH server. Either Settings → System → Optional features → View features → «OpenSSH Server» → Install; or PowerShell as Administrator:
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0; Set-Service sshd -StartupType Automatic; Start-Service sshd - Wait. It downloads from Windows Update: from a few minutes to more than half an hour (about 35 minutes on our test PC). PowerShell shows «Operation running» and a bar
[oooooooooooo ]the whole time. That is normal. - It asks nothing: no password, no firewall question. That is normal too: Windows adds its own firewall rule for port 22.
- The network must be Private: Settings → Network & internet → Ethernet (or Wi-Fi) → Network profile type → Private. On Public, Windows blocks connections from other machines, SSH too. On our test PC it was Public, and SSH answered the moment it became Private.
- Windows does not answer ping. A failed ping does NOT mean the PC is off or unreachable.
- Check it (it only reads; PowerShell as Administrator):
Good: sshdGet-Service sshd | ft Status,StartType; Get-NetConnectionProfile | ft InterfaceAlias,NetworkCategory; Get-NetFirewallRule -Name OpenSSH-Server-In-TCP | ft Enabled,Profile,Action; Get-NetTCPConnection -LocalPort 22 -State Listen | ft LocalAddress,LocalPort; Get-NetIPAddress -AddressFamily IPv4 | ft InterfaceAlias,IPAddressRunningandAutomatic· the networkPrivate· the ruleTrueandAllow· a line for port 22 · the PC's IP. Or from the menus, without PowerShell:- Running: Win+R →
services.msc→ «OpenSSH SSH Server»: Status Running, Startup type Automatic. - The network: Settings → Network & internet → Ethernet (or Wi-Fi) → Network profile type: Private.
- Installed: Settings → System → Optional features → «OpenSSH Server» is in the list. (vendor docs)
- The firewall rule (only look): Win+R →
wf.msc→ Inbound Rules → «OpenSSH SSH Server (sshd)»: Enabled Yes, and its Profile. (vendor docs)
- Running: Win+R →
- Your user name for SSH: the name of your folder in
C:\Users(File Explorer → This PC → Local Disk (C:) → Users). Capitals do not matter. (In PowerShell,whoamishowspc-name\user: the part after the\.) - Keep the PC awake while CodeHero works on it: Settings → System → Power → sleep, when plugged in → Never. A PC that sleeps or is off answers nothing. (vendor docs)
In CodeHero
- Devices → + Device → system Windows, connection Direct, address = the PC's IP, SSH port 22, SSH user = your Windows user name, the purposes.
- Open it → Credentials → Login Password → your Windows account's password → Save. A Microsoft account: its password, not the PIN. (vendor docs)
- Test connection. The first time, it shows the PC's fingerprint → It matches the device — Pin. On your own network you can pin it without a check. A check, for more safety (optional): in PowerShell on the PC,
ssh-keygen -lf C:\ProgramData\ssh\ssh_host_ed25519_key.pubshows the same fingerprint. - Test connection again → the device is online.
CodeHero changes nothing in the PC's firewall or SSH settings. Its commands on Windows run in PowerShell; Connect opens Windows' own command prompt (cmd) — type powershell there for PowerShell.
If it does not connect
| You see | Why | Do |
|---|---|---|
| The bar stays at the same point for 30+ minutes | Windows Update is busy or waits for a restart | Close PowerShell; restart Windows if it asks; install it from Settings. |
| No answer on port 22 (CodeHero waits, then gives up) | The SSH server is still installing or not running, or the network is Public | Run the check in step 6. Public → make it Private (step 4): SSH answers at once. |
| It answered before, and now nothing answers | The PC sleeps, is off, or has a new IP | Wake it and keep it awake (step 8). The check in step 6 shows its IP; a new one → change the address on the device's Manage. |
| «Connection refused» | Nothing listens on port 22 | Services → «OpenSSH SSH Server» → Start, startup type Automatic. |
| «Permission denied» | Wrong user name or password | Step 7 for the name; the account's password, not the PIN. |
| «CodeHero's key for this device is missing or damaged» (5.10.0) | CodeHero's own key for the device is gone or broken | Join the device again (Get the command, then run it), or Credentials → Generate key and put the new public key on the PC (the page says where). Nothing connects until then. |
A Windows PC in the CodeHero VPN
Tested on 2026-10-25: Windows 11 Pro at home, CodeHero on a cloud server. Use it when CodeHero runs elsewhere (a cloud server) and the PC is behind a home router.
- On the PC: «OpenSSH Server» installed and running (steps 1–3 of the section above).
- In CodeHero: + Device → system Windows, connection CodeHero VPN, SSH user = your Windows user name, SSH port 22.
- Open it → Connection → Get the command for Windows. Under the command the page says what it changes on the PC (below).
- On the PC: open PowerShell as Administrator, paste the command, press Enter. It shows each step as it goes.
What it does on the PC:
- It installs WireGuard (from winget, about one minute).
- It makes the PC's own VPN key. The key never leaves the PC.
- It joins with the one-time key in the saved file
codehero-join.ps1(it works once, until the command's hour ends). - It starts the VPN as a Windows service: it comes back at every restart, before anyone logs in.
- It makes the VPN network «chvpn» Private — only it. Windows lets SSH in only on Private networks. Your firewall and your other networks stay as they are. A task checks it every minute, because Windows may turn it back.
- It adds CodeHero's own SSH key, so CodeHero logs in with its key.
It ends with «Joined: <name> is 10.77.0.x in the CodeHero VPN». In a minute the device shows online.
After a restart (tested): SSH answered on the home network about 20 seconds after Windows started, and over the VPN 2 seconds later — before anyone logged in. The VPN network stayed Private.
| It stops with | Do |
|---|---|
| «WireGuard did not install» | Install WireGuard from wireguard.com, then run the saved file again: the STOP line shows the command. |
| «CodeHero refused this file's key, or did not answer» | The panel did not answer: check that the PC reaches it, then run the saved file again. CodeHero refused it (used, replaced by a newer command, or older than an hour): Get the command again. |
| «CodeHero has this join already» | A step after the join failed. Fix what the line above it says, then Get the command and run the new command. |
| «the tunnel does not answer» | The PC's network blocks UDP to CodeHero's VPN port (51820): allow it, or use Direct. |
Use it
- Connect opens a terminal on the device from the panel.
- Credentials: a password or a private key (write-only: saved, never shown again). An LLM device can also keep its API key.
- Projects: the projects whose tickets may use the device; the device's key files go to their secrets folder. A container project's container reaches a VPN device through the VPN. With many projects: search by name or code; the ticked ones come first; the list scrolls (the ticks of the rows a search hides stay). When the assistant creates a phone-app project, it names the device in the preview and ticks it for you after your yes (5.6.1).
- Events: who did what on the device (never the content).
- Manage: Revoke (access stops at once; the record stays; Enable needs a new key), Remove (everything of it goes), the IP / hostname, the SSH port and user — change them here when you change them on the machine — and, for a VPN device, What it reaches (above). Revoke and Remove also stop the Local LLM tunnel through that device at once.
- Pin (the first Test connection) pins only the host key whose fingerprint you confirmed (5.7.0).
- Export / Import: move devices (all or the ticked ones) to another CodeHero, encrypted with a passphrase; a preview shows what will happen first. It moves the devices, their saved logins, their project links, each device's What it reaches and the VPN identity — not the Local LLM settings (custom1 / custom2) or anything on the PCs. A file whose keys, VPN addresses, device fields or settings are not in their exact shape is refused in Show what it will do, with the reason; nothing is imported.
What the assistant and a ticket may do on a device (5.7.0):
- The panel assistant and the companion do by themselves only what looks or works the emulator and the LLM server the way the page's buttons do: Test, the emulator's check, list, live view, screen, show, place, start, stop, tap, type and key, and the LLM server's status, temperature, start and stop. A command, a file copy, an install, a download or a connect they cannot run. For those, use the device page's buttons, or let the assistant open a ticket with the device's skill (after your yes to its preview).
- A ticket runs its project's work on its device. An install, a destructive command or an LLM connect is said first and waits for you: the ticket asks you, and the call then waits on the ticket's Approve / Reject panel. Your Approve counts for that exact call only. A command written in another form (encoded, split, renamed) asks too.
Ask the assistant: «the emulator does not show», «start the LLM server on AMD-395». For «set up the LLM on AMD-395» or «install the Android tools on Build-PC» it opens a ticket for you.
Phone apps on your Windows PC (5.6.0)
Tested on 2026-10-25 with Windows 11 Pro. A ticket builds an Android app (Kotlin, Capacitor or React Native) on your PC and checks it on an emulator there; the code stays in the project on CodeHero.
- Add the PC as a device (above) with the purpose Android dev, and allow it for the project (the device's Projects).
- Turn on Windows Hypervisor Platform: Settings → System → Optional features → More Windows features → tick «Windows Hypervisor Platform» → OK → restart. Without it the emulator is too slow.
- The first ticket looks at the PC first (it only reads). Every install on your PC is said first — what, where (C:\CodeHero\…), the size and the time — and done only after your yes: the ticket stops and asks you, and then the install waits on the ticket's Approve / Reject panel for your Approve (5.7.0). If the PC already has Java, Node.js, Android Studio or other emulators, it also says what to do before it continues: make a restore point, close Android Studio, keep 20 GB free.
- Then it installs its own tools in C:\CodeHero (10–30 minutes the first time, about 3 GB): Java 21, Node.js, the Android SDK, the emulator and an Android 16 image.
What CodeHero changes on the PC: only C:\CodeHero. It removes, upgrades or changes nothing of yours — not your programs, not your PATH, JAVA_HOME or ANDROID_HOME, not your Android Studio or your own emulators, no firewall and no SSH setting. Google's Android tools keep a small program of their own in %USERPROFILE%\.android\bin.
- One emulator per project, named after the project (
codehero-<code>). Several projects can run their emulators at the same time, each on its own port (5554, 5556 … 5584). Each one needs about 4 GB of memory. - The emulators run without a window, even before anyone logs in to Windows. An emulator that runs when Windows restarts starts again by itself, before anyone logs in (the task «CodeHero emulators»; Stop takes it out).
- Everything is in C:\CodeHero, and its
README.txtsays what each folder is:setup(the scripts CodeHero runs),tools(Java, Node.js, scrcpy),android-sdk,avd(the emulators),builds,screens,logs. - The ticket's screenshots go into the project, in
.codehero/screens/. The ticket also reads the text on the screen, so even a model that cannot see pictures can check it. - Slow builds? Windows Security (Defender) checks every file a build writes; on our test PC it was the busiest program during the install. If you want faster builds, you can add
C:\CodeHeroto its exclusions (Windows Security → Virus & threat protection → Manage settings → Exclusions). It is your choice; CodeHero does not change it.
See the app live and use it (5.6.1)
Open the ticket's Live Preview → 📱 Emulator: the project's emulator, live, in any browser — a phone or a Galaxy Fold too. Tap, swipe and type on it as on a phone; the buttons under it are Back, Home, Recent apps and Rotate, and the box «Type into the app» sends text (on a computer you can also type straight on the picture). Tested on 2026-10-25: three projects, three emulators, three Live Previews open at once, each with its own app.
- It goes through the device's SSH login: nothing opens on the PC or its network, the same with the VPN or on your own network. CodeHero uses scrcpy (open source, Apache 2.0): the first live view installs it into
C:\CodeHero\tools\scrcpyby itself (about 11 MB, checked against the published file). - The picture starts in a few seconds. One stream per emulator, shared by everyone who watches it; it stops 20 seconds after the last one closes the view. If the stream breaks (the PC restarts, the network drops) it tries again by itself.
- ▶ Start / ■ Stop: start the project's emulator from here (about a minute; it makes it if a ticket did not yet), or stop it (the app and its data stay).
- ⧉ On the PC and 🗗 Own window appear when someone is logged in at the PC: «On the PC» opens a window with the emulator on the PC's screen, next to the Live Preview; «Own window» restarts the emulator in its own window there (once; the app's data stay). You can use the app from the browser and on the PC at the same time. Each project's window has its own place on the screen, from the left. Closing the «On the PC» window does not stop the emulator; closing the emulator's own window stops it (Start brings it back), and so does signing out of Windows.
- You do not see a window on the PC? Ask the ticket or the assistant «I do not see the emulator's window»: they bring it back onto the screen and to the front. On a screen with high scaling (on our test PC a 4K TV at 300 %) the Android emulator opens its window off the screen by itself; CodeHero moves it into view.
- 🖼 Screenshots: the screenshots the tickets took, newest first; tap one to see it large.
- A hybrid app (an app plus a web admin panel): the ticket adds the admin panel as a view next to Emulator, so you switch between the phone and the panel in the same place.
- The live picture needs a current browser: Chrome, Edge, Safari 16.4 or newer, or Firefox 130 or newer. The Screenshots view works in every browser.
- It does not show? The status line says why. The PC asleep or off: wake it. Otherwise ask the ticket or the assistant «the emulator does not show in the Live Preview»: they check the device (
list,live) and fix it, and tell you what they found.
When the PC restarts, sleeps or the network drops (5.6.1)
CodeHero does not get stuck; it goes on when the PC is back:
- The Live Preview tries again by itself and shows the picture again.
- After a restart of Windows the emulators that were running and the local LLM start again by themselves, before anyone logs in. On our test PC: the emulators were back about 100 seconds after the restart, the Live Preview 6 seconds later.
- A ticket that works on the PC waits for it, up to 5 minutes at each step, and continues. If a build was cut in the middle, it checks what was finished and does the rest again. If the PC stays away, the ticket asks you to check it; your reply continues the work.
- A ticket that uses the local LLM waits too: it tries again for about 8 minutes, then every 5 minutes, and continues where it stopped. While it waits longer, its conversation says «The model's provider is busy or cannot be reached right now»; nothing to do.
Your own phone instead of the emulator
Ask the ticket for it. It sends you these steps: on the phone, Settings → About phone → tap «Build number» 7 times; then Developer options → «USB debugging» on; connect the phone to the PC with a USB cable and tap «Allow» on the phone. (Android 11 or newer can use «Wireless debugging» instead of the cable.) The ticket installs and checks only the project's app; it never touches your other apps, their data or the phone's settings. The Live Preview shows the emulators; the phone is in your hand.
Local LLMs (custom providers)
Settings → Providers → Local LLMs: up to two OpenAI-compatible servers (custom1, custom2) — the address, the API key, the models, Test (it checks chat, tools, streaming and the certificate's pin). The settings are written in api_keys.conf and survive updates. You set them here, or the assistant sets them for you (5.17): it reads the slot and the server on the device, proposes the whole set in one message (what changes, old → new), starts the server with it, and saves the slot after your yes on ONE card. The values: what you say first, else what you typed here, else the catalog's values for the model. A ticket with the skill local-llm connects a server it set up, after your Approve. A Test uses a tunnel of its own and never interrupts running tickets. Changing the address, or the tunnel's device or port, needs the API key typed again.
Your own LLM server on a Windows PC (5.6.0) — tested on the GMKtec EVO-X2 (AMD Ryzen AI Max+ 395) with Windows 11. One general way for every graphics card (AMD, NVIDIA, Intel): a GGUF model and llama.cpp's own server, with an API key. Ask the assistant «set up Qwen3.6-35B-A3B on AMD-395»: it opens a ticket with the skill local-llm, which follows config/guides/local-llm.md. Every install on your PC is said first — what, where (C:\CodeHero\…), the size and the time — and done only after your yes, approved on the ticket's Approve / Reject panel: llama.cpp, and each model.
- It looks at the PC (the graphics card and its memory, the ports in use) and installs llama.cpp in
C:\CodeHero\llm(Vulkan works on every card; CUDA for NVIDIA). - It downloads the model into
C:\CodeHero\modelsin the background (a 37 GB model takes hours on a slow line) and checks its SHA-256. - It starts the server — again at every restart, before anyone logs in — with an API key in
C:\CodeHero\llm\api-key.txt(only the PC's administrators can read it). - It connects it to
custom1orcustom2(it asks which); the key goes into CodeHero's settings without being shown.
On our test PC (GMKtec EVO-X2, Radeon 8060S, Vulkan) Qwen3.6-35B-A3B Q8_0 (34.4 GiB) reads a prompt at about 1,500 tokens/s and writes at 55 tokens/s; with a 262,144-token context shared by 4 people its server is ready in 15 s.
The temperature is your care. Keep the machine cool: free air around it, the fans not blocked. To see the temperature, ask the assistant «how hot is my PC?».
The ticket's think mode decides the thinking (5.7.0). off = no thinking. The other modes think up to the mode's token budget; then llama.cpp ends the thinking and the model answers. The budget always leaves a quarter of the output for the answer. Every model of the catalog uses the slot's budgets (5.17: balanced 8,000 tokens …), the same rule as every provider; your own budgets for a model (on the page, or in a ticket's words) win.
Files and drafters (5.17). CodeHero takes unsloth's dynamic files (UD-…) first, else the official ones. The main local model is Qwen3.6-35B-A3B at 8 bits. On a Mac it uses a DFlash drafter when the model has one (Qwen3.6-35B-A3B, Qwen3.8-27B, Qwen3.8-Flash-Next), else MTP; Windows keeps MTP. Measured on a MacBook Pro M5 Max 128 GB, tokens/s with no drafter → MTP → DFlash2: Qwen3.6-35B-A3B 8-bit 97.5 → 159.9 → 194.6; Qwen3.8-27B 8-bit 18.6 → 46.3 → 80.0. Ornith-1.5-35B's own DFlash has no ready GGUF file: its conversion is a short how-to for a Linux server (GUIDE local-llm.md §18). Which model, which file, which drafter: ask the assistant — it answers from what we measured (GUIDE local-llm.md §19); on a smaller machine everything is slower.
Our study of local models — the models of the catalog, speed with and without MTP, long prompts, thinking budgets and heat, measured on one machine — is on its own page: Local AI models: our study and tests.
How CodeHero and your team reach it — you choose:
| Who | How |
|---|---|
| CodeHero, on your own machine | Through the device's SSH (Local LLMs → «Through a device's SSH»): nothing to open on the PC; CodeHero keeps the tunnel up |
| CodeHero or your team, on the same network | http://<the PC's IP>:8080/v1 + the API key |
| CodeHero or your team, in the CodeHero VPN | http://<its VPN IP, 10.77.0.x>:8080/v1 + the API key |
Your team gets only the address and the key — never the PC's SSH login. Several people use it at the same time (its «slots»). Show the LLM server's API key on the device's page (Credentials) reads the key on the PC for you to give them, with the address. A team member's laptop in the VPN (not tested yet): + Device → connection CodeHero VPN (any SSH user: CodeHero does not log in to it) → Connection → Config file / QR → import it in the WireGuard app on the laptop; set that laptop's What it reaches to The whole VPN (5.7.0); it then reaches http://10.77.0.x:8080/v1.
On Windows the network ways need the port allowed in Windows' firewall, for Private networks only — your decision; in PowerShell as Administrator:
New-NetFirewallRule -DisplayName "CodeHero LLM 8080" -Direction Inbound -Protocol TCP -LocalPort 8080 -Profile Private -Action Allow
CodeHero never changes the PC's firewall itself.
A Mac that works as a server (never sleeps, comes back after a restart)
A Mac can work for CodeHero day and night: a local LLM, app builds, emulators. These steps keep it awake and bring it back by itself after a restart, with nobody at the Mac. Tested on 2026-11-19 with a MacBook Pro (Apple M5 Max, macOS 26.6), on its charger, the lid open. First add the Mac as a device (Devices → + Device, system macOS; «Add a device» above). Every step below is in the Mac's own System Settings.
- SSH on. System Settings → General → Sharing → Remote Login ON. The device join turns it on; check that it is still on.
- Never sleep (a MacBook).
- System Settings → Battery → Options → Prevent automatic sleeping on power adapter when the display is off ON.
- In the same window: Wake for network access → Always.
- System Settings → Lock Screen → turn the display off, on battery and on power adapter → Never.
- Keep it on its charger, with the lid OPEN. A MacBook sleeps when its lid closes: on battery always; on power it stays awake only with an external display.
- A Mac mini, Mac Studio or iMac (not tested by us: our test Mac is a MacBook): System Settings → Energy → Prevent automatic sleeping when the display is off ON, and Start up automatically after a power failure ON.
- No automatic macOS installs. System Settings → General → Software Update → the (i) next to Automatic updates → Install macOS updates OFF. You install macOS updates yourself, when you choose. Our test Mac also had the downloads and the security responses off. You may keep the security responses on: then an update can restart the Mac, and these steps bring it back by itself.
- FileVault off and automatic login: your choice. With FileVault on, a restart stops at the unlock screen. Nobody is logged in, so nothing works (no VPN, no SSH, no emulators) until a person types the password AT the Mac. For a Mac that must come back alone:
- System Settings → Privacy & Security → FileVault → Turn Off… (it asks for the Mac password).
- System Settings → Users & Groups → Automatically log in as → your user. macOS allows it only while FileVault is off.
- The VPN comes back by itself. A Mac in the CodeHero VPN through the WireGuard app (App Store): the tunnel → Edit → On-Demand: tick Wi-Fi and Ethernet → Save. On the same network as CodeHero (a Direct device) no VPN is needed.
- Optional: the most speed for local LLMs. System Settings → Battery → Energy Mode → on power adapter: High Power (a Mac mini or Mac Studio: System Settings → Energy → Energy Mode). The fans run harder. You take care of the Mac's temperature and its airflow: a free place, nothing on the vents. Want help with it? Ask a ticket or the assistant.
- IF macOS asks about sshd-keygen-wrapper, THEN Don't Allow. Over SSH, macOS may ask to give sshd-keygen-wrapper Accessibility, Automation, Full Disk Access or Screen Recording. Click Don't Allow: CodeHero needs none of them. A grant to it is a grant to every SSH session.
The proof: the restart test. Do it once, after the steps. Apple menu → Restart, then do not touch the Mac. What you should see (times from our test Mac):
| After the start | What you see |
|---|---|
| About 35 s | The Mac has logged in by itself. The VPN is connected. SSH works: the device's Test connection answers. |
| About 46 s | An Android emulator that was running before the restart runs again (CodeHero starts the kept emulators at login). |
| — | The local LLM server does NOT start by itself. Start it from a ticket or the panel (ask the assistant «start the LLM server on my Mac»). |
IF the Mac waits for a password after the restart, THEN check step 4.
A locked screen does not stop the work. Lock it with ⌃⌘Q. On our test Mac the iOS simulator and the Android emulator started, showed their screens and streamed while the Mac was locked.
Sign your app on your Mac (5.17)
A ticket builds your app on your Mac (a device with the system macOS). To give a Mac app to other people outside the App Store, it is signed with YOUR Apple Developer account (a Developer ID Application certificate) and checked by Apple (notarization). For the App Store the certificate is Apple Distribution. Ask the ticket for a signed app. Your steps are web pages and your Mac's own windows; the ticket does the rest. Xcode must be installed and opened once (Agree). Tested on 2026-11-19 with CodeHero's own Mac app.
- Your role. Open developer.apple.com/account → Membership details. Only the Account Holder can make a Developer ID certificate. Xcode shows only one role (for example «Admin»); this page shows all of them («Account Holder, Admin»). IF Xcode (Settings → Accounts → your team → Manage Certificates → +) answers «… can only be performed by the Account Holder», THEN use the web way, steps 2 and 3: it is the way that worked.
- The request, on your Mac. Open Keychain Access: on macOS 26 it is not in Applications → Utilities any more; press ⌘ Space and type «Keychain Access» (or Finder → Go → Go to Folder… →
/System/Library/CoreServices/Applications/). Menu Keychain Access → Certificate Assistant → Request a Certificate From a Certificate Authority… → your email in User Email, a name in Common Name, CA Email empty, Saved to disk. - The certificate. developer.apple.com/account → Certificates, IDs & Profiles → Certificates → + → Developer ID → Developer ID Application → G2 Sub-CA → choose the request file of step 2 → Download → double-click the
.cerfile. In the window Add Certificates choose Keychain login (the request's private key is there) → Add. (For the App Store: Apple Distribution instead.) - The key Apple uses to notarize. appstoreconnect.apple.com → Users and Access → Integrations → App Store Connect API → Team Keys → + → a name, Access Developer → Generate → Download API Key. Apple lets you download it only ONCE: the file
AuthKey_<KEYID>.p8. Put it in the folder~/CodeHero/signingon your Mac (Finder → Go → Go to Folder… →~/CodeHero/signing). Tell the ticket the Key ID and the Issuer ID: they are not secret. Never send the.p8file: the ticket uses it by its path and never reads or shows it. - Once, only IF the ticket asks: one line in Terminal. Over SSH macOS may not let the signing key be used (
errSecInternalComponent). Then the ticket gives you ONE short line. Open Terminal (⌘ Space, «Terminal»), paste the line, press Return. macOS asks «codesign wants to sign using key … in your keychain»: type your Mac password IN THAT window and click Always Allow (it can come once for each signed part: the same answer). Tell the ticket when it ends. After «Always Allow» the next builds sign without asking.
What the ticket does by itself: it checks your certificate; it adds Apple's intermediate certificate when it is missing (Xcode adds it, the web way does not — no step of yours); it signs, sends the app to Apple (a few minutes) and checks the result. A copy downloaded later asks only «… is an app downloaded from the Internet. Are you sure you want to open it?» → Open. No «Not Opened», no Privacy & Security → Open Anyway.
Your Mac password goes only into macOS's own windows: never to a ticket, a chat or a script.
34. Ports and Your Firewall
CodeHero installs no firewall. Your server may run other things of yours, so you choose the firewall: your cloud's (Hetzner Cloud Firewall, an AWS Security Group …) or your router's are the simple choice, because they cannot break anything on the server. The VPN (Section 33) adds no rule for the server's own ports: its rules decide only what each device reaches through the VPN («What it reaches»). The web application firewall in Packages (WAF Security Setup) is installed only if you install it.
What to leave open and what to close from outside:
| Port | What | From outside |
|---|---|---|
| 22/tcp | SSH | Only for you (your IPs), or reach it over a VPN |
| 9453/tcp | CodeHero panel (HTTPS) | Only for you and your team |
| 9454/tcp | phpMyAdmin (HTTPS, behind the panel's login) | Only for you |
| 9867/tcp | Project previews (HTTPS) | For whoever must see the previews (you, your customers) |
| 80/tcp, 443/tcp | Production domains and their certificates (Let's Encrypt) | Open to everyone — only if you publish sites |
| 51820/udp | The CodeHero VPN | Open — only if the VPN is on |
| A port you forward to a container (a project's Container tab) | That container's service | As that service needs |
| 9453/udp, 9867/udp | HTTP/3 of the panel and of the previews (5.16.6) | Same as the TCP port of the same number |
| 443/udp | HTTP/3 of the live sites (5.16.6) | Open to everyone — only if you publish sites |
| Every other port | MySQL 3306, the containers, the databases of the Services tab … | Closed |
- HTTP/3 needs UDP (5.16.6): UDP
9453(panel), UDP9867(previews), UDP443(live sites). IF UDP is closed, THEN browsers use HTTP/2. Nothing breaks. - MySQL and the panel's application already listen only on the server itself (127.0.0.1): closing them is a second layer.
- Ask the assistant «which ports must be closed on my server?» — it answers from this table.
The panel, phpMyAdmin and the previews behind the VPN (5.7.0)
With your laptop in the CodeHero VPN you can close 9453, 9454 and 9867 to the internet and reach them through the VPN:
- Read «Do not lock yourself out» in Securing CodeHero.
- Devices → the VPN card → Use the VPN to close your ports (Section 33). It shows your server's steps and the hosts line.
- Join two computers (your laptop and a spare one). Add the hosts line on each. Open the panel through the VPN and sign in, from another network too.
- Only then close the ports on your cloud's firewall. Close
9867only if nobody outside the VPN must see the previews: your customers would need the VPN too. - Keep open
51820/udp, and80/443if you publish sites or use Let's Encrypt. - Keep a way in that does not need the VPN (your IP allowed for SSH, or the cloud's console). SSH is your own decision; CodeHero never changes it or a firewall.
Security levels
The ports for each level — Dev, Production, Fortress — with what you do and what CodeHero already does at each: Securing CodeHero.
35. AI Planning Guide (plan with an external AI)
CodeHero ships the CodeHero Spec Builder — a portable knowledge file you add to a Claude Project or a ChatGPT project. The assistant then interviews you about your business in plain language (short batches of related questions, no technical jargon), proposes the technical direction, reviews the complete draft in groups sized to the work (two for a small tool, about five for a medium app, up to ten for a large system) plus a final consistency check, and produces a specification package: architecture, requirements and acceptance criteria. Candidate ticket cards are optional; the planning ticket on your installation makes the final design, the provider assignments and the work plan.
- Click Copy planning guide below (or download the file).
- Add it as knowledge to a Claude/ChatGPT project with the instruction: “You are the CodeHero Spec Builder. Follow the file exactly.”
- Answer its questions; it delivers the specification package as one Markdown file.
- Paste that package into the in‑app AI Assistant (Plan with AI) — it shows a preview, creates the container if the spec declares one, and after you confirm creates the project and one planning ticket that carries the package; the planning ticket assigns providers from your active list and creates the first phase of tickets.
The guide is self‑contained — no code or file uploads are needed; CodeHero's agents build everything from the ticket descriptions.
Spec Builder 2.0 (5.7.0):
- One PACKAGE shape for the Spec Builder and the in-app planner, written in the same simple, structured English as the tickets' core.
- The PACKAGE has a readiness that decides what may start:
DRAFT(a business choice or a needed check is open — no feature work starts),PROBE(only the checks you agreed may run first) orREADY(the work may start). - The PACKAGE names no ticket role, think mode, provider or model: the
[PLAN]ticket decides them. - Its line «made with Spec Builder <version>» is a record only. The
[PLAN]ticket never asks for the Spec Builder's file.
36. Tips & Best Practices
Writing Good Tickets
Do:
- Be specific about what you want
- Include file paths when relevant
- Mention the programming language/framework
- Break large tasks into sub-tickets
Don't:
- Give vague instructions like "make it better"
- Put multiple unrelated tasks in one ticket
- Assume AI knows context from other tickets
Good example:
Title: Add user authentication API
Description:
Create REST API endpoints in /api/auth/:
- POST /api/auth/login - Accept email/password, return JWT
- POST /api/auth/register - Create new user
- GET /api/auth/me - Return current user (requires auth)
Use the existing User model in models/user.py.
Use bcrypt for password hashing.
Bad example:
Title: Auth
Description: Add login
Parallel Execution
- Plans are serial by default; say "parallel" when you want it — the planning ticket then proves that parallel tickets never write the same file
- Parallel tickets share a
sequence_order; spread them over different providers to avoid rate limits - Lead mode runs parts as
[WORKER]tickets of a lead — the planner or a build ticket the plan names — at most 5 at a time, each a different job, each writing only its own files and its own log - At most
MAX_PARALLEL_TICKETS_PER_PROJECTtickets run at once per project (default 5)
Cost Optimization
- Let the planning ticket size the work: junior for trivial, simple and moderate tickets, senior for hard ones, for the plan, its peer, the verifiers and helpers — master only when you choose it (Section 14)
- Keep tickets small and focused: most tokens are the context read again at every step — a long ticket costs far more than a higher think mode
- A subscription (Claude Pro/Max, ChatGPT via Codex CLI, SuperGrok via Grok Build, GLM Coding, QwenCloud Token Plan) counts at one tenth of its API cost weight
- OpenRouter's Qwen defaults and QwenCloud's Qwen 3.8 Flash are low-cost options that also see images
37. Troubleshooting
Ticket Stuck in "in_progress"
A run counts as stuck after 60 minutes without a line from the agent (STUCK_TIMEOUT_MINUTES in /etc/codehero/system.conf changes it). A long tool is not silence: while a tool runs — a test suite in one ProcessManager wait, a long command — every provider family sends a heartbeat every 2 minutes (Codex, the Claude CLI in both modes, the API providers), for up to 2 hours. A model that stays silent with nothing running is still caught.
- Check Console for errors
- Use Kill Switch (Stop button or
/stop) - Retry the ticket
AI Not Processing Tickets
- Check daemon:
systemctl status codehero-daemon - Review logs:
journalctl -u codehero-daemon -f - Verify MySQL:
systemctl status mysql - Restart:
sudo systemctl restart codehero-web codehero-daemon
Permission Errors
- Ensure
claudeuser has read/write access - Check ownership:
ls -la /path/to/project - Fix:
chown -R claude:claude /path/to/project
«PRODUCTION project: read only» or «Refused: project … is LOCKED» (5.7.1)
- «PRODUCTION project: read only» — the project is in
🔒 Productionmode. An AI only reads there. Make the change in the maintenance copy, or set another mode (Project modes and the project lock). - «MAINTENANCE project: … requires approval» — the ticket waits for your
✓ Approveor✗ Rejecton its page. - «Refused: project … is LOCKED» — unlock the project with its padlock, do the action, and lock it again.
«Blocked: … belongs to another project» or «Blocked: the secrets of project … stay hidden» (5.7.1)
- «Blocked: … belongs to another project» or «Blocked: cross-project access to the container …» — the ticket tried to reach another project that does not allow its project. IF it must work there, THEN open the other project's page, tick the ticket's project in
Project links — Allow access fromand clickSave(Project links). The ticket gets it at its next run. - «Blocked: the secrets of project … stay hidden» — a linked project never shows its secrets to another project's tickets. IF the work needs one of its secrets, THEN do that step with a ticket of the linked project itself.
- «Linked project … is in production mode» — the linked project only lets other projects' tickets read. Make the change in its maintenance copy.
- «Linked project … is in maintenance mode» — the change waits for your
✓ Approveor✗ Rejecton the ticket's page.
«Held: the maintenance copy is …» (5.8.0)
- The container is a maintenance copy that is not started yet. It does not start from the Container tab, the Services tab or a server restart.
- «Start maintenance did not finish» — press Start maintenance again on the copy's Backup & Restore → Maintenance copy.
- Open the copy → Backup & Restore → Maintenance copy. Fix and confirm the items, then click Start maintenance.
- «the maintenance copy was not prepared» — its import stopped or failed. Delete the copy (its page → ⚠️ Danger Zone → 🗑️ Delete Project) and create it again from the live project.
«Not started — «Keep AI work on the maintenance copy» is on …» (5.8.0)
- The switch is on, and this project is not a started maintenance copy (Protections).
- Work on the project's maintenance copy instead: this project's Backup & Restore → Maintenance copy → the copy's link.
- The copy is not started yet: open it → Backup & Restore → Maintenance copy → Start maintenance.
- This project must keep its AI tickets: its page → 🛡 Security — Protections → Off for this project → Save. Then send the held ticket a message on its page.
- «It cannot be read now whether …» — the protections store does not answer. Check Settings → Security → 🛡 Protections («The protections store» below).
A container cannot reach an address on your network (5.8.0)
- The switch Containers: block private networks is on (Section 31, «Private networks»).
- Open the project's Container tab → Private networks. Add the address to This project's container may still reach, then click Save addresses.
The 8th container of a server has no network: «Too many open files» (5.14.0)
- The symptom: the 8th container of a new server started without a network. Its installs could not reach the internet, and its project got no address.
- The cause: every container without root counts its file watchers (inotify) against the server's root user. Ubuntu allows 128. The lxc package raises it to 1024 only at the next boot. A server not yet rebooted after the install kept 128.
- From 5.14.0 the install raises the limit to 1024 at once. Every upgrade repairs a server that kept the low value. A higher value is never lowered.
- If a container of an older server has no network, upgrade the server first (Section 29). Then press Stop and Start on that container's Container tab.
An app's address with /database/ in it answered 403 (5.15.0)
- The symptom: an app in a container answered 403 on a route that has
/database/in it. Example: Metabase's/api/database/1/…when it ran on/. - The cause: the container's web server denied every address that contains
/database/. - From 5.15.0 the deny holds only the project's own
database/folder. An app behind a proxy keeps its own/database/routes. A PHP site, a static site and the denies for dotfiles,.sqland.envare as before. - If an older project still answers 403, its web server file is the old one. CodeHero writes the new file when the project's web server files are next written: a new project, an install or removal of a service, a restore. An upgrade rewrites no project's file.
«Local network imports are disabled» (5.8.0)
- The ZIP or Git address is on your own network. Such imports are off by default (Section 3).
- For a source you trust: Settings → system.conf → add
ALLOW_LOCAL_NETWORK_IMPORTS=true→ Save & Restart (Section 28).
«URL and clone imports are unavailable while Keep AI work on the maintenance copy is on» (5.8.0)
- While that switch is on, every import by URL and every Clone is refused, a public address too (Section 3).
ALLOW_LOCAL_NETWORK_IMPORTSdoes not change it. - Upload the ZIP instead: Projects → 📦 Import → Upload File → Import Project, or the project page → Upload Files.
«Not started — the restore of this project did not finish …» (5.11.3)
- A restore or an import of this project was cut in the middle (the project page shows the red notice). Its tickets do not start until you choose.
- Open the project: Restore again takes you to the Backups list (the safety copy is in its Safety tab); I checked it — dismiss says you looked at the files and the project is fine as it is.
- You do nothing to the tickets. They start again by themselves as soon as the restore ends well or you dismiss the notice. A ticket that was already running is not stopped.
«The move into a container did not finish» (5.11.3)
- A move of a host project into a container was cut in the middle. Your files are safe: in the project folder, in the container's disk, or both.
- Open the project and press Finish the move (the red notice at the top, or the Container tab). Read the dialog, keep Migrate host database ticked if the project has a database, press Finish the move again. It takes a few minutes, needs free disk space, and the site may be down meanwhile. Do not delete the project and do not press Reset.
- The project's tickets wait and start again by themselves when the move is whole («Not started — the move of this project into a container did not finish: finish it on the project page — it starts again by itself»).
- A sentence that stops it (a disk that does not open, not enough space, a file that is not in the gathered folder) says what to do; nothing is lost and the same button works again (Section 31, «A move into a container that did not finish»).
- «This project's container disk already exists, so CodeHero will not create a new container over it …» is the same state: a second Create Container is refused and changes nothing; press Finish the move.
«Not started — the account that runs this ticket could not be confirmed» (5.8.0)
- CodeHero checks the account that runs a ticket before every run. It never runs a ticket as another account.
- The message names the reason. «Run the upgrade again» → the upgrade to 5.8.0 did not finish: run it again (Section 29).
- When the cause is fixed, send a message on the ticket's page. The ticket starts again.
«Not started — … it starts again by itself» (5.11.0)
- With «Ticket sandbox» or «Ticket network limits» on (Section 28), a ticket can wait: «the sandbox of this project is being prepared», «the network limits are being put in place», or «the ticket sandbox was turned on — it starts again inside its wall».
- Nothing is lost, and you do nothing. The ticket starts by itself when the reason is gone. A message from you starts it at once.
- The list under Ticket sandbox (Settings → Security → 🛡 Protections) shows each project's preparation. A project that shows failed names the reason.
«This ticket runs outside the sandbox: …» (5.11.0)
- The ticket's AI route cannot run inside the sandbox. This is rare: since 5.11.1 the Claude subscription, Codex, Grok Build and the API models all run inside. It works as before 5.11, without the sandbox's protection.
- This is the known limit of «Ticket sandbox» (Section 28). Nothing is wrong with the ticket. Nothing for you to fix.
- A Claude subscription ticket (the usual Claude mode for tickets), a Codex ticket and a Grok Build ticket run inside the sandbox and do not show this line.
«Not started — the AI login of claude needs you: sign in again …» (5.11.0)
- A Claude subscription ticket runs inside the sandbox with your normal login. The login itself never enters the ticket's sandbox, and it renews by itself, as before.
- When the login has really ended (you signed out, or the sign-in expired for good), the tickets of that AI wait with this line: «⚠️ Not started — the AI login of claude needs you: sign in again on Settings → Providers — it starts again by itself.» Nothing is lost.
- Sign in again: Settings → Providers, the Claude Pro/Max Subscription box. The tickets start again by themselves, within about a minute. While they wait, CodeHero also tries to renew the login from time to time: when that works, they start without you. A ticket whose provider you change meanwhile starts again by itself.
- «The AI login could not be renewed just now; it tries again by itself» is shorter: the renewal failed for a moment (the network, the provider). You do nothing.
- A Codex ticket (the ChatGPT subscription) works the same way, with your normal Codex login. When that login has really ended, its line says «codex»: «⚠️ Not started — the AI login of codex needs you: sign in again on Settings → Providers — it starts again by itself.» Sign in again: Settings → Providers, the ChatGPT Plus/Pro Subscription (Codex) box. The tickets start again by themselves, or when you change a ticket's provider.
- A Grok Build ticket (the SuperGrok subscription) works the same way, with your normal Grok login. When that login has really ended, its line says «grok»: «⚠️ Not started — the AI login of grok needs you: sign in again on Settings → Providers — it starts again by itself.» Sign in again with the
grok logincommand shown in the SuperGrok box on Settings → Providers. The tickets start again by themselves, or when you change a ticket's provider.
«Not started — Codex's hooks are being updated — it starts again by itself» (5.11.0)
- An upgrade is finishing the Codex settings. A Codex ticket waits for a moment, with this line: «⚠️ Not started — Codex's hooks are being updated — it starts again by itself.»
- It starts again by itself when the settings are ready. You do nothing. Nothing is lost.
«Not started — Grok Build's hooks are being updated — it starts again by itself» (5.11.1)
- An upgrade is finishing the Grok settings (the hooks CodeHero's sandbox gives Grok). A Grok ticket waits for a moment, with this line: «⚠️ Not started — Grok Build's hooks are being updated — it starts again by itself.»
- It starts again by itself when the settings are ready. You do nothing. Nothing is lost.
«Not started — the Grok hooks could not be confirmed — it starts again by itself» (5.11.1)
- Before the first Grok run after an upgrade or a change of the Grok program, CodeHero tests with one tiny model call that Grok loads CodeHero's hooks and that they refuse what they must. If it cannot confirm it, the ticket waits with this line. The real prompt is not given to Grok.
- It tries again by itself every 10 minutes. You do nothing. Nothing is lost.
The protections store (5.8.0)
- CodeHero keeps its protection switches in root's own folders:
/etc/codehero-securityand/var/lib/codehero-security. A new install and the upgrade to 5.8.0 set them up, every protection OFF. Only a new installation from 5.11.1 then turns «Ticket sandbox» ON, when its checks pass. - «The protections store is not root's own … the upgrade stopped» → nothing was changed. Restore the two folders from the installation's own copy (
platform-copy.sh, Section 4), then run the upgrade again. - «The upgrade is NOT complete: the protections store is not ready» →
sudo /usr/local/lib/codehero/sandbox-ctl statussays why. Fix that, then run the upgrade again. - «The upgrade is NOT complete: the switch «Containers: block private networks» is not in the protections store» (5.9.0) →
sudo /usr/local/lib/codehero/sandbox-ctl egress statussays why. Fix that, then run the upgrade again: it moves the switch when it restarts the services: it stops the panel and the daemon for that moment, every time it has something to move. The reason in brackets: «the panel cannot be stopped from inside its own service» → run the upgrade again from the server's console; «systemctl stop … failed», «… is not confirmed stopped» or «a process of … is left» → the service did not stop cleanly: wait a minute, or restart the server at a quiet moment, then run the upgrade again; «systemd did not answer for …» → systemd itself did not answer: restart the server at a quiet moment, then run the upgrade again; «… is in «…», not system.slice» → that service was moved out of its usual place: CodeHero cannot check it there; «… is not the unified cgroup2 hierarchy» → a system other than Ubuntu 24.04 (which uses only cgroup2): CodeHero cannot confirm the old services stopped, so it does not move the switch there. A file of before 5.9.0 that comes back (after going back to an older version) is removed only there, after the switch is applied again. - Last resort on the server's console (it works with the panel and the database down):
sudo /usr/local/lib/codehero/sandbox-ctl status·… off(the protections of the policy OFF: Keep AI work on the maintenance copy, Keep panel and app addresses separate, Ticket sandbox, Ticket network limits) ·… recover(repairs the store from its committed copy). The trusted panel proxy, the recovery codes, the security keys and «Containers: block private networks» have their ownoffcommands (Section 28). - «missing» or «damaged» in both places → restore the two folders from the installation's own copy (
platform-copy.sh, Section 4). CodeHero never replaces them with an empty store. - Restore the two folders with the panel stopped:
sudo systemctl stop codehero-web, restore, thensudo systemctl start codehero-web(5.9.0). Its start refuses, within its 30 seconds, a 2FA code used after the backup was taken; the next code works. Restored under a running panel, the panel keeps its newer sign-in counts.
Can't Access Dashboard
- Check services:
systemctl status codehero-web nginx - Check that your cloud's or router's firewall lets port 9453 in (34 — CodeHero installs no firewall)
- Verify IP:
hostname -I - Browser may block self-signed cert
- Set your password asks for a setup code you do not have (an upgraded server that still had
admin123): on the server's console,sudo /usr/local/lib/codehero/sandbox-ctl auth setup showshows it (Section 1); none saved →… auth setup makemakes one - The 2FA page says «This code was already used»: wait for the next code in your app (at most 30 seconds). A lock from wrong tries stays after a restart of the panel; it ends 30 minutes after it started (Section 1)
- The sign-in page says «Sign-in is unavailable: …» or «This sign-in could not be verified — trusted panel proxy: …»: do what it says (Section 1, Section 28). Since 5.9.0 the panel listens on
/run/codehero-web/panel.sock, not on a TCP port:systemctl status codehero-webshows whether it runs
A Preview Says «Access Denied»
- In a browser: open the preview from the project page (🔐 Secure URL →
Copy URL). That link carries the key. - A script or cron job on this server: from 5.7.0 it must send the project's key too (Section 32, «Every request needs the key»).
- A ticket's output shows
[hidden]where the key was (5.10.0): that is the key, hidden. The ticket's tools and$CODEHERO_PREVIEW_ACCESSstill send the real key. Never copy[hidden]into a URL or a script.
Provider API Errors
- Verify API key in Settings
- Check provider status page
- Try a different provider temporarily
- Reduce parallel tickets if rate limited
38. Keyboard Shortcuts
Code Editor
| Shortcut | Action |
|---|---|
Ctrl+S | Save file |
Ctrl+Z | Undo |
Ctrl+Shift+Z | Redo |
Ctrl+F | Find |
Ctrl+H | Find and Replace |
Ctrl+G | Go to line |
Ctrl+D | Select next occurrence |
Ctrl+/ | Toggle comment |
Alt+Up/Down | Move line up/down |
Ctrl+Shift+K | Delete line |
Ctrl+Click | Go to definition |
Web Terminal
| Shortcut | Action |
|---|---|
Ctrl+C | Interrupt command |
Ctrl+D | Exit shell |
Ctrl+L | Clear terminal |
Ctrl+Shift+C | Copy selection |
Ctrl+Shift+V | Paste |
General
| Shortcut | Action |
|---|---|
Escape | Close modal |
39. Developer Training — The Autonomous Development Framework (ADF)
CodeHero implements an Autonomous Development Framework: AI agents build, test and document a product from a specification, while humans provide only what nobody else can — the business truth, the credentials and the approvals. The developer training course teaches that framework step by step, in the order the work happens in a real delivery: interview the client, decide the stack, plan the tickets, run and read the execution, customize the global and project contexts, deliver.
🎓 Open the training course Presentation for domain experts →
| Module | Title | Outcome |
|---|---|---|
| 1 | The framework | Explain the twelve ADF principles, the pipeline and the layers of instruction |
| 2 | Extracting knowledge from the client | Run a Spec Builder interview; produce and review a specification package |
| 3 | Choosing the stack | Decide PHP vs Node vs Python vs .NET, host vs container, with a written justification |
| 4 | Planning | Turn a package into a project and a planning ticket, and read the serial plan (roles, providers, verification) that the planning ticket produces |
| 5 | Execution | Read what the agent does, why it stops, and how to answer it |
| 6 | Customizing the brain | Change the global context and project contexts safely, and prove the change works |
| 7 | Reaching a working result | Drive a project from the first ticket to a verified, documented delivery |
| 8 | Capstone | Deliver a mini-project end to end and pass the rubric |
config/core-base.md, docs/CODEHERO_PLANNING_GUIDE.md,
config/assistant-planner.md, config/contexts/*.md) are the source of truth.40. REST API (5.13.0, 5.13.1, 5.13.2)
The REST API lets a program talk to your CodeHero without a browser. It reads the state of the server and the projects, pulls encrypted backups, does a few chosen actions and restores a copy as a new project. The first program that uses it is the backup client: a small program on the computer that keeps your backups. The manual is inside your panel: Settings → 🔑 API keys → The API manual. It lists everything the API does, with examples.
- A key opens the API, a browser sign-in never does. You make a key in Settings → 🔑 API keys, with your panel password and a current 2FA code (turn 2FA on first). It is shown once and kept only as a hash. Nothing answers a program until you make a key. Turning 2FA off or resetting it (also on the console) ends every key.
- Two things must say yes. The key decides the areas (monitoring, backup, admin, restore) and the projects. Each project decides what the API may do to it, with four switches on its page: may monitor and may back up (on at the start, also on existing projects), may administer and may stop for a backup (off at the start).
- Nothing secret is answered, and a backup leaves only encrypted with your own backup key. No key set means no backup.
- A cold image stops the container for the time of the copy. It needs a key with may stop services, and on a production, maintenance or locked project the project's own may stop for a backup.
- A restore creates a new project, never writes over one. It starts stopped. A test restore (a drill) is removed after 24 hours unless you press Keep on its project page. A drill that you start stays without outside network (it reaches only this server) for as long as it exists.
- A moved project does not run on two servers. For a container project from a ZIP, the clean container and the installs of its services reach the internet. From the moment the content of the archive enters the container, nothing leaves it, until the container is stopped at the end of the restore. A container image has nothing leaving from its first boot. Starting the project is your step.
- The backup client is one Python file and a timer, for any Ubuntu. Settings → 🔑 API keys → Backup client has the button Download codehero-backup-client.py and one command with this panel's address (with its port) and certificate fingerprint in it. You run it on the machine that keeps the backups; it asks for the key at a prompt and asks the panel first whether it would accept the backups the timer will ask for. The certificate is pinned: without the fingerprint the client does not run.
- A platform restore stops at «held». It goes onto a blank server, with LXC installed or not. You activate it on the server's console; the API never does.
- Busy answers. An API backup runs beside the panel's own backups. While it reads a project, a restore of that project and a disk step that stops or replaces the container answer «busy» and are tried again after it. A cold image, an API restore or an admin stop or restart holds the whole project: a new ticket waits.
- History and Edit (5.13.1). Each key in Settings → 🔑 API keys has History: its rows (when, what, project, outcome, and the address the call came from), so you see where a leaked key was used. Every backup and admin row names its project, an edit's row says what changed, a read from an address not used in the last hour writes a row, and a revoked or expired key that is tried again shows in its own History. A live key has Edit: its label, projects, expiry, addresses, areas and ticks, with your panel password and a current 2FA code, as for a new key. The key itself never changes, and the change counts from its next request. A revoked or expired key cannot be edited. A program can read its own rows with
GET /api/v1/history. - Many servers, one backup machine (5.13.1). Add
--name <server>to the install command: each name has its own timer, config, key, folder and log.--statuslists every server;uninstall --nametakes one away. The card shows the command with the name filled in. An install without a name works as in 5.13.0. - Drills and monitoring (5.13.1). A started drill serves its site while its cron and workers stay paused, and a restore key reads the health of the projects it restored itself. A ZIP moves between x86 and ARM; a cold image only to the same architecture. A failed backup of any kind is an alert until a newer clean copy of that kind exists; a failed platform copy is an alert of the installation. Settings → General → 📦 Manual Update → Check for new versions is OFF by default: when you turn it on, once a day CodeHero reads
codeheropro.ai/latest.jsonand shows «X is available»; if it could not read the site, it says so. Nothing else leaves the server. After wrong keys, Settings → Security says «API: the address X is locked for N minutes after wrong keys»; Unlock Account clears it. - A database that did not load whole (5.13.4). The answer of a restore carries
database_partialwith the first error, and its message says «Restored, but the DATABASE IS PARTIAL (…)». The files and the rest are restored; what the dump holds after that error is missing. A container's cron jobs come back with the restore («cron jobs restored for …»); on a drill they are installed and stay paused. - The live image (5.13.2). A backup of a running container project that stops nothing: no container, no service, no ticket. It is a copy of the disk at one second, like a power cut, so databases recover from their own logs. MySQL, MariaDB and PostgreSQL keep every commit they acknowledged. Redis without AOF keeps only its last dump, so turn AOF on (
appendonly yes). It took about 40 seconds for 2 GB of data. A folder of the server that a container uses is in no image, and needs its own backup. You restore it as a new project, like a cold image. It needs the backup area and may back up. - Snapshot chains (5.13.2). A full copy once a week and small differences after it: every day, or every few minutes if you want. Two switches, both off at the start: the key's tick chains and the project's may keep a snapshot chain. The card «Snapshot chain» on the project's page shows its state and has End this chain. A chain ends when you end it, when the key is revoked or expires, when the disk changes under it (a resize, a snapshot restore) and when the disk is nearly full. A snapshot keeps data you delete, and an idle chain is watched once a minute, so a project that fills its disk very fast can still run out of space before the next check.
- Restoring a chain, and trusted sources (5.13.2). The backup client has
chains,chain verifyandbundle. The bundle is made on your own computer, is plain and holds the project's passwords: keep it like the private key and delete it after the restore. Every link is signed with this installation's chain key: write its fingerprint down once (Settings → 🔑 API keys). A restore accepts only links signed by a key you trust: the installation's own keys and the ones you add under Trusted sources. Trust only your own installations, because a trusted installation that is compromised can bring setuid files. The server checks every link, applies it in a confined step, and the new project starts stopped and quarantined. - The upgrade to 5.13.2 changes nothing in any project. The new switch is off on every project and no key has the new tick. To pull chains, download the new
codehero-backup-client.pyfrom Backup client. A one-pass run withsudo … --oncenow runs as the client's own account and leaves nothing owned by root; if a 5.13.1 client run that way stopped your scheduled backups, the new client prints the onechowncommand to run.
Questions people ask
All the articlesHow does CodeHero compare with other AI coding tools?
It is a different kind of thing. Coding tools help a person who writes code. CodeHero does the whole job — asks, plans, builds, checks, hosts and maintains — for the person who knows the business. Read the article
If CodeHero writes the code, what is my role?
You become the advisor: you decide the business rules, approve the plan and accept the result. CodeHero is the developer that asks, builds, checks and maintains. Read the article
Do my passwords and keys reach the AI company?
CodeHero removes the secrets you store from what the AI is shown, and checks every request that leaves for the AI company once more, at the last step; a check that cannot finish stops the request. The one exception is the call that renews your login, which carries no ticket work. For tickets on a subscription (Claude Code, Codex, Grok) the check is forced only with «Ticket sandbox» on; with it off it catches mistakes only. It cannot hide what it does not know: a password typed in a chat, a key only in a config file, a screenshot. Store every password as a secret — never in a chat message or a screenshot. Read the article