Skip to content

Install and Upgrade with an AI Agent ​

Send either prompt directly to Termark AI, Codex, Claude Code, or another agent with command execution tools. No placeholders need editing. The agent must already have command execution context for the target and be able to read these docs; sending the prompt alone does not establish a server connection. The agent uses the current session, selected host, or existing context to identify the target; Termark global AI can also use a host mention. SSH details do not need to be entered separately, and the agent does not have to run on the server itself. It should ask only if the target is unclear.

Installation: copy and send ​

text
Install Next Terminal for me using the official instructions: https://www.next-terminal.com/docs/install/ai-agent
Inspect the target environment, complete the installation, and tell me the access URL.

Upgrade: copy and send ​

text
Upgrade my existing Next Terminal deployment to the latest stable release using the official instructions: https://www.next-terminal.com/docs/install/ai-agent
Find the existing deployment, back it up before upgrading, and verify the service afterward.

Instructions for the agent ​

Identify the target and environment ​

Use the current session, selected host, or existing user context. Do not mistake the SSH client machine for the target server. Ask if the target is unclear or multiple deployments are found. Inspect the OS, architecture, resources, disk, Docker/Compose, and occupied ports.

New installation ​

Read Installation first. Check for existing Next Terminal containers, configuration, and data. Do not overwrite an existing deployment or upgrade it without a user request. For a new installation, use the official installer's default directory. Determine the access address from the target's networking and ports; do not require a directory or domain in advance or configure a domain automatically.

Download the installer to a temporary file, verify that it is a shell script, inspect it, then execute it. Handle interaction according to the actual script and available tools; do not assume unattended flags exist. If interaction or permissions are unavailable, explain the specific limitation.

Check Compose services, recent logs, and Web reachability. Report the actual directory, image versions, access URL, and /setup initialization URL. Leave administrator setup to the user and do not print passwords or private keys.

Existing deployment upgrade ​

Discover the deployment directory from container Compose labels, mounts, and configuration. Also inspect stopped containers and on-disk deployment configuration. If no deployment is found, report that result instead of installing a new one. Inspect the application version, database type and major, image tags, and .distribution-source. Verify the latest official stable release and matching image tag; refreshing a pinned tag alone does not upgrade to the latest version. If the target version or compatible image cannot be verified, do not guess tags or claim a latest-version upgrade.

Create a logical database backup using the appropriate database tools, and back up configuration and the full data directory. Copying a running PostgreSQL/MySQL data directory is not a reliable backup. Stop application writes before copying files while keeping the database available, or use a verified consistent backup method. Check exit status, files, and readability, and record old image IDs/digests and configuration. These checks do not constitute a restore drill. Migrate SQLite/MySQL using the linked guide before upgrading; follow the historical migration guide for 1.x instead of using the current container upgrade command. If .distribution-source is missing, this documentation does not yet provide executable management-script migration steps. Report the blocker; do not invent its contents or reinstall over the deployment. Handle native deployments separately using the native migration guide.

Preserve the PostgreSQL major, networks, and data paths, and match the application's PostgreSQL client major to the server. Use the existing crt.sh upgrade in the actual deployment directory. When changing application tags, preserve the registry and database-client variant. Review docker-compose.yaml.new; do not blindly replace Compose, run down -v, or delete data volumes.

Check containers, logs, and Web access. Report old and new versions, backup locations, verification results, and unfinished checks. List account, asset connection, authorization, and recording checks that require user sign-in. On failure, retain logs and recover using the previous version and matching backups; do not merely reconnect an old image to a changed database.

Commands and acceptance ​

Choose commands for the specific task; do not run this entire page sequentially. Execute through the agent's tools on the established target. See Installation for details.

Installation ​

Download first. Stop on failure and inspect the downloaded file before execution; never reuse a stale file from a failed download.

shell
curl -fLSs --connect-timeout 10 --max-time 120 https://license.next-terminal.com/api/distribution/install/install.sh -o /tmp/next-terminal-install.sh

Read the script using file tools and check syntax with bash -n /tmp/next-terminal-install.sh. Then run it in an interactive terminal:

shell
sudo bash /tmp/next-terminal-install.sh

Upgrade ​

After discovering the deployment, backing up, checking target tags, and completing necessary migrations, run the existing script in the actual directory. This example applies only to a confirmed default-directory installation:

shell
cd /opt/next-terminal && sudo ./crt.sh upgrade

Verification ​

Use the actual Compose project directory, files, project name, and environment files to check services and recent logs. Check an HTTP GET response and status on the actual port. A successful curl exit or a running container alone does not prove application health. For the default port:

shell
curl --connect-timeout 5 --max-time 15 -sS -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8088/login

Report the actual access address. A successful local check does not prove public reachability. Do not disable firewalls or open cloud security groups automatically to pass a check. Verify existing accounts, assets, policies, and connections after upgrading. Redact shared logs.