---
title: "Start the database, Voyager, and the application"
description: "Set up a local Aerospike DB with Docker, connect Voyager, and run the Spring Boot retail app for Java SDK tutorial."
---

# Start the database, Voyager, and the application

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

In this step you start a local Aerospike Database, connect Aerospike Voyager to it, and launch the Spring Boot retail application that you implement throughout the rest of this tutorial. By the end of this step you have all three processes running and you can confirm, using both the Spring Boot logs and Voyager, that the database is reachable but that the application’s data-access methods do not yet write to the database.

This step assumes you have completed the tutorial prerequisites: Docker, JDK 21, Maven, and Voyager are installed, and the workshop repository is cloned.

## Start the local Aerospike Database

The sample application’s `docker-compose.yml` starts a single-node Aerospike Database in a container named `aerospike-workshop` and exposes the client port on `localhost:3000`.

1.  From the `aerospike-client-sdk-workshop` repository root, start the database in detached mode.
    
    Terminal window
    
    ```shell
    docker compose up -d
    ```
    
    ```plaintext
    [+] Running 3/3
    
     ✔ Network aerospike-client-sdk-workshop_default          Created    0.0s
    
     ✔ Volume "aerospike-client-sdk-workshop_aerospike-data"  Created    0.0s
    
     ✔ Container aerospike-workshop                           Started    0.2s
    ```
    
    Example response
    
    Docker Compose redraws the progress block several times while it brings the network, volume, and container up. The final block, with `Started` next to `aerospike-workshop`, indicates that startup succeeded.
    
    ::: note
    On older Docker installs the command is `docker-compose up -d` (with a hyphen) instead of `docker compose up -d`.
    :::
    
2.  Confirm the container is running and reports a healthy status.
    
    Terminal window
    
    ```shell
    docker ps --filter name=aerospike-workshop
    ```
    
    ```plaintext
    CONTAINER ID   IMAGE                                STATUS                    PORTS                              NAMES
    
    c9318d9eb3e3   aerospike/aerospike-server:latest    Up 10 seconds (healthy)   0.0.0.0:3000-3003->3000-3003/tcp   aerospike-workshop
    ```
    
    Example response
    
    The container reports `Up` with a `(healthy)` annotation and exposes ports `3000` to `3003`. If the container is not present, run `docker compose logs aerospike-workshop` to see why startup failed.
    

## Launch Voyager and connect to the cluster

Voyager opens with three columns: a left-hand toolbar that switches between data, cluster management, MCP, and settings views; a middle column that lists known clusters; and a right-hand column that shows details for the selected cluster.

