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
docker compose -f docker-compose.gh.yml up -d

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

Using a Custom Port

To run Agenta on a different port, you'll need to modify the frontend configuration and rebuild the container. Here's how:

  1. Clone the repository:
git clone https://github.com/Agenta-AI/agenta.git
cd agenta
  1. Update the API URL in agenta-web/.env.gh:
# Change this line:
NEXT_PUBLIC_AGENTA_API_URL=http://localhost
# To include your desired port (e.g., port 90):
NEXT_PUBLIC_AGENTA_API_URL=http://localhost:90
  1. Build and run with your chosen port:
AGENTA_PORT=90 docker compose -f docker-compose.gh.yml up -d --build

Access Agenta at http://localhost:90 (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

# Update and restart containers
docker compose -f docker-compose.gh.yml 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: