Installation
This guide walks you through installing Storsko Core from source. If you want to use the managed commercial platform instead, see Commercial Platform.
Installation
This guide walks you through installing Storsko Core from source. If you want to use the managed commercial platform instead, see Commercial Platform.
Prerequisites
Before installing Storsko, ensure your environment meets the following requirements.
Required
| Dependency | Minimum Version | Notes |
|---|---|---|
| Node.js | 20.x | LTS recommended. Use nvm or fnm to manage versions. |
| pnpm | 9.x | Install with npm install -g pnpm |
| PostgreSQL | 15.x | Local install or any hosted provider (Supabase, Neon, Railway, RDS, etc.) |
| Git | Any recent | For cloning the repository |
Optional
| Dependency | Notes |
|---|---|
| Docker + Docker Compose | Required only if running via Docker Compose. Recommended for local development. |
| Make | Required for make setup, make dev, make build convenience commands. Pre-installed on Linux/macOS. Windows users can use nmake or run the underlying commands directly. |
Verifying Prerequisites
Clone the Repository
Install Dependencies
Storsko uses pnpm workspaces (Turborepo). A single install at the root installs all package dependencies:
This will install dependencies for all packages in the monorepo:
packages/api-serverpackages/sdkpackages/authpackages/capability-registrypackages/execution-adapterpackages/agent-hubpackages/llm-gatewayapps/webapps/docs
First Install
The first pnpm install may take 1-2 minutes as it downloads all dependencies. Subsequent installs use the pnpm store cache and are much faster.
Database Setup
Storsko requires a PostgreSQL 15+ database. You can set one up locally or use a hosted provider.
Option A: Local PostgreSQL
If you have PostgreSQL installed locally, create a database and user:
Your DATABASE_URL will be:
Option B: Docker PostgreSQL (Recommended for Development)
If you have Docker installed, start a PostgreSQL container:
This is the simplest option for local development. The database is accessible at localhost:5432.
Option C: Hosted PostgreSQL
Any PostgreSQL 15+ provider works. Set DATABASE_URL to the connection string provided by your hosting service.
Popular options for development:
- Neon — serverless PostgreSQL, generous free tier
- Supabase — PostgreSQL with extras, free tier available
- Railway — simple hosted PostgreSQL
Environment Variables
Storsko reads configuration from environment variables. The make setup command (described below) generates a .env file for you, but you can also create it manually.
Create a file called .env in the repository root:
Security
Never commit .env to version control. The repository includes .env in .gitignore by default.
For a full reference of all environment variables, see Configuration.
Running make setup
The make setup command performs first-time setup in a single step:
- Creates
.envfrom.env.example(if.envdoes not exist) - Generates a cryptographically random
ROOT_API_KEY_SECRET - Generates a cryptographically random
JWT_SECRET - Runs all database migrations (via Drizzle ORM)
- Prints your root API key to the console
Expected output:
Save Your Root API Key
The root API key is printed once during make setup. Copy it now and store it securely. If you lose it, run make reset-root-key to generate a new one (this invalidates the old key).
Running with Docker Compose
For a fully containerised local development environment, use Docker Compose:
The Docker Compose file starts:
postgres— PostgreSQL 15 on port 5432api— Fastify API server on port 3000web— Next.js web dashboard on port 3001
First Run with Docker Compose
On first run, Docker Compose will build the API and web images. This takes 2-5 minutes depending on your machine. Subsequent starts use the cached layers and are much faster.
To stop all services:
To stop and remove all data (including the PostgreSQL volume):
Starting the Development Server
If you are not using Docker Compose, start the development server with:
Or equivalently:
This runs all packages in watch mode using Turborepo. The following services start:
| Service | URL | Notes |
|---|---|---|
| API server | http://localhost:3000 | Fastify REST API |
| Web dashboard | http://localhost:3001 | Next.js 15 |
| Docs | http://localhost:3002 | Docusaurus |
Verifying the Installation
Health Check
The API server exposes a health check endpoint:
Expected response:
Authenticated Request
Test your root API key by listing agents:
Expected response:
An empty array is correct — you have not registered any agents yet.
Troubleshooting
pnpm install fails with permission errors
Ensure you are not running pnpm as root. If you installed Node.js globally as root, consider reinstalling with nvm or fnm as a regular user.
make setup fails with connection refused on PostgreSQL
Verify PostgreSQL is running and accessible:
If this fails, check:
- PostgreSQL is running:
pg_ctl statusorsystemctl status postgresql - The port is correct: PostgreSQL defaults to 5432
- The credentials match what you created in the database setup step
make setup fails with role "storsko" does not exist
You did not create the PostgreSQL user before running setup. Follow the Database Setup section and then re-run make setup.
Port 3000 already in use
Another process is using port 3000. Either stop the conflicting process or change the PORT environment variable:
Web dashboard shows a blank page
The web dashboard (apps/web) requires NEXT_PUBLIC_API_URL to point at the API server. In development this defaults to http://localhost:3000. If you changed the API port, update NEXT_PUBLIC_API_URL in your .env file.
Docker Compose: images fail to build
Ensure Docker has at least 4 GB of memory available. On Docker Desktop, go to Settings → Resources → Memory and increase the limit.
Migrations fail with relation already exists
Your database already has tables from a previous setup. If you want to start fresh:
Dropping the database deletes all data. Only do this in development.
Next Steps
- Quick Start — register your first agent and make a governed execution
- Configuration — full environment variable reference
- Docker Deployment — production-ready Docker setup