# Quick Start

This quickstart walks you through deploying API7 Gateway locally with Docker Compose, creating your first service and route, and verifying that API traffic is proxied through the gateway.

This quickstart uses Docker Engine. On a RHEL host with Podman instead, follow [Deploy with Podman](https://docs.api7.ai/api7-gateway/install/deploy-with-podman.md).

**Time to complete**: \~10 minutes

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

| Requirement             | Minimum Version                                               |
| ----------------------- | ------------------------------------------------------------- |
| Docker                  | v20.10+                                                       |
| Docker Compose          | v2.0+                                                         |
| curl                    | Any                                                           |
| API7 Enterprise license | [Get a trial license](https://api7.ai/try?product=enterprise) |

## Step 1: Install API7 Gateway[​](#step-1-install-api7-gateway "Direct link to Step 1: Install API7 Gateway")

Run the quickstart script to deploy all API7 Gateway components:

```
curl -sL "https://run.api7.ai/api7/quickstart" | bash
```

This starts the Control Plane, Dashboard, DP Manager, Developer Portal, Gateway, PostgreSQL, Prometheus, and Jaeger. Wait for the script to complete. You should see output similar to:

```
✔ Container api7-ee-postgresql-1

✔ Container api7-ee-prometheus-1

✔ Container api7-ee-jaeger-1

✔ Container api7-ee-api7-ee-dashboard-1

✔ Container api7-ee-api7-ee-dp-manager-1

✔ Container api7-ee-api7-ee-developer-portal-1

...

Waiting for service api7-ee-gateway to be ready...

Service api7-ee-gateway is ready.

✔ API7-EE is ready!
```

If any step fails, the script exits with a non-zero status and does not print `API7-EE is ready!`. It prints the reason, the output of `docker compose ps -a`, and the last log lines of each service instead.

Verify all containers are running:

```
docker ps
```

You should see containers for `api7-ee-gateway-1`, `api7-ee-api7-ee-dashboard-1`, `api7-ee-api7-ee-dp-manager-1`, `api7-ee-api7-ee-developer-portal-1`, `api7-ee-postgresql-1`, `api7-ee-prometheus-1`, and `api7-ee-jaeger-1`.

## Step 2: Activate API7 Gateway[​](#step-2-activate-api7-gateway "Direct link to Step 2: Activate API7 Gateway")

1. Open your browser and navigate to `https://localhost:7443`.

2. Log in with the default credentials:

   | Field    | Value   |
   | -------- | ------- |
   | Username | `admin` |
   | Password | `admin` |

3. Upload your API7 Enterprise license to activate the platform.

The quickstart automatically creates a **default** gateway group with a gateway instance. You can verify this by navigating to **Gateway Groups** in the Dashboard sidebar.

If you want to use the Admin API in the next steps, create a token by following [Obtain a Token from the Dashboard](https://docs.api7.ai/api7-gateway/reference/obtain-dashboard-token.md), then export it as an environment variable:

```
export API_KEY="a7ee-xxxxxxxxxxxxx"
```

## Step 3: Create a Service and Route[​](#step-3-create-a-service-and-route "Direct link to Step 3: Create a Service and Route")

Create a service that proxies requests to `httpbin.org`:

* Dashboard
* Admin API
* ADC

1. In the Dashboard sidebar, navigate to the **default** gateway group and click **Services**.

2. Click **Add Service**, then **Add Manually**.

3. Configure the service:

   | Field                    | Value                  |
   | ------------------------ | ---------------------- |
   | Name                     | `httpbin`              |
   | Service Type             | `HTTP (Layer 7 Proxy)` |
   | Upstream Scheme          | `HTTP`                 |
   | How to find the upstream | `Use Nodes`            |

4. Click **Add Node** and configure:

   | Field  | Value         |
   | ------ | ------------- |
   | Host   | `httpbin.org` |
   | Port   | `80`          |
   | Weight | `100`         |

5. Click **Add** to create the service.

6. Click the `httpbin` service, then click **Add Route**.

7. Configure the route:

   | Field   | Value          |
   | ------- | -------------- |
   | Name    | `get-anything` |
   | Path    | `/anything/*`  |
   | Methods | `GET`          |

8. Click **Add**.

```
# Create the service with the upstream

curl -k "https://localhost:7443/apisix/admin/services/httpbin?gateway_group_id={gateway_group_id}" -X PUT \

  -H "X-API-KEY: ${API_KEY}" \

  -H "Content-Type: application/json" \

  -d '{

    "name": "httpbin",

    "upstream": {

      "type": "roundrobin",

      "scheme": "http",

      "nodes": [

        { "host": "httpbin.org", "port": 80, "weight": 100 }

      ]

    }

  }'



# Create the route under that service

curl -k "https://localhost:7443/apisix/admin/routes/get-anything?gateway_group_id={gateway_group_id}" -X PUT \

  -H "X-API-KEY: ${API_KEY}" \

  -H "Content-Type: application/json" \

  -d '{

    "name": "get-anything",

    "service_id": "httpbin",

    "paths": ["/anything/*"],

    "methods": ["GET"]

  }'
```

If you are not running locally, replace `localhost` with your Admin API host. The `-k` flag is required if the Admin API uses a self-signed TLS certificate. Replace `{gateway_group_id}` with the gateway group ID — use `default` for the gateway group created by the quickstart, or copy the ID from the **Gateway Groups** page in the Dashboard.

First, install ADC:

```
curl -sL "https://run.api7.ai/adc/install" | bash
```

Before using ADC, configure it to connect to API7 Gateway:

1. Create a token by following [Obtain a Token from the Dashboard](https://docs.api7.ai/api7-gateway/reference/obtain-dashboard-token.md). Sign in with a non-root user and create a token in the Dashboard.
2. Create a `.env` file in your working directory:

.env

```
ADC_BACKEND=api7ee

ADC_SERVER=https://localhost:7443

ADC_TOKEN=a7ee-xxxxxxxxxxxxx  # Replace with the token you created

ADC_GATEWAY_GROUP=default

ADC_TLS_SKIP_VERIFY=true
```

The local quickstart uses a self-signed TLS certificate, so this example disables certificate verification. Do not disable verification for a production deployment. Omit `ADC_TLS_SKIP_VERIFY` and set `ADC_CA_CERT_FILE=/path/to/ca.crt` when the Admin API certificate uses a private CA.

3. Verify connectivity:

```
adc ping
```

You should see: `Connected to the "api7ee" backend successfully!`

4. Create a configuration file:

adc.yaml

```
services:

  - name: httpbin

    upstream:

      name: default

      scheme: http

      nodes:

        - host: httpbin.org

          port: 80

          weight: 100

    routes:

      - uris:

          - /anything/*

        name: get-anything

        methods:

          - GET

    labels:

      docs-example: httpbin
```

5. Preview the changes owned by this example and confirm that the diff contains no unintended updates or deletions:

```
adc diff -f adc.yaml \

  --include-resource-type service \

  --label-selector docs-example=httpbin
```

Synchronize the reviewed configuration:

```
adc sync -f adc.yaml \

  --include-resource-type service \

  --label-selector docs-example=httpbin
```

## Step 4: Verify the Proxy[​](#step-4-verify-the-proxy "Direct link to Step 4: Verify the Proxy")

Send a request through the gateway:

```
curl "http://127.0.0.1:9080/anything/hello"
```

Expected response:

```
{

  "args": {},

  "headers": {

    "Host": "127.0.0.1",

    "User-Agent": "curl/8.x.x"

  },

  "method": "GET",

  "url": "http://127.0.0.1/anything/hello"

}
```

A `200 OK` response confirms that API7 Gateway is successfully proxying requests to the upstream `httpbin.org` service.

## Stop API7 Gateway[​](#stop-api7-gateway "Direct link to Stop API7 Gateway")

To stop all services, navigate to the `api7-ee` directory created by the quickstart script and run:

```
bash run.sh stop
```

## Next Steps[​](#next-steps "Direct link to Next Steps")

* **[Compare Management Options](https://docs.api7.ai/api7-gateway/getting-started/management-options.md)**: Choose how you want to manage API7 Gateway after completing the quickstart.
* **[Tutorial: Proxying and Managing API Requests via Plugins](https://docs.api7.ai/api7-gateway/getting-started/tutorial-proxying-api-requests.md)**: Add authentication and rate limiting to your API.
* **[Learn More About API7 Products and APISIX](https://docs.api7.ai/api7-gateway/getting-started/learn-more.md)**: Understand the relationship between API7 products and the open-source APISIX ecosystem.
* **[Start a Local Developer Portal](https://docs.api7.ai/api7-gateway/developer-portal/get-started.md)**: Start the packaged Developer Portal and register a developer account.
* **[Deploy on Kubernetes](https://docs.api7.ai/api7-gateway/install/deploy-on-kubernetes.md)**: Set up API7 Gateway in a production Kubernetes environment.
