Overview
Run an always-on process on Local or Kubernetes deployments.
Daemons run an always-on process. Use Daemon for local connectors, sync loops, telemetry collectors, command handlers, and Kubernetes/on-prem helper processes that should start once and keep running.
Daemon is currently supported on Local and Kubernetes. AWS, GCP, and Azure fail during preflight before any provider calls.
Platform Mapping
| Platform | Backing Runtime | Status |
|---|---|---|
| Local | Local process from a container image | Supported |
| Kubernetes / On-Prem | Single-replica Kubernetes Deployment | Supported |
| AWS | Not available | Not supported yet |
| GCP | Not available | Not supported yet |
| Azure | Not available | Not supported yet |
When to Use
Use Daemon when the work is process-oriented: a connector that maintains a long-lived session, a background command executor, a local/on-prem control loop, or a helper service that should restart if it exits.
Use Worker for request-response handlers. Use Container for cloud services with ports, stateful storage, GPUs, or scaling.
Quick Start
import * as alien from "@alienplatform/core"
const connector = new alien.Daemon("connector")
.code({ type: "image", image: "ghcr.io/acme/connector:2026-05-17" })
.commandsEnabled(true)
.environment({
LOG_LEVEL: "info",
})
.permissions("execution")
.build()
export default new alien.Stack("edge")
.add(connector, "live")
.platforms(["local", "kubernetes"])
.build()Commands
Daemons can participate in the Commands protocol. Enable commands when the process should poll the manager for work and dispatch registered command handlers.
const executor = new alien.Daemon("executor")
.code({ type: "image", image: "ghcr.io/acme/executor:v1" })
.commandsEnabled(true)
.permissions("execution")
.build()Configuration
| Method | Required | Description |
|---|---|---|
.code(code) | Yes | Container image or source build configuration. Current Local/Kubernetes controllers run image-based daemons. |
.environment(vars) | No | Environment variables injected into the daemon process. |
.link(resource) | No | Gives the daemon binding access to another resource. |
.permissions(profile) | Yes | Permission profile used for linked resources and cloud access. |
.commandsEnabled(boolean) | No | Enables remote command polling. Default: false. |
Daemons do not have ingress, triggers, direct invocation, request timeouts, replica settings, autoscaling, or public URLs.
See API Reference for every builder method and Behavior & Limits for supported platforms and lifecycle behavior.