Skip to main content

Run CodeGate with Docker

If CodeGate is not deployed yet, pull the image:
Start the container:
Parameter notes:
-p 8877:8877: Maps the admin UI port
-v codegate-data:/app/backend/data: Mounts a volume for data persistence
Then open:
  • Admin UI: <http://localhost:8877>
Use base_url = http://localhost:8877 in the steps below (or your host/domain if the API and caller are on different machines).

Prerequisites

  • A running CodeGate instance (API URL and admin UI). If you used the Docker command above, nothing else is needed.

Step 1: Install the SDK

Choose by stack:
Or with uv:

Step 2: Create a project and API key in CodeGate

  1. Log in to the CodeGate admin UI.
  2. Create a project (if needed).
  3. Go to project details → API keys.
  4. Click Generate key to get api_key, secret, and project_id.
Secret is shown only once. Save it immediately; it cannot be viewed again.

Step 3: Initialize the client

Replace api_key, secret, project_id with your credentials and base_url with your CodeGate API URL.

Step 4: Verify an activation code

Before verification: Make sure you have created at least 1 valid activation code in your project before verifying. You can create activation codes in the admin UI under project details → Activation codes.
For production, use environment variables for credentials:

Next steps

Python SDK

More Python usage

JavaScript SDK

More JavaScript usage

API reference

Call REST API directly