Skip to main content

Install and upgrade

Prerequisites

CodeGate is distributed as a Docker container. You need a container runtime like Docker Desktop or Docker Engine. Podman and Podman Desktop are also supported. Windows, macOS, and Linux operating systems are all supported with x86_64 and arm64 (ARM and Apple Silicon) CPU architectures.

These instructions assume the docker CLI is available. If you use Podman, replace docker with podman in all commands.

Run CodeGate

To download and run CodeGate with the recommended configuration for full functionality:

docker run --name codegate -d -p 8989:8989 -p 9090:80 -p 8990:8990 --mount type=volume,src=codegate_volume,dst=/app/codegate_volume --restart unless-stopped ghcr.io/stacklok/codegate:latest

Parameter reference:

  • -d - start in detached (background) mode
  • -p 8989:8989 - bind the CodeGate API to port 8989 on your host
  • -p 9090:80 - bind the CodeGate web dashboard to port 9090 on your host
  • -p 8990:8990 - bind the CodeGate secure HTTP proxy to port 8990 on your host
  • --mount ... - mount a persistent Docker volume named codegate_volume to the required path in the container
  • --restart unless-stopped - restart CodeGate after a Docker or system restart, unless you manually stop it

More example run commands to run the container with the right parameters for your scenario are found below. To learn how to customize the CodeGate application settings, see Configure CodeGate

Alternative run commands

Run with minimal functionality for use with Continue:

docker run -d -p 8989:8989 -p 9090:80 --restart unless-stopped ghcr.io/stacklok/codegate:latest

Mount a persistent volume to the container (see Persisting dashboard data):

docker run --name codegate -d -p 8989:8989 -p 9090:80 --mount type=volume,src=codegate_volume,dst=/app/codegate_volume --restart unless-stopped ghcr.io/stacklok/codegate:latest

Copilot support: enable the HTTP proxy port and mount a persistent volume (see Use CodeGate with GitHub Copilot):

docker run --name codegate -d -p 8989:8989 -p 9090:80 -p 8990:8990 --mount type=volume,src=codegate_volume,dst=/app/codegate_volume --restart unless-stopped ghcr.io/stacklok/codegate:latest
tip

Record the docker run command you use to launch CodeGate. It will be a handy reference when you upgrade CodeGate in the future or if you need to modify your configuration.

Networking

CodeGate listens on several network ports:

Default host portContainer port (internal)Purpose
909080CodeGate web dashboard
89898989CodeGate API
89908990Secure HTTP proxy (GitHub Copilot integration)

All of the commands in these docs assume the default ports. To use different listening ports, modify the -p flag(s):

  • Dashboard: -p YOUR_PORT:80
  • CodeGate API: -p YOUR_PORT:8989
  • Secure HTTP proxy: -p YOUR_PORT:8990
note

If you change the web dashboard port, some links returned by CodeGate's responses won't work without manually updating the URL that opens in your browser.

View logs

Use the docker logs command to view recent log messages:

docker logs codegate

Or to follow the log stream live (useful for troubleshooting), add the -follow flag:

docker logs --follow codegate

Upgrade CodeGate

To upgrade CodeGate to the latest version, start by reviewing the Changelog for new features and breaking changes.

Download the latest image:

docker pull ghcr.io/stacklok/codegate:latest

Stop and remove the current container:

docker stop codegate
docker rm codegate

Finally, launch the new version using the same docker run command you used originally.

Manage the CodeGate container

Use standard docker/podman commands to manage the CodeGate container and persistent volume.

Next steps

Now that CodeGate is running, proceed to configure your IDE integration.

Remove CodeGate

If you decide to stop using CodeGate, follow the removal steps for your IDE integration: