Installation
This guide will walk you through installing and setting up Pillow on your local machine or server.
Prerequisites
Section titled “Prerequisites”Before installing Pillow, ensure you have the following installed:
Required Software
Section titled “Required Software”-
Go 1.24.9+ - Required for the Mill API service
- Download from golang.org
- Verify:
go version
-
Node.js 20+ - Required for Pillow App and documentation
- Download from nodejs.org
- Verify:
node --versionandnpm --version
-
Git - For cloning the repository
- Download from git-scm.com
- Verify:
git --version
Container Runtime (Optional but Recommended)
Section titled “Container Runtime (Optional but Recommended)”Choose one:
- Podman (preferred) - Container runtime that runs in containers
- Installation: podman.io/getting-started/installation
- Verify:
podman --version
- Docker - Alternative container runtime
- Installation: docs.docker.com/get-docker
- Verify:
docker --version
System Requirements
Section titled “System Requirements”- 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 and accessing remote database
Installation Steps
Section titled “Installation Steps”Step 1: Clone the Repository
Section titled “Step 1: Clone the Repository”git clone https://github.com/maxkferg/pillow.gitcd pillowStep 2: Install All Dependencies
Section titled “Step 2: Install All Dependencies”From the repository root, run:
npm run install:allThis single command installs everything you need:
- Root-level npm dependencies (Turborepo)
- Go modules for Mill, Harvesters, and Geocoding services
- npm packages for Pillow App and Docs
- Development tools (golangci-lint, air, etc.)
Step 3: Configure Environment Variables
Section titled “Step 3: Configure Environment Variables”Copy and edit the environment files:
# Mill API configurationcp mill/config/.env.example mill/config/.env
# Pillow App configurationcp pillow-app/.env.example pillow-app/.env.localEdit mill/config/.env with your database credentials:
# Database (remote at db.voltdata.io)DATABASE_HOST=db.voltdata.ioDATABASE_PORT=9030DATABASE_USER=your_userDATABASE_PASSWORD=your_passwordDATABASE_NAME=mill
# Redis (local)REDIS_URL=redis://localhost:6379
# API ConfigurationAPI_PORT=4000JWT_SECRET=your-jwt-secret-change-this-in-productionLOG_LEVEL=infoThe pillow-app/.env.local file should already have the correct defaults, but verify:
NEXT_PUBLIC_MILL_API=http://localhost:4000MILL_API=http://localhost:4000Note: The database is hosted remotely at db.voltdata.io, so no local database setup is required.
Step 4: Start Infrastructure Services
Section titled “Step 4: Start Infrastructure Services”Start Redis using the npm script:
npm run infraThis starts Redis in the background. To stop it later, use npm run infra:stop.
Step 5: Start Development Servers
Section titled “Step 5: Start Development Servers”Start all services in development mode:
npm run devThis starts:
- Mill API on port 4000
- Pillow App on port 3000
- Documentation on port 4321
Step 6: Verify Installation
Section titled “Step 6: Verify Installation”Test that all services are running:
# Check API healthcurl http://localhost:4000/health
# Check frontendcurl http://localhost:3000Post-Installation Setup
Section titled “Post-Installation Setup”1. Create API Tokens
Section titled “1. Create API Tokens”Create tokens for API access and harvester submissions:
# Create a service tokencurl -X POST http://localhost:4000/admin/tokens/service \ -H "Content-Type: application/json" \ -d '{ "service_name": "my-service", "source": "my-source", "roles": ["harvester"] }'Save the token from the response for use in API requests.
2. Test the Installation
Section titled “2. Test the Installation”Run a simple property search:
# Search for propertiescurl "http://localhost:4000/api/v1/properties?limit=5"
# Get property statisticscurl "http://localhost:4000/api/v1/properties/stats"3. Access the Applications
Section titled “3. Access the Applications”- Pillow App (Frontend): http://localhost:3000
- Mill API: http://localhost:4000
- OpenAPI Documentation: http://localhost:4000/swagger/index.html
- API Health Check: http://localhost:4000/health
- Documentation Site: http://localhost:4321
Optional: Libpostal Geocoding Service
Section titled “Optional: Libpostal Geocoding Service”For enhanced address parsing, you can set up libpostal:
Using Docker/Podman
Section titled “Using Docker/Podman”# Start libpostal servicepodman run -d -p 4400:4400 --name libpostal \ pillow/libpostal-service:latest
# Or with Dockerdocker run -d -p 4400:4400 --name libpostal \ pillow/libpostal-service:latestConfigure Mill to Use Libpostal
Section titled “Configure Mill to Use Libpostal”Add to mill/config/.env:
MILL_LIBPOSTAL_HOST=localhostMILL_LIBPOSTAL_PORT=4400Restart the Mill API to enable libpostal integration.
Troubleshooting
Section titled “Troubleshooting”Port Conflicts
Section titled “Port Conflicts”If ports 3000, 4000, or 4321 are already in use, update the configuration:
- Mill API: Change
API_PORTinmill/config/.env - Pillow App: Change
PORTinpillow-app/.env.local - Documentation: Change port in
docs/astro.config.mjs
Database Connection Issues
Section titled “Database Connection Issues”The database is hosted remotely. If you have connection issues:
# Test connectivityping db.voltdata.io
# Check DNS resolutionnslookup db.voltdata.io
# Verify credentials in mill/config/.env# Check firewall/network settingsGo Module Issues
Section titled “Go Module Issues”If Go modules fail to download:
# Set Go proxy (if behind firewall)export GOPROXY=https://proxy.golang.org,direct
# Clear module cachego clean -modcache
# Re-download modulesgo mod downloadnpm Installation Issues
Section titled “npm Installation Issues”If npm packages fail to install:
# Clear npm cachenpm cache clean --force
# Reinstall all dependenciesnpm run install:allMemory Issues
Section titled “Memory Issues”If you run out of memory:
- Increase container memory limits (8GB+ recommended)
- Run services individually:
turbo run dev --filter=mill
Verification Checklist
Section titled “Verification Checklist”After installation, verify:
- All prerequisites installed (Go, Node.js, Git)
- Dependencies installed (
npm run install:all) - Environment variables configured
- Infrastructure running (
npm run infra) - Development servers started (
npm run dev) - Mill API responding (
curl http://localhost:4000/health) - Pillow App accessible (
curl http://localhost:3000)
Next Steps
Section titled “Next Steps”Now that Pillow is installed:
- Quick Start Guide - Get up and running quickly
- Configuration Guide - Detailed configuration options
- API Documentation - Learn about API endpoints
- Creating a Harvester - Build your first data collector
Getting Help
Section titled “Getting Help”If you encounter issues during installation:
- 📖 Check the Quick Start Guide for common solutions
- 🐛 Report bugs on GitHub
- 💬 Ask questions in discussions
- 📧 Contact support: support@garagejs.com
Production Installation
Section titled “Production 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