Deploy Locally
This guide explains how to set up Agenta on your local machine, either using the default port 80 or a custom port.
Prerequisites
- Docker installed on your machine (Download Docker)
Quick Setup (Port 80)
- Clone Agenta:
git clone https://github.com/Agenta-AI/agenta && cd agenta
-
Edit
hosting/docker-compose/oss/.env.oss.gh
and add your LLM provider API keys. -
Start Agenta services:
docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file hosting/docker-compose/oss/.env.oss.gh --profile with-web up -d
- Access Agenta at
http://localhost
.
Using a Custom Port
To use a different port (e.g., 81):
- Clone Agenta:
git clone https://github.com/Agenta-AI/agenta && cd agenta
-
Edit
hosting/docker-compose/oss/.env.oss.gh
and add your LLM provider API keys. -
Edit the port configuration in the environment file
/hosting/docker-compose/oss/.env.oss.gh
:
AGENTA_PORT=81
AGENTA_HOST=http://host.docker.internal:81
SERVICE_URL_TEMPLATE=http://localhost:81/services/{path}
- Build and run:
docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file=hosting/docker-compose/oss/.env.oss.gh --profile with-web up -d --build
You need at least to rebuild the web image because the port is hardcoded at build time in Next.js. You can use the pre-build image for the rest of the services.
- Access Agenta at
http://localhost:81
.
Upgrading to the Latest Version of Agenta
Updating your local Agenta installation to the latest version, requires pulling the latest version with --pull always
and running migrations if any.
- Pull the latest version:
docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file hosting/docker-compose/oss/.env.oss.gh --profile with-web up -d --pull always
- Run migrations if needed:
docker exec -e PYTHONPATH=/app -w /app/oss/databases/postgres/migrations agenta-oss-gh-api-1 alembic -c alembic.oss.ini upgrade head
Consult the migration guide for more details.
Troubleshooting
If Agenta doesn't start properly, check these common issues:
- Port conflicts: Verify if another application is using your chosen port.
- Container status: Run
docker ps
to check if all Agenta containers are running - Logs: Examine container logs with:
docker logs agenta-oss-gh-web
docker logs agenta-oss-gh-api
To set up a development environment with features like hot-reloading, refer to our Development Guide.
Need help? Either:
- Create a GitHub issue
- Join our Slack community for quick support