Set up a local environment to run Honcho for development, testing, or self-hosting
This guide helps you set up a local environment to run Honcho for development, testing, or self-hosting.
By the end of this guide, you’ll have:
Before you begin, ensure you have the following installed:
pip install uv
(manages Python installations automatically)You’ll need a PostgreSQL database with the pgvector extension. Choose one:
The easiest way to get started is using Docker Compose, which handles both the database and Honcho server.
Copy the example environment file and configure it:
Edit .env
and set your API keys (if using LLM features):
Check that both services are running:
Test the Honcho API:
You should see a response indicating the service is healthy.
For more control over your environment, you can set up everything manually.
Install PostgreSQL and pgvector on your system:
macOS (using Homebrew):
Ubuntu/Debian:
Windows: Download from postgresql.org
Connect to PostgreSQL and set up the database:
Create a .env
file with your settings:
Edit .env
with your configuration:
The server will be available at http://localhost:8000
.
If you prefer to use a managed PostgreSQL service:
.env
file with the connection string.env
fileOnce your Honcho server is running, verify everything is working:
Visit http://localhost:8000/docs
to see the interactive API documentation.
Create a simple test script:
Now that Honcho is running locally, you can connect your applications:
Database Connection Errors
postgresql+psycopg://...
API Key Issues
Port Already in Use
FASTAPI_PORT=8001
Docker Issues
docker compose logs
docker compose down && docker compose up -d
Migration Errors
uv run alembic upgrade head
When self-hosting for production, consider:
Set up a local environment to run Honcho for development, testing, or self-hosting
This guide helps you set up a local environment to run Honcho for development, testing, or self-hosting.
By the end of this guide, you’ll have:
Before you begin, ensure you have the following installed:
pip install uv
(manages Python installations automatically)You’ll need a PostgreSQL database with the pgvector extension. Choose one:
The easiest way to get started is using Docker Compose, which handles both the database and Honcho server.
Copy the example environment file and configure it:
Edit .env
and set your API keys (if using LLM features):
Check that both services are running:
Test the Honcho API:
You should see a response indicating the service is healthy.
For more control over your environment, you can set up everything manually.
Install PostgreSQL and pgvector on your system:
macOS (using Homebrew):
Ubuntu/Debian:
Windows: Download from postgresql.org
Connect to PostgreSQL and set up the database:
Create a .env
file with your settings:
Edit .env
with your configuration:
The server will be available at http://localhost:8000
.
If you prefer to use a managed PostgreSQL service:
.env
file with the connection string.env
fileOnce your Honcho server is running, verify everything is working:
Visit http://localhost:8000/docs
to see the interactive API documentation.
Create a simple test script:
Now that Honcho is running locally, you can connect your applications:
Database Connection Errors
postgresql+psycopg://...
API Key Issues
Port Already in Use
FASTAPI_PORT=8001
Docker Issues
docker compose logs
docker compose down && docker compose up -d
Migration Errors
uv run alembic upgrade head
When self-hosting for production, consider: