You can run Flexprice on your own infrastructure in several ways. We organize self-hosting by provider so you can pick the option that fits your environment and add more providers over time.Documentation Index
Fetch the complete documentation index at: https://docs.flexprice.io/llms.txt
Use this file to discover all available pages before exploring further.
Self-hosting options
Docker Compose
Run Flexprice locally or on a single server with Docker Compose. Best for development and small deployments.
AWS
Deploy Flexprice on AWS with ECS, RDS, MSK, and EKS. Production-ready, scalable setup.
Docker Compose
The fastest way to run Flexprice on your own machine or a single server is with Docker Compose.Prerequisites
Before you begin, make sure you have the following installed:Golang 1.23+
Docker and Docker Compose (Docker Desktop, OrbStack, or Podman Desktop all work)
make (pre-installed on macOS/Linux; on Windows use WSL or install via chocolatey)One of these supported platforms:
- Linux-based environment
- macOS (Darwin)
- WSL under Windows
You do not need
psql, kafka-cli, or any other database client installed locally.
All database operations run inside Docker containers via docker compose exec.Quick Setup with Docker Compose
The easiest way to get started is using our automated setup command:Default API Key
After setup, use the following key to authenticate local API requests:x-api-key request header:
The key is pre-configured in
internal/config/config.yaml. Entity tables are created
entirely by the Ent ORM layer — the Postgres migration files only bootstrap schemas,
extensions, and stored functions.Accessing Services
Once setup is complete, you can access:The Kafka UI requires the
dev profile:Useful Commands
Here are some common commands you might need during development:Restart Flexprice Services (keep infrastructure running)
Restart Flexprice Services (keep infrastructure running)
Stop All Services
Stop All Services
Full Clean Start (destroys all data volumes)
Full Clean Start (destroys all data volumes)
Rebuild and Restart Only Flexprice Services
Rebuild and Restart Only Flexprice Services
Re-run Seed Data (idempotent)
Re-run Seed Data (idempotent)
Running Without Docker (API only)
If you prefer to run the application binary directly while keeping infrastructure in Docker:Connection Details
Use these credentials to connect to the various services:PostgreSQL
PostgreSQL
- Host: localhost
- Port: 5432
- Database: flexprice
- Username: flexprice
- Password: flexprice123
ClickHouse
ClickHouse
- Host: localhost
- Port: 9000 (native) / 8123 (HTTP)
- Database: flexprice
- Username: flexprice
- Password: flexprice123
Kafka
Kafka
- Bootstrap Server: localhost:29092
- UI: http://localhost:8084 (requires
--profile dev)
API Documentation
Flexprice provides comprehensive API documentation in OpenAPI 3.0 format.Setting up Postman
- Open Postman
- Click on Import in the top left
- Select Import File
- Choose
docs/swagger/swagger-3-0.json - Click Import
- Create a new environment for local development:
Variable Value baseUrlhttp://localhost:8080/v1apiKeysk_local_flexprice_test_key
x-api-key: {{apiKey}} as a header on every request.
Troubleshooting
If you encounter issues during setup or operation, try these troubleshooting steps:Port 8080 already in use
Port 8080 already in use
Another process (e.g. a previously running local Flexprice binary) may be bound to port 8080
and intercepting requests before Docker’s port mapping.Then restart the API container:
401 Unauthorized on all API calls
401 Unauthorized on all API calls
Redis connection refused (log warning)
Redis connection refused (log warning)
You may see log lines like:This is non-fatal for local development. Redis is optional — it powers response caching,
which falls back gracefully when unavailable. The API continues to work normally.
Database schema errors on fresh start
Database schema errors on fresh start
All entity tables (
customers, plans, subscriptions, etc.) are managed exclusively by the
Ent ORM migration layer. The Postgres migration files (migrations/postgres/) only create:- Schemas and the
uuid-osspextension (V0__init.sql) - Stored functions for invoice/billing sequences (
V2_invoice_sequences.up.sql)
relation does not exist errors, ensure you ran make migrate-ent after starting
Postgres:Docker Issues
Docker Issues
- Ensure Docker is running properly:
- Check the status of all containers:
- View logs for a specific service:
- If containers are in a bad state, do a full clean restart:
Kafka Issues
Kafka Issues
- Verify Kafka is running:
- Check that all required topics exist:
- Re-initialize topics if any are missing:
ClickHouse migration errors
ClickHouse migration errors
ClickHouse migrations use standard
MergeTree engine for local/single-node compatibility.
If you see engine-related errors, ensure you are running the open-source ClickHouse image
(not ClickHouse Cloud) as specified in docker-compose.yml.To re-run ClickHouse migrations:Need Help?
If you’re still experiencing issues after trying the troubleshooting steps, please:- Check our GitHub Issues for similar problems
- Join our Slack community for real-time support
- Contact us at support@flexprice.io
Additional Resources
Contribution Guidelines
Learn how to contribute to Flexprice
API Documentation
Explore our API documentation
Code of Conduct
Our community guidelines
Flexprice Website
Visit our official website

