Skip to content

Installation

This guide will walk you through installing and setting up Pillow on your local machine or server.

Before installing Pillow, ensure you have the following installed:

  • Go 1.24+ — Required for Mill API and Connectors
  • Node.js 22+ — Required for Pillow App and Docs
    • Download from nodejs.org
    • Verify: node --version and npm --version
  • Docker with Docker Compose — Required for local infrastructure
  • Git — For cloning the repository
  • Operating System: Linux, macOS, or Windows (with WSL2)
  • Memory: 8GB RAM minimum (16GB recommended)
  • Disk Space: 5GB free space
  • Network: Internet connection for downloading dependencies
Terminal window
git clone https://github.com/maxkferg/pillow.git
cd pillow

From the repository root, run:

Terminal window
npm run install:all

This single command installs everything you need:

  • Root-level npm dependencies (Turborepo)
  • Go modules for Mill, Connectors, and Geocoding services
  • npm packages for Pillow App and Docs
  • Development tools (golangci-lint, air, etc.)

The default configuration works out of the box for local development. The Mill reads from mill/config/config-local.yaml and the Pillow App uses sensible defaults.

If you need to customize the Pillow App configuration:

Terminal window
cp pillow-app/.env.example pillow-app/.env.local

Verify the defaults:

Terminal window
NEXT_PUBLIC_MILL_API=http://localhost:4000
MILL_API=http://localhost:4000

Start PostgreSQL, Redis, and Redpanda using Docker Compose:

Terminal window
docker compose -f docker-compose.dev.yml up -d

To stop infrastructure later:

Terminal window
docker compose -f docker-compose.dev.yml down

Start all services in development mode:

Terminal window
npm run dev

This starts:

  • Mill API on port 4000
  • Pillow App on port 3000
  • Documentation on port 4321

Test that all services are running:

Terminal window
# Check API health
curl http://localhost:4000/health
# Check frontend
curl http://localhost:3000

Create tokens for API access and connector submissions:

Terminal window
# Create a service token
curl -X POST http://localhost:4000/admin/tokens/service \
-H "Content-Type: application/json" \
-d '{
"service_name": "my-service",
"source": "my-source",
"roles": ["connector"]
}'

Save the token from the response for use in API requests.

Run a simple property search:

Terminal window
# Search for properties
curl "http://localhost:4000/api/v1/properties?limit=5"
# Get property statistics
curl "http://localhost:4000/api/v1/properties/stats"

For enhanced address parsing, you can set up libpostal:

Terminal window
# Start libpostal service
docker run -d -p 4400:4400 --name libpostal \
pillow/libpostal-service:latest

Add to mill/config/.env:

Terminal window
MILL_LIBPOSTAL_HOST=localhost
MILL_LIBPOSTAL_PORT=4400

Restart the Mill API to enable libpostal integration.

If ports 3000, 4000, or 4321 are already in use, update the configuration:

  • Mill API: Change API_PORT in mill/config/.env
  • Pillow App: Change PORT in pillow-app/.env.local
  • Documentation: Change port in docs/astro.config.mjs

PostgreSQL runs locally via Docker. If you have connection issues:

Terminal window
# Check the container is running
docker compose -f docker-compose.dev.yml ps
# Restart PostgreSQL
docker compose -f docker-compose.dev.yml restart postgres
# Check logs
docker compose -f docker-compose.dev.yml logs postgres
# Test connectivity
psql -h localhost -U pillow -d pillow -c "SELECT 1"

If Go modules fail to download:

Terminal window
# Set Go proxy (if behind firewall)
export GOPROXY=https://proxy.golang.org,direct
# Clear module cache
go clean -modcache
# Re-download modules
go mod download

If npm packages fail to install:

Terminal window
# Clear npm cache
npm cache clean --force
# Reinstall all dependencies
npm run install:all

If you run out of memory:

  • Increase container memory limits (8GB+ recommended)
  • Run services individually: turbo run dev --filter=mill

After installation, verify:

  • All prerequisites installed (Go 1.24+, Node.js 22+, Docker, Git)
  • Dependencies installed (npm run install:all)
  • Infrastructure running (docker compose -f docker-compose.dev.yml up -d)
  • Development servers started (npm run dev)
  • Mill API responding (curl http://localhost:4000/health)
  • Pillow App accessible (curl http://localhost:3000)

Now that Pillow is installed:

  1. Quick Start Guide - Get up and running quickly
  2. Configuration Guide - Detailed configuration options
  3. API Documentation - Learn about API endpoints
  4. Creating a Connector - Build your first data collector

If you encounter issues during installation:

For production deployments, see the Deployment Guide which covers:

  • Docker container deployment
  • Kubernetes orchestration
  • Cloud platform setup (GCP, AWS, Azure)
  • Environment configuration
  • Security best practices
  • Monitoring and logging