> For the complete documentation index, see [llms.txt](https://docs.b2ihealthcare.com/authoring-platform-admin-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.b2ihealthcare.com/authoring-platform-admin-guide/configuration/spin-up-the-service.md).

# Spin up the service

Full list of steps to perform before spinning up the service:

1. Extract the Authoring Platform release archive to a folder. E.g. `/opt/snow-owl`

2. (Optional) Obtain an SSL certificate

   1. Make sure a DNS A record is routed to the host's public IP address
   2. Go into the folder `./snow-owl/docker/cert`
   3. Execute the `./init-certificate.sh` script:

   ```
   ./init-certificate.sh -d snow-owl.example.com
   ```

3. (Optional) Configure access for managed Elasticsearch Cluster (elastic.co)

4. (Optional) Extract dataset to `./snow-owl/resources` where folder structure should look like `./snow-owl/resources/indexes/nodes/0` at the end.

5. Verify file ownership to be UID=1000 and GID=0:

   ```
   chmod -R 1000:0 ./snow-owl/docker ./snow-owl/logs ./snow-owl/resources
   ```

6. Check any credentials or settings that need to be changed in `./snow-owl/docker/.env`

7. Make sure the hostname is configured properly in the environment file. This is important for being able to reach Bugzilla through a web browser.

8. Authenticate with our private docker registry while in the folder `./snow-owl/docker`:

   ```
   cat docker_login.txt | docker login -u <username> --password-stdin https://docker.b2i.sg
   ```

9. Issue a pull (in folder `./snow-owl/docker`)

   ```
   docker-compose pull
   ```

10. Spin up the service (in the folder `./snow-owl/docker`)

    ```
    docker-compose up -d
    ```

11. Verify that the REST API of the Terminology Server is available at:
    1. With SSL: `https://snow-owl.example.com/snowowl`
    2. Without SSL: `http://hostname:8080/snowowl`

12. Verify that the server and cluster status is GREEN by querying the following REST API endpoint:
    1. With SSL:

       ```
       curl https://snow-owl.example.com/snowowl/info
       ```
    2. Without SSL:

       ```
       curl http://hostname:8080/snowowl/info
       ```

13. Verify that Bugzilla's web UI is available at:
    1. With SSL:

       ```
       curl https://snow-owl.example.com/bugzilla
       ```
    2. Without SSL:

       ```
       curl http://hostname:8080/bugzilla
       ```

14. Enjoy using the Snow Owl Authoring Platform :tada:
