docs/docs/en/nocobase-cli/installation/migration.md
If you are still using Docker, create-nocobase-app or Git source code to install and maintain NocoBase according to the old documentation, you can continue to use it in this way. There is no need to reinstall the application immediately to access AI.
This page mainly helps you determine the route first:
By default, it is recommended to first check which category you belong to, and then enter the corresponding document. This is more stable and less likely to misoperate the production environment.
| If you want now... | What to do by default |
|---|---|
| Continue to install, upgrade and maintain applications in the original way | Just continue to use the old way, first read the relevant document entry below |
| Let an old application that has been running stably connect to the AI agent | By default, remote connection is used first, which has the lowest risk |
Use nb app, nb env, nb source to manage applications in the future | Create a new CLI application and migrate the old data there |
If you are used to the previous installation method, you can continue to use it. Just follow the original documents for installation, upgrade and environment variable configuration.
If your old application is already running stably, use this method by default.
The focus of this method is to first connect existing applications to the CLI and AI agent through remote connection. This is the lowest risk because it doesn't directly take over your current installation, startup, stop, and upgrade processes.
But we must first clarify the boundaries:
nb app related capabilitiesIn other words, if what you care about most at the moment is "connect the AI first" rather than "immediately switch the entire operation management system to the CLI", you will take this path first by default.
When connecting to an existing application, you can initialize a CLI env like this:
# 默认使用 OAuth 认证
nb init --yes --env app1 \
--api-base-url=http://your-app-host/api
# 使用 token 认证
nb init --yes --env app1 \
--api-base-url=http://your-app-host/api \
--auth-type=token \
--access-token=<token>
If re-authentication is required later, you can execute:
nb env auth app1
If you just want to start using AI to build capabilities, just continue to read AI Build Quick Start.
If you want to use nb app, nb env, and nb source to manage local applications in the future, then the safer approach is not to directly take over the existing application, but to create a new application and then migrate the data of the old application there.
The reason is also very simple: the ability to "take over existing applications" is still under development.
So at the moment, the default recommended migration route is:
storage and environment variables of the old application.First create a new CLI env:
nb init --yes --env app1
Before migrating, it is recommended to confirm that these contents are ready:
storage directory has been backed upAPP_KEY, TZ, DB_*, DB_UNDERSCOREDBy default, it is enough to migrate the test environment first. Only migrate the production environment when you have confirmed that the backup, environment variables, and database configuration are all correct.