DreamLake

Setting Up Lakeshore Service

Host your own Lakeshore control plane and create its first namespace. Run the server steps on the machine that will host the service, then use the Lakeshore CLI from your admin machine.

Already have a server URL and access token? Skip to Connect Lakeshore to DreamLake. To try the Python SDK first, use Quick start.

The examples use lab as the Lakeshore namespace. Replace lakeshore.example.com with your server's hostname.

1. Start the control-plane server

On your server, install Node.js 20+, pnpm, Git, and Docker with Compose. You need access to the workspace repository and its submodules.

bash
git clone --recurse-submodules https://github.com/dreamlake-ai/lakeshore-workspace.git
cd lakeshore-workspace
docker compose up -d --wait mongo redis
cd lakeshore-controlplane
pnpm install
cp .env.example .env
chmod 600 .env

Edit .env with these values. Generate the two secrets with the commands below and paste their output into the corresponding fields.

dotenv
DATABASE_URL="mongodb://localhost:27017/lakeshore?replicaSet=rs0&directConnection=true"
MONGODB_URI="mongodb://localhost:27017/lakeshore?replicaSet=rs0&directConnection=true"
REDIS_URL="redis://localhost:6379"
PORT=8080
SECRETS_KEY="paste-generated-encryption-key"
LAKESHORE_ADMIN_TOKEN="paste-generated-admin-token"
bash
openssl rand -base64 32
openssl rand -hex 32

Initialize the database and start the server:

bash
pnpm prisma:push
pnpm build
NODE_ENV=production node --env-file=.env dist/server.js

In another terminal on the server:

bash
curl --fail http://localhost:8080/healthz

Expect {"ok":true}. This checks that the HTTP server is running.

For an ongoing service, run the start command under your process manager with this directory as its working directory. Point an HTTPS reverse proxy at port 8080 and configure DNS for lakeshore.example.com. Keep MongoDB, Redis, and the backend port private; the workspace Compose file publishes its database ports on all interfaces by default. Keep the encryption key stable across restarts.

2. Create a namespace and access token

On your admin machine, install the Lakeshore CLI:

bash
npm install -g @dreamlake/lakeshore

Set the admin token to the same value you put in the server's .env. Then create the namespace:

bash
export LAKESHORE_ADMIN_TOKEN='your-server-admin-token'
export LAKESHORE_URL='https://lakeshore.example.com'
lakeshore admin namespace create lab
unset LAKESHORE_URL

Log in as the administrator to mint and save a regular client token:

bash
lakeshore auth login --server https://lakeshore.example.com --namespace lab --name admin-cli
lakeshore auth status

Remove the admin credential from your shell after setup:

bash
unset LAKESHORE_ADMIN_TOKEN

Keep LAKESHORE_URL unset after login: setting it makes ordinary Lakeshore commands bypass the saved login token.

Next: connect or run work

The server is ready when its health check succeeds and lakeshore auth status validates your client login.

Documentation

For large job payloads and durable log storage, also configure payload storage and log storage.