Production environment deployment overview
If your NocoBase can already run normally on the server, you usually need to add two more capabilities before it is officially launched:
- Allow the application to automatically resume running after the machine is restarted.
- Connect the reverse proxy entrance to the application to provide stable access to the outside world.
Corresponding to the NocoBase CLI, it mainly consists of the following two sets of commands:
nb app autostartnb proxy
This set of documents is mainly divided into two parts:
- Application self-starting: Allow the application to resume running after the machine restarts
- Reverse proxy: Provide a stable external access entrance for applications
You can first see which piece you need more currently, and then enter the corresponding page.
What problems do these two pieces solve in the production environment?
That is to say:
nb app autostartsolves the problem of "how to resume operation of applications after system startup"nb proxysolves the problem of "how to provide stable access to the outside world"
nb app autostart does not bypass these process management methods, but uniformly adapts different process management methods, and then converges them into a stable set of self-starting management entrances. In this way, you don't need to remember a different set of self-starting configurations because the underlying layer is Docker, PM2, or Supervisor that may be supported in the future.
When the system starts this layer, it will continue to be processed by systemd, launchd or the host startup script. They are responsible for executing once when the machine starts:
This command will then pull up all applications that have auto-start enabled.
Here are two layers of things that should not be mixed together:
- Capabilities such as Docker, PM2, and Supervisor are closer to "how applications usually run and how to manage application processes."
- Capabilities such as
systemd,launchd, and host startup scripts are closer to "what command to execute when the system starts"
If you happen to be stuck here "Why do you need nb app autostart", just continue to read Application auto-start and nb app design intent.
Which page should I look at now?
Before entering the production environment, confirm these prerequisites
- The application has been saved as CLI env
- The application can be started normally on the server itself
- If you are going to connect to the reverse proxy,
appPorthas been saved in env - If you are ready to officially open it to the outside world, you have already planned the domain name, entrance port and HTTPS solution.
If you have not completed the CLI installation or env initialization, go back to Install using CLI.
If the command prompts that env is missing appPort, first execute nb env update to fill it in.

