Authentication

Securing Your AiAgentNexus Deployment with Authentication

By default, AiAgentNexus does not include an authentication layer. If you need to secure or restrict access to your instance, consider one of the approaches listed below:

  1. Integrate ⬇️ HTTP Basic Authentication into the AiAgentNexus build

  2. Make use of your cloud host’s existing ⬇️ authentication capabilities

  3. Implement your own custom sign-in or authorization solution


HTTP Basic Authentication

HTTP Basic Authentication offers a straightforward way to protect your AiAgentNexus instance from unauthorized access. Enabling it requires you to manually compile the project:

  1. Obtain the AiAgentNexus code by cloning the repository.

  2. Rename middleware_BASIC_AUTH.ts to middleware.ts.

  3. Build the project: follow the standard instructions for a local or Docker-based deployment (for examples, see Local Production Build or Docker Deployment).

  4. Set up the necessary environment variables in your .env file prior to launching AiAgentNexus:

    HTTP_BASIC_AUTH_USERNAME=<your username>
    HTTP_BASIC_AUTH_PASSWORD=<your password>
  5. Run the application and enjoy the added security.


Leveraging Cloud Platform Authentication

This approach requires no additional rebuilding of AiAgentNexus itself. Instead, you use your hosting provider’s features for managing login or password protection.

Modern cloud services typically include integrated authentication or identity solutions. Below are some common options (consult your specific cloud provider’s documentation for more details):

  1. Cloudflare Access / Zero Trust Learn More

  2. Vercel Authentication Learn More

  3. Vercel Password Protection Learn More

  4. Other Providers: AWS IAM, Google Identity-Aware Proxy, Heroku Basic Authentication add-ons, and more.