Skip to content

System Admin Guide

KUKAN supports two deployment methods.

Deploy with AWS CDK using an ECS Fargate + ALB architecture.

Terminal window
cd infra
npx cdk deploy --all

Key AWS resources:

  • ECS Fargate — Web application + Pipeline Worker
  • ALB — Load balancer
  • Aurora Serverless v2 — PostgreSQL database
  • S3 — File storage
  • SQS — Pipeline queue
  • OpenSearch — Full-text search engine

Deploy on-premises or in isolated networks using Docker Compose.

Terminal window
cp .env.prod.example .env.prod
# Edit .env.prod
docker compose --env-file .env --env-file .env.prod --profile prod up -d --build

On-premises deployments use the following alternative services:

AWS ServiceOn-Premises Alternative
S3MinIO
SQSElasticMQ
OpenSearchPostgreSQL full-text search

After deployment, you must create the first sysadmin user via CLI. Without a sysadmin, no system administration operations are possible.

Terminal window
pnpm db:create-user --email admin@example.com --name admin --password <password> --role sysadmin
OptionDescriptionRequired
--emailEmail addressYes
--nameUsername (lowercase alphanumeric, hyphens, underscores, periods)Yes
--passwordPassword (8+ characters)Yes
--roleuser or sysadmin (default: user)No

When REGISTRATION_ENABLED=false (self-registration disabled), use this command to create regular users as well.

Terminal window
pnpm db:create-user --email user@example.com --name taro --password <password>

System administrators (sysadmin) can manage users from the admin dashboard.

  • Change user display name and role (user / sysadmin)
  • Cannot demote your own role (lockout prevention)
  • Soft-delete (sets state to deleted)
  • All sessions and API tokens are immediately revoked
  • Audit logs and activity history are preserved

Control new user self-registration via the REGISTRATION_ENABLED environment variable (default: enabled).

KUKAN automatically monitors the health of external URL resources.

  • Periodic automated checks via scheduler
  • View health check results from the admin dashboard
  • Identify and address failing resources

Key environment variables are listed below. See .env.example for the full list.

VariableDescriptionDefault
POSTGRES_HOSTPostgreSQL hostlocalhost
POSTGRES_PORTPostgreSQL port5432
POSTGRES_DBDatabase namekukan
POSTGRES_USERDatabase userkukan
POSTGRES_PASSWORDDatabase passwordkukan
S3_BUCKETS3 bucket namekukan-dev
S3_ENDPOINTS3 endpoint (MinIO: http://localhost:9000, AWS: omit)-
SEARCH_TYPESearch engine (opensearch / postgres)opensearch
OPENSEARCH_URLOpenSearch endpointhttp://localhost:9200
SQS_QUEUE_URLSQS queue URL-
SQS_ENDPOINTSQS endpoint (ElasticMQ: http://localhost:9324, AWS: omit)-
BETTER_AUTH_SECRETAuth session secret (32+ characters)-
BETTER_AUTH_URLPublic URLhttp://localhost:3000
REGISTRATION_ENABLEDEnable/disable user self-registrationtrue
LOG_LEVELLog level (tracefatal)info