# Start a Local Developer Portal

Use the API7 Gateway Docker Compose package to start a local Developer Portal for evaluation. The package creates the portal instance, portal token, frontend configuration, and database, then starts the frontend.

caution

This workflow is intended for local evaluation. The frontend serves plain HTTP, so developer credentials and session cookies are transmitted in clear text. Before exposing the portal to other users, put it behind an HTTPS reverse proxy and set `PORTAL_PUBLIC_URL` to the HTTPS URL. For Kubernetes, external databases, custom frontend deployments, or production environments, follow [Deploy the Developer Portal](https://docs.api7.ai/api7-gateway/developer-portal/deploy/deploy-portal.md).

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

* Install API7 Gateway using the [Quick Start](https://docs.api7.ai/api7-gateway/getting-started/quick-start.md) or the quick installation in [Deploy with Docker Compose](https://docs.api7.ai/api7-gateway/install/deploy-with-docker-compose.md).
* Confirm that the generated or extracted `api7-ee` directory contains `portal.sh`. If it does not, the packaged workflow is unavailable; follow the manual steps in [Deploy the Developer Portal](https://docs.api7.ai/api7-gateway/developer-portal/deploy/deploy-portal.md).
* Start API7 Gateway and activate a license that includes the API7 Portal feature.
* Have the credentials for an API7 Dashboard administrator.

## Start the Developer Portal[​](#start-the-developer-portal "Direct link to Start the Developer Portal")

Run the command from the `api7-ee` directory. If your shell is in its parent directory, run `cd api7-ee` first. Then start the Developer Portal with your current Dashboard credentials:

```
ADMIN_USER=admin ADMIN_PASSWORD='<dashboard-password>' ./portal.sh start
```

If the Dashboard still uses the default `admin` / `admin` credentials, you can run `./portal.sh start` without setting `ADMIN_USER` and `ADMIN_PASSWORD`.

The script performs the following operations:

* Creates or reuses a portal instance and its portal token.
* Writes the frontend configuration to `developer_portal_fe_conf/config.yaml`.
* Creates the frontend database in the packaged PostgreSQL instance.
* Starts the frontend on port `3001` by default.

When startup finishes, the script prints the Developer Portal address.

## Verify the Developer Portal[​](#verify-the-developer-portal "Direct link to Verify the Developer Portal")

1. Open the address printed by `portal.sh`.
2. Select **Sign Up** and create a developer account.
3. Create an organization if the Developer Portal prompts you to do so.
4. Open **API Hub** and confirm that the page loads.

A new portal's API Hub is empty until an API provider publishes an API product to it. Follow [Manage API Products](https://docs.api7.ai/api7-gateway/developer-portal/manage/manage-api-products.md) to create and publish one, then refresh the API Hub to confirm that it appears.

## Customize the Packaged Developer Portal[​](#customize-the-packaged-developer-portal "Direct link to Customize the Packaged Developer Portal")

Set the following environment variables when starting the Developer Portal:

| Variable                       | Default                 | Description                                                             |
| ------------------------------ | ----------------------- | ----------------------------------------------------------------------- |
| `ADMIN_USER`, `ADMIN_PASSWORD` | `admin`, `admin`        | Dashboard credentials used to create the portal instance and its token. |
| `PORTAL_NAME`                  | `Developer Portal`      | Name of the portal instance created in the Provider Portal.             |
| `PORTAL_PUBLIC_URL`            | `http://127.0.0.1:3001` | Public URL of the portal, also written to the frontend `app.baseURL`.   |
| `PORTAL_FE_PORT`               | `3001`                  | Host port on which the frontend is published.                           |

For example, use another local port as follows:

```
ADMIN_USER=admin ADMIN_PASSWORD='<dashboard-password>' \

PORTAL_FE_PORT=3100 PORTAL_PUBLIC_URL="http://127.0.0.1:3100" \

./portal.sh start
```

Running the script again reuses the portal instance, portal token, and authentication secret. Existing developer accounts and sessions remain available after a restart.

## Stop or Remove the Developer Portal[​](#stop-or-remove-the-developer-portal "Direct link to Stop or Remove the Developer Portal")

Run lifecycle commands from the `api7-ee` directory:

```
./portal.sh stop

./portal.sh start

./portal.sh down
```

`stop` stops the frontend container. `down` stops and removes it. The generated configuration and database remain in the packaged deployment, and `./run.sh start` starts the frontend again with the rest of API7 Gateway.

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

* [Manage API Products](https://docs.api7.ai/api7-gateway/developer-portal/manage/manage-api-products.md) to publish APIs for developers.
* [Configure the Developer Portal](https://docs.api7.ai/api7-gateway/developer-portal/deploy/configure-portal.md) to control authentication and public access.
* [Deploy the Developer Portal](https://docs.api7.ai/api7-gateway/developer-portal/deploy/deploy-portal.md) in a customized or production environment.
* [Customize the Developer Portal](https://docs.api7.ai/api7-gateway/developer-portal/deploy/customize-portal.md) with your branding and frontend changes.
