Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help


description: Learn how to set up app-level access control for your aimicromindinstances

App Level


App level authorization protects your aimicromindinstance by username and password. This protects your apps from being accessible by anyone when deployed online.

How to Set Username & Password

Npm

  1. Install AiMicromind
npm install -g aimicromind     
  1. Start aimicromindwith username & password
npx aimicromind start --AIMICROMIND_USERNAME=user --AIMICROMIND_PASSWORD=1234
  1. Open http://localhost:3000

Docker

  1. Navigate to docker folder
cd docker
  1. Create .env file and specify the PORT, AIMICROMIND _USERNAME, and AIMICROMIND _PASSWORD
PORT=3000
AIMICROMIND_USERNAME=user
AIMICROMIND_PASSWORD=1234
  1. Pass AIMICROMIND _USERNAME and AIMICROMIND _PASSWORD to the docker-compose.yml file:
environment:
    - PORT=${PORT}
    - AIMICROMIND_USERNAME=${AIMICROMIND_USERNAME}
    - AIMICROMIND_PASSWORD=${AIMICROMIND_PASSWORD}
  1. docker compose up -d
  2. Open http://localhost:3000
  3. You can bring the containers down by docker compose stop

Git clone

To enable app level authentication, add AIMICROMIND _USERNAME and AIMICROMIND _PASSWORD to the .env file in packages/server:

AIMICROMIND_USERNAME=user
AIMICROMIND_PASSWORD=1234