You can also use managed services like Supabase for PostgreSQL and Upstash for Redis instead of Docker.
Set up OFFER-HUB Orchestrator locally with Node.js, PostgreSQL, and Redis.
This guide walks you through setting up the OFFER-HUB Orchestrator for local development. You can also use the SDK without running your own instance - see Using the SDK below.
Before you begin, make sure you have:
git clone https://github.com/OFFER-HUB/OFFER-HUB-Orchestrator.git && cd OFFER-HUB-Orchestratornpm installStart PostgreSQL and Redis using Docker Compose:
docker compose up -dThis starts:
54326379Copy the example environment file:
cp .env.example .envEdit .env with your values. The minimum required variables for local development:
Generate your WALLET_ENCRYPTION_KEY with: openssl rand -hex 32
Store this key securely - losing it makes wallet private keys unrecoverable.
Generate the Prisma client and apply migrations:
npm run prisma:generate && npm run prisma:migrateCreate the internal platform user required for escrow operations:
npm run bootstrapnpm run devThe API starts on http://localhost:4000.
Test that everything is working:
curl http://localhost:4000/api/v1/healthYou should see:
If you want to integrate with an existing OFFER-HUB Orchestrator instance (hosted by you or a partner), you only need the SDK:
npm install @offerhub/sdkThen configure it in your code:
See the SDK Guide for complete documentation.
The installer script npm create offer-hub-orchestrator@latest is coming soon and will automate this entire setup process.
Once the server is running, create an API key using your master key:
Response:
Save the key value immediately - it's only shown once. Use this key for all subsequent API calls.
Make sure Docker is running and the containers are up:
docker compose psIf containers aren't running, start them:
docker compose up -dIf you see migration errors, try resetting the database:
npm run prisma:migrate resetThis deletes all data. Only use in development.
If port 4000 is already in use, change the PORT in your .env file or stop the conflicting service.