Existing login
Load TERRA only after the customer’s own user has signed in.
Developer DocumentationOpen Installation CentreCustomers keep their existing dashboard. Their developer uploads a small token broker, pastes the widget snippet into an authenticated page and connects approved business data through TERRA Bridge.

Asterhelm reveals the deployment secret once in the authenticated Installation Centre. The customer pastes it into a private server configuration after downloading the kit.
Load TERRA only after the customer’s own user has signed in.
A backend endpoint keeps the permanent deployment secret out of JavaScript.
Use an exact HTTPS origin such as https://admin.company.com.
Configure Atlas and read-only Bridge tools before expecting live answers.
https://dashboard.company.comCorrect originhttps://dashboard.company.com/admin/pageIncorrect — origins contain no pathsThe ZIP is generated only after Asterhelm verifies the user, role, active entitlement, plan feature and environment. No public ZIP is stored.
asterhelm-terra-install/
├── public/
│ ├── terra-token.php
│ └── terra-test.php
├── private/
│ ├── terra-config.php.example
│ └── .htaccess
├── frontend/
│ ├── terra-embed.js
│ └── TerraEmbed.jsx
├── embed-snippet.html
├── installation-manifest.json
├── CHECKSUMS.txt
└── README-FIRST.txt| File | Purpose |
|---|---|
terra-token.php | Checks the customer login and exchanges the deployment secret for a short-lived browser token. |
terra-config.php.example | Private deployment ID, origin, session mapping and secret placeholder. |
embed-snippet.html | Loads the centrally hosted TERRA widget. |
terra-test.php | Temporary logged-in test page. Delete it after testing. |
CHECKSUMS.txt | SHA-256 hashes for the generated files. |
Copy terra-config.php.example to terra-config.php and paste the one-time secret.
<?php
return [
'deployment_id' => 'deploy_...',
'deployment_secret' => 'terra_deploy_test_...',
'website_origin' => 'https://dashboard.company.com',
'session_user_id_key' => 'user_id',
'session_user_role_key' => 'role',
];/home/ACCOUNT/terra-private/terra-config.phpIf it must remain under public_html, retain the supplied protected folder and .htaccess.
Upload public/terra-token.php to the path chosen when the deployment was created.
/home/ACCOUNT/public_html/api/terra-token.phpThe supplied file supports common PHP sessions. Change only the marked user-resolution section when required.
$userId = $_SESSION['user_id'] ?? null;
$userRole = $_SESSION['role'] ?? 'member';<script src="https://api.asterhelm.com/embed/terra.js" defer></script>
<script>
window.addEventListener('DOMContentLoaded', function () {
AsterhelmTerra.init({
tokenEndpoint: '/api/terra-token.php'
});
});
</script>Asterhelm hosts terra.js centrally so fixes do not require every customer to replace the widget file.
Copy frontend/TerraEmbed.jsx into the React application and render it only within the authenticated layout.
import TerraEmbed from './components/TerraEmbed';
export default function AdminLayout() {
return (<>
<DashboardRoutes />
<TerraEmbed />
</>);
}The deployment secret must never be placed in frontend environment variables that are bundled for the browser.
A Live installation requires an active paid subscription.
If a kit for https://cvbright.com is copied to https://anothercompany.com, Asterhelm returns:
{
"ok": false,
"error": {
"code": "deployment_origin_mismatch",
"message": "This TERRA deployment is not authorised for this website."
}
}Five origin mismatches within ten minutes temporarily block the deployment for fifteen minutes and create Audit Log events.
| Status | Kit download | Token issuance |
|---|---|---|
| Internal | Test and Live | Allowed |
| Trialing | Test only | Test only |
| Active | Within plan limits | Allowed |
| Past due | Blocked | Blocked |
| Cancelled | Blocked | Blocked |
| Suspended | Blocked | Blocked |
Previously downloaded files remain on the customer server, but they cannot obtain valid tokens after entitlement access stops.
terra_config_missingThe token broker cannot locate terra-config.php.
customer_login_requiredThe customer session does not contain the configured user key.
deployment_secret_missingThe one-time secret was not pasted into the private config.
deployment_origin_mismatchThe website differs from the origin registered in Asterhelm.
deployment_revokedThe deployment was revoked or its secret was rotated.
subscription_requiredThe organisation entitlement is not active.
live_deployment_requires_subscriptionA trial attempted to use a Live deployment.
deployment_temporarily_blockedRepeated origin mismatches triggered the automatic block.

The Installation Centre generates the code, protects the secret and records every kit download, secret rotation and origin mismatch.
Open Installation Centre