Skip to main content
Version: Next

Getting Started

This guide will help you quickly get the Anchor Platform with a business reference running locally using Docker Compose.

Please note that this is not meant to be run in production.

Prerequisites

Quick Start

1. Clone the Anchor Platform repository

git clone https://github.com/stellar/anchor-platform

2. Navigate to the quick-run directory

cd anchor-platform/quick-run

3. Start all services

./ap_start.sh

4. Verify the platform is running

Wait a few moments for services to initialize, then verify the platform is responding:

curl http://localhost:8080/.well-known/stellar.toml

You should see the Stellar TOML configuration file returned.

5. Check service status

docker-compose ps

All services should show as "Up" in the status column.

What's Included

The quick-run setup includes:

  • docker-compose.yaml - Complete service definitions with all dependencies
  • dev.env - Pre-configured environment variables
  • config/ - Required configuration files:
    • assets.yaml - Asset definitions
    • clients.yaml - Client configurations
    • reference-config.yaml - Reference server settings
    • stellar.localhost.toml - SEP-1 TOML file

Testing with Stellar Demo Wallet

You can test the Anchor Platform using the Stellar Demo Wallet:

  1. Open the Stellar Demo Wallet in your browser.
  2. Click on "Generate keypair for new account (testnet only)" button.
  3. Click on the "Create Account" button next to the PUBLIC key.
  4. You should now see XLM available under the Balances section, indicating your account is loaded.
  5. Click on "Add home domain" and enter the following URL:
    http://localhost:8080
    This connects the demo wallet to your local Anchor Platform instance running on port 8080.
  6. You should now be able to perform SEP transactions (deposits, withdrawals, etc.) with your local Anchor Platform instance.

Customizing Configuration

To modify settings:

  1. Edit dev.env for environment variables
  2. Edit files in config/ for service-specific configurations
  3. Restart services: docker-compose restart

Stopping Services

To stop all services:

docker-compose down

How to implement your business callback server

Once you have the Anchor Platform running, you can replace the reference server with your own business callback server implementation. This allows you to implement your own business logic for handling deposits, withdrawals, and other anchor operations.

1. Shutdown the reference business server

After the Anchor Platform is started and running, stop the reference server service:

docker-compose stop reference-server

This stops the reference server while keeping the Anchor Platform and other services running. The platform will continue to operate, but it will no longer receive callbacks from the reference server.

2. Implement and run your own reference server

Implement your own callback server that implements the Anchor Platform callback API.

You can use the kotlin-reference-server as a reference implementation to understand the required endpoints and data structures.

Ensure your callback server is accessible at http://localhost:8091 (or the configured endpoint) and that the Anchor Platform can reach it.

Your server should:

  • Listen on port 8091 (or configure the platform to use a different port)
  • Implement the required callback endpoints as specified in the Anchor Platform API documentation
  • Handle business logic for:
    • Fee calculation
    • Exchange rate determination
    • Transaction status updates
    • Customer information (KYC) management
    • Deposit and withdrawal processing

3. Test your integration using the demo wallet

Follow the steps described in the Testing with Stellar Demo Wallet section above, and verify that your server correctly handles deposit, withdrawal, and other SEP operations initiated from the wallet.