Skip to main content
Version: 3.10.x

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.

Prerequisites

  • Install API7 Gateway using the Quick Start or the quick installation in Deploy with Docker Compose.
  • 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.
  • 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

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

  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 to create and publish one, then refresh the API Hub to confirm that it appears.

Customize the Packaged Developer Portal

Set the following environment variables when starting the Developer Portal:

VariableDefaultDescription
ADMIN_USER, ADMIN_PASSWORDadmin, adminDashboard credentials used to create the portal instance and its token.
PORTAL_NAMEDeveloper PortalName of the portal instance created in the Provider Portal.
PORTAL_PUBLIC_URLhttp://127.0.0.1:3001Public URL of the portal, also written to the frontend app.baseURL.
PORTAL_FE_PORT3001Host 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

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