> For the complete documentation index, see [llms.txt](https://astral-dx.gitbook.io/astral-dx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://astral-dx.gitbook.io/astral-dx/guides/deploying-with-custom-plugins.md).

# Deploying with Custom Plugins

This guide describes how to customize your Astral API Portal by writing your own plugins. In this example we will be creating our own API credential management plugin.

Please visit the [Astral API Portal Launcher](https://app.astral.sh) to configure and download your API Portal.

1. Open a local development environment with tools including [Git](https://git-scm.com/) for source version control, and [Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) to install and run the Deploy CLI locally.
2. With the template repository, create an `.env.local` at the root of the project and provide any necessary environment variables.
3. Next, run the development server:

```markup
npm run dev
# or
yarn dev
```

4\. Open [http://localhost:3000](http://localhost:3000/) with your browser to see the result. You can start customizing your API developer portal by modifying `portal.config.js`. Refresh your page to see changes.

5\. For connecting your custom API Authentication, write an internal API to `getTeam`, `createCredentia`l, `rotateCredential`, and `deleteCredentials`&#x20;

![](https://344324742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yq3fV353s4UTq6XBdxK%2Fuploads%2FvGK1EHAEFKFiEkYYSffa%2FCustom%20Auth%20API%20Side.png?alt=media\&token=d96d52e3-f861-438b-9581-2f6473583b51)

6\. For User Management and Team Management, either create a free Auth0 account, and input the M2M credentials, or write a bespoke setup for your user/team configuration (login screen, hierarchy, etc.). &#x20;

\----&#x20;

Example `portal.config.js`to visual:&#x20;

![](https://344324742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yq3fV353s4UTq6XBdxK%2Fuploads%2Ft921pIultpCNdpslAo2t%2FPortal.Config%20.png?alt=media\&token=c7fc8fe9-4630-4cda-a3d3-7d0f5a50850d)

![View of the Admin Dashboard](https://344324742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yq3fV353s4UTq6XBdxK%2Fuploads%2FbSN5Ntm9IQEpdYUaJCx8%2FAdmin%20Local%20.png?alt=media\&token=75a75ac2-6c66-4359-af80-071a1fa4f5a2)

![Customer API Portal View](https://344324742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yq3fV353s4UTq6XBdxK%2Fuploads%2Fq2dYBSZdNUKMIgL01vdY%2FAdmin%20View.png?alt=media\&token=80923450-00c6-4bd6-9dd4-287953f3a7b0)
