Skip to main content

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

Quick Start (Port 80)

To deploy Agenta on port 80, run these commands:

mkdir agenta && cd agenta
curl -L https://raw.githubusercontent.com/agenta-ai/agenta/main/docker-compose.gh.yml -o docker-compose.gh.yml
echo "OPENAI_API_KEY=sk-xxx" > .env
docker compose -f docker-compose.gh.yml --env-file .env up -d --pull always
info

Include in the .env file all the LLM provider keys that you would like the playground to have access to.

Once complete, access Agenta at http://localhost.

Using a Custom Port

To run Agenta on a different port, you'll need to re-build the frontend image. Here's how:

  1. Clone the repository
git clone https://github.com/Agenta-AI/agenta
cd agenta
  1. Build and run with your chosen port:
echo "OPENAI_API_KEY=sk-xxx" > .env
docker compose -f docker-compose.gh.yml pull
AGENTA_PORT=8081 docker compose -f docker-compose.gh.yml build --no-cache agenta-web
AGENTA_PORT=8081 docker compose -f docker-compose.gh.yml --env-file .env up -d

Access Agenta at http://localhost:8081 (or your chosen port).

Upgrading Agenta to the Latest Version

To update your local installation:

# Download the latest compose file
curl -L https://raw.githubusercontent.com/agenta-ai/agenta/main/docker-compose.gh.yml -o docker-compose.gh.yml

# Updating your LLM provider keys
echo "OPENAI_API_KEY=sk-xxx" > .env

# Update and restart containers
docker compose -f docker-compose.gh.yml --env-file .env up -d --pull always

The system will automatically handle database migrations. If you encounter migration issues, consult the migration guide.

Troubleshooting

If Agenta doesn't start properly, check these common issues:

  1. Port conflicts: Verify if another application is using your chosen port
  2. Container status: Run docker ps to check if all Agenta containers are running
  3. Logs: Examine container logs with:
    docker logs agenta-web
    docker logs agenta-backend
info

To set up a development environment with features like hot-reloading, refer to our Development Guide.

Need help? Either: