--- title: "Deploy from CLI" url: https://docs.catalyst.zoho.com/en/serverless/help/appsail/custom-runtimes/deploy-from-cli/ description: "Catalyst AppSail is a fully-managed platform of Catalyst Serverless that enables you to develop and deploy web services in managed runtimes of Java, Node.js, and Python, or of custom runtimes as OCI images to the cloud with ease." last_updated: 2026-08-17T12:16:04Z service: Serverless type: general --- # Deploy AppSail as a Custom Runtime from the CLI ### Initialize or Add an AppSail Service You can [initialize an AppSail service](https://docs.catalyst.zoho.com/en/cli/v1/initialize-resources/initialize-appsail/) for a custom runtime app directly in your app's directory, or from a new directory using the [Catalyst CLI](https://docs.catalyst.zoho.com/en/cli/v1/cli-command-reference/). You can also [add an AppSail service](https://docs.catalyst.zoho.com/en/cli/v1/add-appsail/) to an existing Catalyst project directory, where other resources have been initialized. You can [deploy the AppSail service](https://docs.catalyst.zoho.com/en/serverless/help/appsail/custom-runtimes/deploy-from-cli/#deploy-an-appsail-service) after you initialize or add it. To initialize an AppSail service in a new directory, create a folder for your project in your local machine and navigate to it from your terminal. Initialize a project by executing the following command from that directory: ```sh catalyst init ``` You can add an AppSail service in an existing Catalyst project directory by executing this CLI command: ```sh catalyst appsail:add ``` Catalyst supports two protocols for custom runtime apps that you can use to associate your app's image with AppSail. Each protocol has a distinct schema for identification and functioning. * **Docker Image Protocol:** Use this to associate a pre-built image of your app present in the local docker registry. The image must be built and [tagged](https://docs.docker.com/reference/cli/docker/image/tag/) to point to the local registry. Example: *docker://localhost/expres-hw:latest* * **Docker Archive Protocol:** Use this to point to an archive file (.tar or .tar.gz) of a pre-built image of your app in your system's directory. Example: *docker-archive://test.tar* > **Note:** The `.tar` file can be typically generated with the [`docker save` command](https://docs.docker.com/reference/cli/docker/image/save/). You need not provide any other details except the name for the AppSail for container images. The source or build path of the app, stack, and startup command are not required to be configured for OCI images, as they are already defined in the images. The steps to initialize or add the AppSail service will be the same as described below: 1. The CLI will prompt you to select the runtime type as Catalyst-Managed Runtime or **Docker Image** when AppSail is initialized. Select the second option. ![catalyst_cli_appsail_init_1](https://catalyst-docs-development.zohostratus.in/images/cli/initialize-resources/catalyst_cli_appsail_init_01.png) 2. Select the protocol as **Docker Image** or **Docker Archive**. ![catalyst_cli_appsail_init_1](https://catalyst-docs-development.zohostratus.in/images/cli/initialize-resources/catalyst_cli_appsail_init_02.png) 3. **Docker Image Protocol:** If you select **Docker Image**, the CLI will list all the available images with tags in the local docker registry. Select the image you need. ![catalyst_cli_appsail_init_1](https://catalyst-docs-development.zohostratus.in/images/cli/initialize-resources/catalyst_cli_appsail_init_03.png) **Docker Archive Protocol:** If you select **Docker Archive**, the CLI will prompt you to enter the absolute path to the TAR file image of your app in your local system. ![catalyst_cli_appsail_init_1](https://catalyst-docs-development.zohostratus.in/images/cli/initialize-resources/catalyst_cli_appsail_init_04.png) > **Note:** When the AppSail configuration is stored in the [`catalyst.json`](https://docs.catalyst.zoho.com/en/cli/v1/project-directory-structure/catalyst-json/) file, the path will be stored relative to that file's location. 4. Provide a name for the AppSail service. You can name it anything you prefer. ![catalyst_cli_appsail_init_1](https://catalyst-docs-development.zohostratus.in/images/cli/initialize-resources/catalyst_cli_appsail_init_05.png) AppSail is now initialized in your local directory, and the app's image is now associated with the AppSail service. The configurations will be updated in [`catalyst.json`](https://docs.catalyst.zoho.com/en/cli/v1/project-directory-structure/catalyst-json/) file accordingly. ![catalyst_cli_appsail_init_1](https://catalyst-docs-development.zohostratus.in/images/cli/initialize-resources/catalyst_cli_appsail_init_06.png) > **Note:** The [`app-config.json](https://docs.catalyst.zoho.com/en/serverless/help/appsail/catalyst-managed-runtimes/key-concepts/#the-app-configjson-file)` file will not be created when you initialize AppSail with a container image. All the app specifications will be stored in the `catalyst.json` file. You can add certain custom configurations of your app in this file. Refer [here](https://docs.catalyst.zoho.com/en/serverless/help/appsail/appsail-configurations/) for details. You can now code your business logic in your app, then [serve the AppSail service](https://docs.catalyst.zoho.com/en/serverless/help/appsail/catalyst-managed-runtimes/key-concepts/#the-app-configjson-file) through a localhost to [debug](https://docs.catalyst.zoho.com/en/serverless/help/appsail/catalyst-managed-runtimes/key-concepts/#the-app-configjson-file) and test it, or [deploy it](https://docs.catalyst.zoho.com/en/serverless/help/appsail/catalyst-managed-runtimes/key-concepts/#the-app-configjson-file) to the remote console directly. ### Deploy an AppSail Service Catalyst enables you to deploy [AppSail services](https://docs.catalyst.zoho.com/en/serverless/help/appsail/introduction/) in two different ways: * **Regular Deploy:** The regular deploy execution applies when you have already initialized an AppSail resource either during the [project initialization](https://docs.catalyst.zoho.com/en/cli/v1/initialize-resources/initialize-appsail/) or by [adding it in an existing project directory](https://docs.catalyst.zoho.com/en/cli/v1/add-appsail/). * **Standalone Deploy:** You can do a standalone deploy of an app directly without initializing it as an AppSail service in prior. The OCI image of your app that is associated with Appsail is deployed, along with the configuration file of your project. > **Note:** Catalyst only supports the deployment of [OCI-compliant images](https://github.com/opencontainers/image-spec) built for the Linux AMD64 (x86-64) platform. ### Regular Deploy If the AppSail app is already initialized in the project directory, the CLI will automatically deploy the app with the rest of the project resources when you execute the `catalyst deploy` command. The CLI will display the endpoint URL of the app after it is deployed, that you can open it with. ![Deploy AppSail](https://catalyst-docs-development.zohostratus.in/images/cli/deploy-resources/cli-appsail-deploy-proj-init-1.png) If you have multiple AppSail apps in your project directory, you can access all of their URL endpoints from the CLI. You can also execute the following command to deploy the AppSail service alone from your app's source directory. ```sh catalyst deploy appsail ``` The deployment process is the same. ![Deploy AppSail](https://catalyst-docs-development.zohostratus.in/images/cli/deploy-resources/cli-appsail-deploy-proj-init-2.webp) ### Standalone Deploy You must execute the standalone deploy command from a Catalyst project directory's root. That is, `catalyst.json` and other [project dependency files](https://docs.catalyst.zoho.com/en/cli/v1/project-directory-structure/introduction/) must be present in the directory. > **Note:** If you execute the standalone deploy command without any of the [options specific to deploying container images](https://docs.catalyst.zoho.com/en/serverless/help/appsail/custom-runtimes/deploy-from-cli/#standalone-deploy-appsail-options), the CLI will prompt you for inputs related to Catalyst-managed runtime apps only by default. You can use the standalone deploy command with these options to deploy apps as container images: `--name <name>`, `--source <image>`, `--command <command>`, `--port <port>`. The first two are mandatory, while the last two are optional and can be used to override any startup commands or ports already configured in the container image definition. The options are explained in detail below. You can do the standalone deploy of an AppSail app in the following way: 1. Navigate to the directory the app's deployable files are present in, and executing the following command: ```sh catalyst deploy appsail ``` 2. Enter a name for your app. You can name the main file of your app’s build anything you prefer. ![Deploy AppSail](https://catalyst-docs-development.zohostratus.in/images/cli/deploy-resources/catalyst-appsail-standalone-deploy-1.webp) > **Note:** However, when you build your app as a Java WAR file, you will need to name the main file root.war or add specific controllers according to your code. 3. Select the build path for your app from the list and press **Enter**. ![Deploy AppSail](https://catalyst-docs-development.zohostratus.in/images/cli/deploy-resources/catalyst-appsail-standalone-deploy-2.webp) 4. Select a stack for your app and press **Enter**. ![Deploy AppSail](https://catalyst-docs-development.zohostratus.in/images/cli/deploy-resources/catalyst-appsail-standalone-deploy-3.webp) If you select Java, the CLI will further prompt you to pick either [Java SE or the Java WAR](https://docs.catalyst.zoho.com/en/serverless/help/appsail/catalyst-managed-runtimes/key-concepts/) as your app's deployable format. ![Deploy Functions](https://catalyst-docs-development.zohostratus.in/images/cli/deploy-resources/catalyst-appsail-standalone-deploy-4.webp) If you select any other stack, this will be skipped. 5. You must additionally specify the startup command for your app based on the stack, framework, and web server used. This information will be directly deployed and will be available in the Configurations section of your console after the app deployment. ![Deploy Functions](https://catalyst-docs-development.zohostratus.in/images/cli/deploy-resources/catalyst-appsail-standalone-deploy-5.webp) Your app is now directly deployed to the associated remote project without requiring you to initialize it as an AppSail resource. You can now access it with its endpoint URL displayed in the CLI. ![Deploy Functions](https://catalyst-docs-development.zohostratus.in/images/cli/deploy-resources/catalyst-appsail-standalone-deploy-6.webp) ### Standalone Deploy AppSail Options The catalyst deploy appsail standalone command supports the following options. Some of these are applicable to both Catalyst-managed runtime and container images apps, while some are specific to only one of them. **--name <name>** Use this to specify the name of your app. This is applicable to both Catalyst-managed runtime and container image apps. Example: ```sh --name DemoApp ``` **--command <command>** Use this to specify the [startup command](https://docs.catalyst.zoho.com/en/serverless/help/appsail/appsail-configurations/#startup-commands) for your app. This is applicable to both Catalyst-managed runtime and container image apps. This will override any values already configured in the container image definition. Example: ```sh --command npm start ``` **--source <image>** Use this to specify the source of the docker image to be deployed. This is applicable only to container image apps. You must start with '*docker://*' for Docker image protocol and '*docker-archive://*' for Docker archive protocol. [Refer here for details](https://docs.catalyst.zoho.com/en/cli/v1/initialize-resources/initialize-appsail/#initialize-appsail-as-a-custom-runtime). Example: ```sh --source docker://example-voting-app-worker:latest ``` **--port <port>** Use this to specify the port for the AppSail. This is applicable only to container image apps. This will override any values already configured in the container image definition. Example: ```sh --port 8000 ```