Set Up Advanced Wallets Infrastructure (Testnet)

Set up advanced wallets in testnet, leveraging two instances of Express servers to manage your user and backup keys.

git clone git@github.com:BitGo/advanced-wallets.git
cd advanced-wallets
npm install
npm run build
TLS_MODE=disabled \
BITGO_ENV=test \
APP_MODE=advanced-wallet-manager \
ADVANCED_WALLET_MANAGER_PORT=3080 \
KMS_URL=http://localhost:3000 \
npm start
TLS_MODE=disabled \
BITGO_ENV=test \
APP_MODE=master-express \
MASTER_EXPRESS_PORT=3081 \
ADVANCED_WALLET_MANAGER_URL=http://localhost:3080 \
npm start
# Ping MBE
curl -X POST http://localhost:3081/advancedwallet/ping
# Test connection between MBE & AWM
curl -X POST http://localhost:3081/ping/advancedWalletManager
docker-compose down
Response
// 4. Start AWM
> @bitgo/advanced-wallets@2.0.0 start
> nodemon

[nodemon] 3.1.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): src/**/*.ts
[nodemon] watching extensions: ts
[nodemon] starting `npm run build && node ./bin/advanced-wallet-manager`

> @bitgo/advanced-wallets@2.0.0 build
> npm run tsc -- --build --incremental --verbose . && cp package.json dist/


> @bitgo/advanced-wallets@2.0.0 tsc
> tsc --build --incremental --verbose .

[4:54:36 PM] Projects in this build:
    * tsconfig.json

[4:54:36 PM] Project 'tsconfig.json' is up to date because newest input 'src/masterBitgoExpress/routers/sendManyRoute.ts' is older than output 'dist/tsconfig.tsbuildinfo'

2025-12-05 16:54:38:5438 info: Starting in Advanced Wallet Manager mode...
2025-12-05 16:54:38:5438 info: === Certificate Loading ===
2025-12-05 16:54:38:5438 info: ==========================
2025-12-05 16:54:38:5438 info: App is initializing
2025-12-05 16:54:38:5438 info: Log location: /Users/vivianmccarty/advanced-wallets/logs/http-access.log
2025-12-05 16:54:38:5438 info: Advanced Wallet Manager starting...
2025-12-05 16:54:38:5438 info: Base URI: http://localhost:3080
2025-12-05 16:54:38:5438 info: Port: 3080
2025-12-05 16:54:38:5438 info: Bind: localhost
2025-12-05 16:54:38:5438 info: key provider URL: http://localhost:3000
2025-12-05 16:54:38:5438 info: Recovery Mode: false
2025-12-05 16:54:38:5438 info: === mTLS Configuration ===
2025-12-05 16:54:38:5438 info: TLS Mode: disabled
2025-12-05 16:54:38:5438 info: ========================
2025-12-05 16:54:38:5438 info: Advanced Wallet Manager started successfully

// 5. Start MBE
> @bitgo/advanced-wallets@2.0.0 start
> nodemon

[nodemon] 3.1.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): src/**/*.ts
[nodemon] watching extensions: ts
[nodemon] starting `npm run build && node ./bin/advanced-wallet-manager`

> @bitgo/advanced-wallets@2.0.0 build
> npm run tsc -- --build --incremental --verbose . && cp package.json dist/


> @bitgo/advanced-wallets@2.0.0 tsc
> tsc --build --incremental --verbose .

[4:55:27 PM] Projects in this build:
    * tsconfig.json

[4:55:27 PM] Project 'tsconfig.json' is up to date because newest input 'src/masterBitgoExpress/routers/sendManyRoute.ts' is older than output 'dist/tsconfig.tsbuildinfo'

2025-12-05 16:55:28:5528 info: Starting in Master Express mode...
2025-12-05 16:55:28:5528 info: === Certificate Loading ===
2025-12-05 16:55:28:5528 info: ==========================
2025-12-05 16:55:28:5528 info: Master express app is initializing
2025-12-05 16:55:28:5528 info: Log location: /Users/vivianmccarty/advanced-wallets/logs/http-access.log
2025-12-05 16:55:28:5528 info:  AWM Client initialized with URL: http://localhost:3080
2025-12-05 16:55:28:5528 info: Master Express server starting...
2025-12-05 16:55:28:5528 info: Base URI: http://localhost:3081
2025-12-05 16:55:28:5528 info: Port: 3081
2025-12-05 16:55:28:5528 info: Bind: localhost
2025-12-05 16:55:28:5528 info: Recovery Mode: false
2025-12-05 16:55:28:5528 info: Advanced Wallet Manager URL: http://localhost:3080
2025-12-05 16:55:28:5528 info: === mTLS Configuration ===
2025-12-05 16:55:28:5528 info: TLS Mode: disabled
2025-12-05 16:55:28:5528 info: ========================
2025-12-05 16:55:28:5528 info: Master Express server started successfully

// 6. Test Connections
# Test MBE
{"status":"master express server is ok!","timestamp":"2025-12-05T22:59:54.738Z"}

# Test connection between MBE & AWM
{"status":"Successfully pinged advanced wallet manager","awmResponse":{"status":"advanced wallet manager server is ok!","timestamp":"2025-12-05T23:00:57.970Z"}}

// 7. Stop Services
Stopping master-bitgo-express    ... done
Stopping advanced-wallet-manager ... done
Removing master-bitgo-express    ... done
Removing advanced-wallet-manager ... done
Removing network advanced-wallets_my-internal-network
Removing network advanced-wallets_my-public-network