Skip to Content
ConceptsAuthentication

Authentication

Endee can be used in two ways — a self-hosted local server or Endee Serverless. Authentication works differently for each.

Local Server

By default, Endee runs without authentication for easy local development. To secure your instance, set the NDD_AUTH_TOKEN environment variable when starting the server.

Enabling Authentication

Docker — add the -e flag to your run command:

docker run \ -e NDD_AUTH_TOKEN=your-secret-token \ ... other flags ... endeeio/endee-server:latest

Build from source — pass the variable at startup:

NDD_DATA_DIR=./data NDD_AUTH_TOKEN=your-secret-token ./build/ndd-avx2

Using the Token

Once authentication is enabled, every client must present the same token.

Dashboard

Enter the token in the login screen at http://localhost:8080 .

SDK Clients

Pass the token when initializing the client:

from endee import Endee client = Endee("your-secret-token")

REST API

Include the token in the Authorization header:

curl -X GET http://localhost:8080/api/v1/index/list \ -H "Authorization: Bearer your-secret-token"

All API requests will fail if the token doesn’t match the server’s NDD_AUTH_TOKEN. Keep your token secure and never expose it in client-side code.

Endee Serverless

If you are using Endee Serverless , authentication is always enabled. Go to app.endee.io , create a token, then pass it when initializing the client:

from endee import Endee client = Endee("your-serverless-token")