1.  Launch Voyager.
    
     ![Voyager main window with three columns: left-hand toolbar, middle cluster list, and right-hand cluster details panel](https://aerospike.com/docs/_astro/voyager-main-window.DYqIelTb_1xtH83.png)
2.  In the cluster list (middle column), select **Connect cluster**.
    
3.  Enter the connection details for the local Docker cluster.
    
    The Docker container starts with security and TLS disabled, so the only fields you need to set are the cluster name, seed host, and port. Use the values shown in the **Connect cluster** dialog:
    
    | Field | Value |
    | --- | --- |
    | Name | `Retail Demo` (or any name you prefer) |
    | Host | `localhost` |
    | Port | `3000` |
    | TLS | Off |
    | Username / Password | Leave blank |
    
     ![Voyager connect cluster dialog with name Retail Demo, host localhost, port 3000, and TLS disabled](https://aerospike.com/docs/_astro/voyager-connect-docker.MQfV7O4__1MWHNa.png)
4.  Select the **Connect** button.
    
    The new cluster appears in the cluster list with a green status indicator.
    
    ::: caution
    Connecting without TLS or credentials is appropriate for a local development cluster only. Do not use these settings for any non-local cluster.
    :::
    
5.  Select the cluster in the cluster list to open it.
    
    Voyager opens a tab named after the cluster and shows one namespace named `test` in the right-hand panel.
    
     ![Voyager showing the Retail Demo cluster open with the test namespace card in the right-hand panel](https://aerospike.com/docs/_astro/voyager-cluster-connected.CpjSJ0YR_TeTGu.png)
    
    The `test` namespace card reports `0 SETS` and `0` records because no data has been written to the database yet.
    

## Run the Spring Boot application

The Spring Boot application uses the `new-client` Maven profile, which selects the implementation class you edit in later steps (`KeyValueServiceNewClient`). The application listens on port `8080`, creates five secondary indexes, and auto-loads 200 records from the `data/` folder.

1.  Change into the `spring-server` directory.
    
    Terminal window
    
    ```shell
    cd spring-server
    ```
    
2.  Build the application, skipping tests.
    
    Terminal window
    
    ```shell
    mvn clean package -DskipTests
    ```
    
    ```plaintext
    [INFO] Scanning for projects...
    
    [INFO] Building Retail Demo Showing off the Aerospike Javak SDK 1.0.0
    
    [INFO] BUILD SUCCESS
    ```
    
    Example response
    
3.  Run the application with the `new-client` profile.
    
    Terminal window
    
    ```shell
    mvn spring-boot:run -Dspring-boot.run.profiles=new-client
    ```
    
    The application logs include several lines that confirm a successful startup:
    
    ```plaintext
    : Tomcat started on port 8080 (http) with context path '/'
    
    : Started RetailDemoApplication in N seconds (process running for N)
    
    : Created secondary index: article_idx on bin articleType
    
    : Created secondary index: subCat_idx on bin subCategory
    
    : Created secondary index: brand_idx on bin brandName
    
    : Created secondary index: usage_idx on bin usage
    
    : Created secondary index: cat_idx on bin category
    
    : Auto-loading sample data from /.../aerospike-client-sdk-workshop/data
    
    : Auto-load complete: LoadResult{total=200, success=200, errors=0, successRate=100.00%}
    ```
    
    Example response
    
    The auto-loader reports `total=200, success=200, errors=0`, which means the application called the stubbed data-access methods 200 times without throwing an exception.
    

## Confirm the empty state in the application UI and in Voyager

The `new-client` profile selects `KeyValueServiceNewClient`. The data-access methods in this class are stubbed out and return placeholder values, such as `Optional.empty()`. The auto-loader does not throw, so the log reports `success=200`, but no records reach the cluster. You implement these methods in the next section.

1.  Open the application in your browser at [http://localhost:8080](http://localhost:8080).
    
    The category dropdowns at the top render, but the home page itself shows an `Oops... looks like that page doesn't exist` error in place of the product grid.
    
     ![Spring Boot retail application showing the category dropdowns at the top and an Oops error page in place of the product grid](https://aerospike.com/docs/_astro/app-empty-home.CbAA62-p_leHDx.png)
2.  In the Spring Boot terminal, look at the recent log entries.
    
    Each request to the home page or the cart triggers a `java.util.NoSuchElementException: No value present` from inside `KeyValueServiceNewClient.query` and `KeyValueServiceNewClient.getCart`. This is expected: the stub implementations return `Optional.empty()` and the controllers call `.get()` on the result.
    
3.  Switch to Voyager and select **Refresh** in the cluster details panel.
    
    The `test` namespace card still reports `0 SETS`, which confirms that the stub methods never wrote a record to the cluster.
    
     ![Voyager showing the test namespace card with zero sets and zero records after the application has run](https://aerospike.com/docs/_astro/voyager-one-record.1lEj8CzS_9S7I3.png)

## Outcomes

You now have:

-   A single-node Aerospike Database running in Docker on `localhost:3000`.
-   Voyager connected to that database, with the `test` namespace visible.
-   The Spring Boot retail application running on `localhost:8080` with the `new-client` profile selected.

You **cannot** yet:

-   See products on the home page.
-   Filter products by category, article type, usage, or brand.
-   Add items to a shopping cart.

In the next section you implement the data-access methods that fill these gaps. Leave Voyager and the Spring Boot application running. You stop and rerun the Spring Boot app each time you change Java code. You can leave Voyager open and select **Refresh** after each change.

::: undefined
-   I’ve started the local Aerospike Database with Docker Compose.
-   I’ve connected Aerospike Voyager to the local cluster.
-   I’ve launched the Spring Boot retail application and confirmed it loaded 200 records.
-   I’ve confirmed the application UI shows no products until I add the database code.
:::

[Previous  
Prerequisites](https://aerospike.com/docs/database/learn/tutorials/get-started-with-aerospike-java-sdk-and-voyager/step/1/part/0/prerequisites) [Next  
Store and load products](https://aerospike.com/docs/database/learn/tutorials/get-started-with-aerospike-java-sdk-and-voyager/step/2/part/0/store-and-load-products)