> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/tech/en/platform-development/onprem-operations.md). Agents can also search and read this documentation through its [MCP server](https://docs.maiagent.ai/~gitbook/mcp).

# Operations Essentials: Offline Installation, TLS, Backups, Monitoring, and Acceptance

Operations essentials for private cloud and on-premises deployments: air-gap installation, domains and TLS certificates, backup and restore, optional monitoring, and post-deployment acceptance, with k

This page covers five areas that customer IT teams and SI partners need to understand when planning and operating MaiAgent installations using the deployment package (private cloud or on-premises). Each area lists key points and common pitfalls. For actual commands and expected output, refer to the installation manual supplied with the deployment package. Contact your MaiAgent representative to obtain it.

## Air-Gap Installation <a href="#air-gap-install" id="air-gap-install"></a>

**Key Points**

* **When to use it**: Use offline installation whenever the host cannot connect directly to MaiAgent's download site and Hugging Face. Environments that only allow whitelisted connections, require a proxy, or can reach only some of these resources also count as offline.
* **Only one site visit is needed**: Before visiting the site, use an internet-connected workstation to download the deployment package, service images, and model weights according to the deployment configuration, and verify each file's checksum. At the site, transfer the materials to the host, verify them, and then install.
* **Download size**: In testing, the default features for a single-host Docker deployment require 12 images totaling approximately 8.7 GB; enabling monitoring and alerting increases this to approximately 9.2 GB. Model weights are additional if models run on the host.
* **Transferring materials to the site**: Connect the workstation to the customer's internal network and copy the files directly, or use a USB drive. Format USB drives as exFAT or NTFS: the backend image is approximately 7.5 GB as a single file, which exceeds the FAT32 file size limit.

{% hint style="warning" %}
**Precautions**

* Finalize the deployment configuration before visiting the site. Changes to features, versions, or CPU architecture require different materials, which must be downloaded again on the workstation. Host-specific settings, such as the address users connect to, can be changed on site.
* Distributed Docker: Copy the materials to every host running Docker.
* Offline Kubernetes installation requires additional materials (cluster components, Helm charts, and system packages for storage components). Configure domains in internal DNS; do not use domain services that depend on public DNS resolution.
* The deployment configuration contains model service keys and is also needed for upgrades. Store it encrypted according to your company's policies.
* Messenger, Instagram, and WhatsApp channels require Meta to call MaiAgent's API over the internet and cannot be used in offline environments.
  {% endhint %}

## Domains and TLS Certificates <a href="#tls-and-domain" id="tls-and-domain"></a>

**Key Points**

* **Two connection options**: An IP address with a port number (no domain required), or a separate domain for each service (for example, one each for the API, admin console, and chat page). Kubernetes supports only the latter. For required ports, see [System Requirements: Ports](https://docs.maiagent.ai/tech/en/platform-development/system-requirements.md#ports).
* **When users connect through another address** (such as a cloud host's public IP, an external NAT address, or a domain pointing to either), enter the address users actually connect to as the server address during installation. If you enter the host's internal IP, external users will be unable to open the admin console or upload files.
* **A self-signed certificate is generated automatically during installation**, so browsers display a security warning on first access. To replace it with the customer's certificate, you can use one issued by either a public CA or an internal enterprise CA, supplied as a `.pfx` file or as a certificate file and private key. The conversion tool included in the deployment package checks that the certificate and private key match, that the certificate chain is complete, and how long remains before expiration.
* **Replacing the certificate does not require reinstallation**. In testing, all API calls succeeded during the change, with no service interruption.

{% hint style="warning" %}
**Precautions**

* The certificate's Subject Alternative Name (SAN) must include the address users connect to. If users connect using an IP address, the certificate must include that IP; public CAs generally do not issue certificates containing IP addresses.
* In cloud and most NAT environments, the host cannot reach its own external address, causing all post-deployment acceptance tests to time out. Add NAT rules on the host to redirect traffic destined for its own external address to its internal address.
* Internal enterprise CA: Add the root CA to the backend service's trust store; otherwise, certificate verification fails when the backend connects to its own URL. The CA certificate must contain the Key Usage field.
* The system does not proactively notify you when certificates expire. Add expiration checks to the customer's existing monitoring or scheduled tasks.
* Restoring a backup also restores the website certificate that was in use at the time of the backup.
* Kubernetes certificates are stored in the cluster. Contact MaiAgent first if you want to use a certificate issued by an internal enterprise CA. Before replacing certificates in distributed Docker or Kubernetes deployments, confirm the procedure and schedule with your MaiAgent representative.
  {% endhint %}

## Backup and Restore <a href="#backup-and-restore" id="backup-and-restore"></a>

**Key Points**

* The deployment package includes a backup script that backs up the database, object storage (uploaded files), search indexes, cache and message queues, reverse proxy configuration, and service configuration (including service passwords and encryption keys) together.
* Backups are stored in a directory on the host by default and retained for 7 days. Both the backup directory and retention period are configurable. You can also schedule regular backups using cron.
* Restoring stops the services, overwrites the data, and restarts the services. The system is unavailable during this process. In testing (a fresh installation with very little data), backup took approximately 1 minute and restore approximately 2.5 minutes.
* A backup is created automatically before upgrades and marked for retention. See [Versions and Upgrades: Rollback Limitations](https://docs.maiagent.ai/tech/en/platform-development/onprem-versioning-and-upgrades.md#rollback).

{% hint style="danger" %}
**Precautions**

* The default backup directory is on the same disk as the system, so a host failure can also destroy the backups. Mount a separate disk or network storage as the backup directory.
* If the encryption keys in the service configuration are lost, encrypted data cannot be decrypted. Do not delete or replace them.
* Restoration has ordering dependencies. Restore the entire backup rather than individual parts.
* Before going live, perform a restore drill: create an identifiable record, back it up, delete it, restore the backup, and confirm that the record is recovered.
* For distributed Docker, run the script on the deployment host; data from all hosts is collected and stored there. For Kubernetes, run it on the control node. If the customer provides the cluster (rather than having the installer create it), the built-in scripts cannot be used; use the cluster's existing backup mechanism instead.
* Backup failures do not trigger monitoring alerts. Check scheduled backup results separately.
  {% endhint %}

## Monitoring (Optional) <a href="#monitoring" id="monitoring"></a>

**Key Points**

* Enabling monitoring deploys VictoriaMetrics (metrics, retained for 30 days by default), VictoriaLogs (logs, retained for 14 days by default), and Grafana dashboards covering hosts, containers, databases, cache, search engines, object storage, and message queues. If the host has NVIDIA drivers, GPU utilization, memory usage, and temperature are also collected.
* Alerting has a separate toggle. When enabled, built-in rules (such as high host CPU, memory, or disk usage) trigger Email notifications. Email (SMTP) is currently the only supported notification method.

{% hint style="warning" %}
**Precautions**

* Monitoring currently excludes application metrics (such as HTTP error rates and request latency), business metrics (such as conversation volume), external checks that users can access the system, certificate expiration, and backup success or failure. For external availability checks, use the customer's existing external monitoring to probe the API URL.
* Kubernetes monitoring interfaces have no external routes. Connect using port-forward.
* Confirm the monitoring and alerting setup (thresholds and notification recipients) with MaiAgent before enabling it.
  {% endhint %}

## Post-Deployment Acceptance <a href="#post-deployment-acceptance" id="post-deployment-acceptance"></a>

**Key Points**

* If automatic acceptance testing is selected in the deployment configuration (recommended), functional acceptance tests (deploy-test) run at the end of installation and generate HTML and JSON reports. You can also run them separately afterward, such as after replacing a certificate or upgrading.
* **Pass criteria**: All tests in Stage 0 (infrastructure) and Stage 1 (smoke tests) must pass. Investigate failures from Stage 2 onward individually. Skipped items are usually optional features that are not enabled; skipped or unverified items do not count as passed.
* If you completed the Deployment Configuration Checklist before deployment, use the verification tool generated with the checklist to compare the system's actual configuration and confirm that all feature toggles match it.

| # | Acceptance Item                                        | Pass Criteria                             |
| - | ------------------------------------------------------ | ----------------------------------------- |
| 1 | Installation result                                    | No failed steps                           |
| 2 | Service status                                         | All services are running                  |
| 3 | Admin console, chat page, and administration interface | All can be opened and logged into         |
| 4 | Default account passwords                              | Changed; factory passwords no longer work |
| 5 | Functional acceptance tests                            | All Stage 0 and Stage 1 tests pass        |
| 6 | Backup                                                 | Backup script runs successfully           |
| 7 | Checklist verification (if a checklist was completed)  | No discrepancies                          |

{% hint style="danger" %}
**Precautions**

* The default administrator account created by the deployment package uses a publicly known factory password. Change it immediately after installation, and do not allow user access until it has been changed.
* After changing the account credentials used for acceptance tests, also update the copy stored in the deployment directory. Otherwise, subsequent acceptance tests will fail to log in.
* Browser-based tests require an acceptance testing image delivered separately. Without it, the report marks these tests as unverified.
* Services start automatically after the host reboots. In testing, login became available after approximately 1.5 minutes.
  {% endhint %}

## Sending Invitations and Notification Emails <a href="#email-and-register-url" id="email-and-register-url"></a>

The platform sends member invitation emails, human handoff notifications, and other emails through the customer's SMTP server. The deployment package does not include a mail server or configure email delivery during installation. After installation, a system administrator must complete the following Email settings in the **administration interface** (Django administration):

* **SMTP server**: Host, port, credentials, and sender address. Invitation emails will not be sent if these settings are missing.
* **Registration page URL template** (the “Registration Page URL Template” field in the administration interface): The registration link in invitation emails consists of the admin console login URL with an invitation code parameter, for example, `https://<後台網址>/login?invitationCode={invitationCode}`. `{invitationCode}` is replaced with the code for that invitation. The admin console URL is the address provided for users during installation (use `https://` when using a domain and TLS). During installation and upgrades, the deployment package automatically fills in blank templates in existing email configurations (see [Email Links Automatically Filled In by the Deployment Package](#email-url-defaults) below). If you create an email configuration after installation, fill in this field when creating it. If it is left blank, invitation emails will not be sent, and the invitation will be marked as failed to send.

{% hint style="info" %}

* These two settings apply to the entire deployment. There are no corresponding fields in the organization console, and organization administrators cannot change them. Contact the system administrator to make changes.
* Changing the registration page URL template only affects emails sent afterward. Invitations already sent retain the old link. Resend them from the invitation status page in the admin console if needed.
* This setting is unrelated to [Chat Platform Basic Settings: Custom Domain (CNAME)](https://docs.maiagent.ai/build/channels/basic-settings#custom-domain) in the user manual: a custom domain only affects the chat page's public URL.
  {% endhint %}

### Email Links Automatically Filled In by the Deployment Package <a href="#email-url-defaults" id="email-url-defaults"></a>

During every installation, IP address change, and upgrade, the deployment package checks existing email configurations in the administration interface (Gmail, SMTP, and AWS SES; configuration types not available in the current backend version are skipped) and aligns email link URL templates with this deployment's admin console URL (the admin console URL in the deployment configuration):

| Administration Interface Field                                                  | Value Filled In When Blank                     |
| ------------------------------------------------------------------------------- | ---------------------------------------------- |
| Registration Page URL Template (invitation emails)                              | `<後台網址>/login?invitationCode={invitationCode}` |
| Reset Password URL Pattern (password reset emails)                              | `<後台網址>/reset-password?code={code}`            |
| Join Confirmation URL Pattern (password setup emails for bulk-imported members) | `<後台網址>/reset-password?code={code}`            |

* **Existing values are not overwritten**, including values administrators edit in the administration interface after they were filled in. There are only two exceptions: values pointing to the cloud admin console (`https://admin.maiagent.ai`), and URLs beginning with this host's old IP address when the IP changes. These are replaced with this deployment's admin console URL while preserving the original path and parameters.
* **URLs pointing to other hosts only trigger a notice and are not changed**. For example, you may intentionally point links to your own portal, or reinstall after changing the admin console domain. The deployment screen lists the field and destination host. Check whether a manual adjustment is needed.
* **A fresh installation has no email configuration yet**, and the deployment package does not create an empty one. Email configurations created in the administration interface after installation are filled in at the next installation or upgrade. Before then, invitations will be marked as failed to send if the registration page URL template is missing. After filling it in, click “Resend” in the invitation status page in the admin console.
* The deployment screen lists the fields filled in during the current operation. If a value cannot be filled in (for example, because the admin console URL cannot be read), a warning is displayed without failing the installation or upgrade. Fill in the field manually in the administration interface.
* When installing with Helm into a customer's existing Kubernetes cluster, the deployment package does not fill in these values automatically. Enter them manually using the formats above.

### Which Emails Require Email Configuration and a Registration Page URL <a href="#emails-requiring-setup" id="emails-requiring-setup"></a>

The following table lists system emails sent proactively by the platform, and what happens when email configuration (the SMTP server above, or AWS SES) or the registration page URL template is missing. For when each email is sent, who receives it, and whether it can be disabled, see [System Notifications and Email](https://docs.maiagent.ai/start/system-emails) in the user manual.

| System Email                                                                                                     | Requires Email Configuration | Requires Registration Page URL Template                                                                                        | Without Email Configuration                                                                                                                                                                                                                                      |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Password reset email                                                                                             | Yes                          | No                                                                                                                             | Users see an error after submitting “Forgot password” on the login page and receive no email                                                                                                                                                                     |
| Invitation email                                                                                                 | Yes                          | Yes: if missing, the invitation is immediately marked as failed to send, and “Resend” also fails                               | Invitation is marked as failed to send                                                                                                                                                                                                                           |
| Password setup email (bulk member import)                                                                        | Yes                          | No                                                                                                                             | Members are still created, but no emails are sent for the entire batch and no delivery records are kept                                                                                                                                                          |
| Human handoff notification email                                                                                 | Yes                          | The conversation link in the email uses the URL from the registration page URL template; without it, the link cannot be opened | No email is sent; human handoff notifications are still delivered to the notification center                                                                                                                                                                     |
| Connector request email                                                                                          | Yes                          | No                                                                                                                             | No email is sent; the member's request is still submitted                                                                                                                                                                                                        |
| MCP tool requires reauthorization                                                                                | Yes                          | No                                                                                                                             | No email is sent; only a notification center notification is issued                                                                                                                                                                                              |
| Scheduled task skipped tools with expired authorization                                                          | Yes                          | No                                                                                                                             | No email is sent; skipped tools are still recorded in the task's execution history                                                                                                                                                                               |
| Low credit balance alert, personal quota nearing exhaustion or expiration                                        | Yes                          | No                                                                                                                             | No email is sent; notification center alerts are still issued                                                                                                                                                                                                    |
| Organization approval or rejection, data nearing permanent deletion                                              | Yes                          | No                                                                                                                             | No email is sent                                                                                                                                                                                                                                                 |
| Plan and Credits notifications (plan scheduled, plan activated, monthly Credits issued, Credits top-up credited) | Yes                          | No                                                                                                                             | Disabled by default for private cloud and on-premises deployments, so no emails are sent. If enabled without email configuration, each email is recorded as failed. After configuring delivery, resend from notification records in the administration interface |

{% hint style="warning" %}

* Admin console links in connector request emails, MCP tool reauthorization emails, and emails about scheduled tasks skipping tools with expired authorization currently point to the cloud URL (`admin.maiagent.ai`). Recipients in private cloud and on-premises deployments should log in to their own admin console and use the connector management or tools page, rather than clicking the email links.
* When switching to SMTP or AWS SES for email delivery, the **subjects and email templates** for invitation and password setup emails have no default values. Fill them in as well, or the emails will have no subject or body.
  {% endhint %}

## Redirecting to a Specified URL After Logout <a href="#logout-redirect" id="logout-redirect"></a>

For deployments using single sign-on (SSO) or embedding MaiAgent in an enterprise portal, the admin console's built-in login page is usually unnecessary, and users have nowhere to go if they land there after logging out. The deployment configuration can specify a logout redirect URL, such as the enterprise portal home page or the IdP's logout endpoint.

**Behavior When Configured**

* All three of the following cases trigger a full-page redirect to the specified URL: a user logs out manually, a user is logged out after an idle timeout, or an unauthenticated user opens an admin console link directly.
* The redirect replaces the entire page. The browser's Back button does not return users to the admin console login page.
* If no URL is configured, the original behavior is retained: users return to the MaiAgent login page.

**URL Format**

* Accepts full URLs beginning with `http://` or `https://`, or paths within the site beginning with a single `/`.
* Other formats (such as `javascript:` or URLs beginning with `//`) are ignored and treated as unconfigured.

{% hint style="info" %}
This is a deployment setting for the admin console frontend and applies to all organizations in the deployment. There is no corresponding field in the organization console. It can be set during installation. To add or change it afterward, contact your MaiAgent representative to arrange the update; it takes effect after the frontend service reloads its configuration. For logout behavior toward the IdP for each SSO type, see [Third-Party Login: Logout Behavior](https://docs.maiagent.ai/org/sso#logout-behavior) in the user manual.
{% endhint %}

## Related Pages <a href="#related-pages" id="related-pages"></a>

* [Deployment Types and Feature Comparison](https://docs.maiagent.ai/tech/en/platform-development/onprem-deployment-types.md)
* [System Requirements](https://docs.maiagent.ai/tech/en/platform-development/system-requirements.md)
* [Versions and Upgrades](https://docs.maiagent.ai/tech/en/platform-development/onprem-versioning-and-upgrades.md)
* [Connecting On-Premises Model Services](https://docs.maiagent.ai/tech/en/platform-development/onprem-model-services.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/tech/en/platform-development/onprem-operations.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
