Skip to content

Installation Guide

This guide covers installing and configuring the Tiptree Platform API for both local development and production deployment.

  • Python 3.11 or higher
  • Docker and Docker Compose (for local development)
  • PostgreSQL 15+ (for production)
Terminal window
git clone https://github.com/tiptreesystems/platform-api.git
cd platform-api

We use Poetry for dependency management:

Terminal window
# Install Poetry if you haven't already
curl -sSL https://install.python-poetry.org | python3 -
# Install dependencies
poetry install

Copy the example environment file:

Terminal window
cp .env.example .env

Edit .env with your configuration:

DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/platform
API_KEY_SALT=your-secret-salt
DEBUG=true

Using Docker Compose:

Terminal window
docker-compose up -d

This will start:

  • PostgreSQL database
  • Development API server
  • Development tools
Terminal window
poetry run alembic upgrade head
Terminal window
poetry run uvicorn platform_api.main:app --reload

The API will be available at http://localhost:8000

  • Linux server with Python 3.11+
  • PostgreSQL 15+
  • Nginx (recommended)
Terminal window
# Install system dependencies
apt-get update && apt-get install -y python3-pip postgresql-client
# Install the package
pip install platform-api

Set up the following environment variables:

Terminal window
export DATABASE_URL=postgresql+asyncpg://user:password@host:5432/platform
export API_KEY_SALT=your-production-salt
export DEBUG=false
Terminal window
# Run migrations
platform-api db upgrade

We recommend using Gunicorn with Uvicorn workers:

Terminal window
gunicorn platform_api.main:app -w 4 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000

We provide an official Docker image:

Terminal window
docker pull tiptreesystems/platform-api:latest
docker run -d \
--name platform-api \
-p 8000:8000 \
-e DATABASE_URL=postgresql+asyncpg://user:password@host:5432/platform \
-e API_KEY_SALT=your-production-salt \
tiptreesystems/platform-api:latest