Deploy wilayah-id on your own infrastructure for unlimited access, zero rate limits, and complete data privacy.
Recommended for most users
App server + PostgreSQL via Docker Compose. Load data via SQL dump after setup.
Docker 20+ and Docker Compose 2+ must be installed.
docker --version docker compose version
No need to clone the entire repo. Just download the compose file.
mkdir wilayah-id && cd wilayah-id curl -O https://raw.githubusercontent.com/dhanyyudi/wilayah-id/main/docker-compose.yml
This will download the pre-built image with data already loaded.
docker compose up -d # Wait for services to be ready (~30 seconds) docker compose logs -f app
curl http://localhost:3000/api/v1/regions/provinces
# Expected: {"status":"success","data":[...],"meta":{"total":38}}.env.local file with these settings# Required - PostgreSQL connection DATABASE_URL=postgresql://username:password@localhost:5432/wilayah_id # Optional - Custom tile server URL (default: /tiles) NEXT_PUBLIC_TILES_BASE_URL=/tiles # Optional - API rate limiting (self-hosted = unlimited) # RATE_LIMIT_REQUESTS=1000 # RATE_LIMIT_WINDOW=60000
Data sourced from official Indonesian government records:
Q: Database connection failed?
A: Ensure PostgreSQL is running and accessible. Check DATABASE_URL format: postgresql://user:pass@host:port/dbname
Q: PostGIS extension not found?
A: Install PostGIS: sudo apt-get install postgis (Ubuntu/Debian) or brew install postgis (macOS)
Q: Vector tiles not loading?
A: Check that tiles were generated in public/tiles/ directory. Run python etl/generate_tiles.py if missing.
Q: How to update data?
A: For Docker: pull latest image. For SQL: download new dump and restore. For source: re-run ETL pipeline.