> For the complete documentation index, see [llms.txt](https://learn.capstorm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.capstorm.com/capstorm-container/installation-instructions/installation-via-docker-desktop.md).

# Installation via Docker Desktop

To install the CapStorm/Container, you will need to have a container host ready to run the container.

This installation guide provides an example installation path using the Docker Desktop application.

Note: To install the container using Docker Compose (CLI), please refer to [CapStorm’s docker hub](https://hub.docker.com/r/capstorm/capstorm) for an example.

## Prerequisites

* A Host For the Docker Container
* A CapStorm Customer Key GUID
  * The CapStorm team will provide you with a unique Customer Key associated with your account. This key provides access to your entitled features. The CapStorm customer key will take the following form:
    * ***XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX***
* Valid database connection details to a MySQL, PostgreSQL, or SQL Server database
  * The CapStorm Platform database user is expected to have the following Database Permissions
    * *CONNECT*
      * Used to establish remote connections to the target database
    * *CREATE DATABASE*
      * Used to provision databases containing Salesforce Backups
    * *DROP DATABASE*
      * Used to deprecate legacy Salesforce Backup databases
    * For the Salesforce Backup databases, The CapStorm Platform user is expected to have:
      * *INSERT*
      * *DELETE*
      * *UPDATE*
      * *CREATE* / *ALTER* *TABLE* privileges
        * Used to mirror & maintain changes in Salesforce data model
  * The database can be hosted in a container, or in any major RDBMS hosting platform (e.g. AWS, Azure, GCP, or on-premises)

## Prerequisites – Salesforce Authenticator

If your organization wishes to use Salesforce as an Authenticator for CapStorm/Container, be sure to follow our guide for [Setting Up Salesforce for Authentication](/capstorm-container/setting-up-salesforce-for-authentication.md)

## 1: Pull the latest image

Pull the latest image from the [capstorm/capstorm](https://hub.docker.com/r/capstorm/capstorm) docker repository

* This can be accomplished by searching for the [capstorm/capstorm](https://hub.docker.com/r/capstorm/capstorm) image in Docker Desktop and clicking *Pull*. Note that the latest GA release of the CapStorm/Container will have the tag *latest*.

![](https://495509274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDAPx1zE2IARmzGMaHbAx%2Fuploads%2Fgit-blob-f003c3f55f915aaf0263a63fb5d39fc444e7bb41%2F145689b2-Screenshot-2024-01-09-at-1.49.26-PM.png?alt=media)

## 2: Launch the container

1. In Docker Desktop, navigate to *Images*
2. Click the *Play Icon* to queue up the container launch
3. Before clicking the *Run* button, expand optional settings. You’ll see the following screen: ![](https://495509274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDAPx1zE2IARmzGMaHbAx%2Fuploads%2Fgit-blob-f26cac263d95fc2aa772a4d9f802744c39c86992%2F8848c639-Screenshot-2024-01-09-at-2.00.52-PM.png?alt=media)
   * Use this screen to provide:
     * A name for the container
     * Host port mappings for ports **8080**and **8443**
     * Environment Variables mentioned below
4. You can start the container with only port mappings (8080/8443). On first launch, the UI will allow initialization via the **Initial Configuration** setup page.
   * Temporary bootstrap login (before initialization):
     * Username: capstorm
     * Password: capstorm
5. Provide Environment Variables for Container Initialization
   * *Note*: Required Environment Variables are **BOLDED**.
   * *Note*: Required Salesforce Authenticator Environment Variables are *ITALICIZED.*

| Capstorm-platform environment variable | Description                                                                                                                                                                                            |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **DB\_CONNECTION\_STRING**             | The connection string to the target database. This database will be used as the backing store for container configuration.                                                                             |
| **DB\_USERNAME**                       | The Database User for the CapStorm container database.                                                                                                                                                 |
| **DB\_PASSWORD**                       | The Database Password for the CapStorm container database user.                                                                                                                                        |
| **CUSTOMER\_KEY**                      | CapStorm Customer Key. Provided by CapStorm team members.                                                                                                                                              |
| **ADMIN\_PASSWORD**                    | Default CapStorm/Container administrator password. This parameter can be used to initialize the password for the ‘admin’ user – if the admin user is already initialized this parameter has no effect. |
| *EXTERNAL\_AUTHENTICATOR*              | A name for the Salesforce OIDC External Authenticator – usually “Salesforce”.                                                                                                                          |
| *OIDC\_ISSUER\_URL*                    | Provide the complete URL of your Salesforce instance for user authentication.                                                                                                                          |
| *OIDC\_ADMIN\_USERNAME*                | Provide the Salesforce username that will be granted administrator permissions for the CapStorm platform app.                                                                                          |
| *OIDC\_CLIENT\_ID*                     | CONSUMER\_KEY value obtained in Prerequisite – Salesforce Authenticator step.                                                                                                                          |
| *OIDC\_CLIENT\_SECRET*                 | CONSUMER\_SECRET value obtained in Prerequisite – Salesforce Authenticator step.                                                                                                                       |

After providing all previously mentioned environment variables, the image is ready to launch. Click the *Run* button to start the container.

The screenshot below is an example of an image launch:

![](https://495509274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDAPx1zE2IARmzGMaHbAx%2Fuploads%2Fgit-blob-a3aa17e90dd4a22269d2e113f7acab0c42a63b75%2F2208d696-Screenshot-2024-01-09-at-2.14.06-PM.png?alt=media)

## 3: Wait 5 minutes for the container initialization process.

*Note*: The container bootstrapping **process is completed** once you see the following message in the Container Logs:

> ***CopyStormDirector is waiting for 0 jobs to complete.***

*Note:* The following message will be displayed in the Container Logs if there are **issues establishing a connection with the Database**:

> ***Exception in thread “main” java.lang.Exception: Cannot connect to database.***
>
> ***at com.capstorm.platform.configuration.webconfig.a.b(SourceFile:260) at com.capstorm.platform.environmentinitializer.EnvironmentInitializer.c(SourceFile:175) at com.capstorm.platform.environmentinitializer.EnvironmentInitializer.b(SourceFile:415) at com.capstorm.platform.environmentinitializer.EnvironmentInitializer.main(SourceFile:441)***

*Note:* The following message will be displayed if there were any **issues bootstrapping the CapStorm/Container**:

> ***Error running scheduled CopyStorm/Director jobs***

## 4: Navigate to the CapStorm/Container Web Application

1. In a Web Browser, navigate to <https://localhost:8080> or <http://localhost:8080/>
2. You will see the following screen:![](https://495509274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDAPx1zE2IARmzGMaHbAx%2Fuploads%2Fgit-blob-990cac67e624c3b7b241ae06d461b64f23b96042%2Fc63e0545-Screenshot-2024-01-09-at-9.51.11-AM.png?alt=media)
3. **If you did NOT provide initialization environment variables:** log in with the temporary bootstrap credentials capstorm / capstorm, then click **“Click Here for Initial Configuration”** and complete the setup wizard (Customer Key, Admin Password, database connection, etc.).
4. **If you DID provide initialization environment variables (including ADMIN\_PASSWORD):** log in as:
   1. Username: **admin**
   2. Password: Value of ADMIN\_PASSWORD environment variable from *Step (2)*
5. Upon successful login, you’ll see the CapStorm/Container Web UI:

![](https://495509274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDAPx1zE2IARmzGMaHbAx%2Fuploads%2Fgit-blob-9a616110ac5423101e1eb548b0c35484a57bbe10%2F784b24f5-Container-Home-Page-No-Jobs-1.png?alt=media)

## 5: Start using the CapStorm Container!

Please refer to the Reference Documentation for the CapStorm/Container and core CapStorm Applications:

* [CapStorm/Container Reference](/capstorm-container/reference.md)
* [CopyStorm Reference](https://learn.capstorm.com/copystorm/)
  * Backup Salesforce to a Relational Database
* [CopyStorm/Director Reference](https://learn.capstorm.com/copystorm-director/)
  * Schedule CopyStorm Jobs
* [CopyStorm/Medic Reference](https://learn.capstorm.com/copystorm/readme/reference/copystorm-medic)
  * Validate, Maintain, & Repair CopyStorm Databases
* [CopyStorm/Restore Reference](https://learn.capstorm.com/copystorm-restore/)
  * Push Data from a CopyStorm Database to Salesforce
