Help us shape the future of Go! Take the 2026 Go Developer Survey

levelrail

module
v0.2.0-beta.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2026 License: Apache-2.0

README

Levelrail logo

Levelrail

Push to git, get a running app with TLS, logs, metrics, and rollback, on your own Linux boxes.

Push to git. Get a running app. TLS, logs, metrics, and rollback built in. No SSH, no Grafana, no Kubernetes. Self-hosted on your own Linux boxes.

Docs · Install · Features · Screenshots · Compare · Discord

CI Go Report Card Go Version GitHub stars Last commit PRs welcome Discussions Discord Docs

Table of contents

What is Levelrail?

Levelrail is a self-hosted, open-source deployment platform: an alternative to Heroku, Vercel, and Railway that runs on your own Linux servers. Push to a git repo and get a running app with HTTPS, logs, metrics, and one-click rollback.

It is built for people running 3 to 50 services on 1 to 10 machines who do not want to learn Kubernetes. Each server runs a small agent that talks to Docker's Engine API directly, so there is no SSH and no shelling out to the docker CLI. Metrics and logs are part of the core, not a Grafana you install afterwards.

Install

You need a Linux server (amd64 or arm64) with systemd, root access, and ports 80 and 443 open. Docker is installed for you if it is missing.

curl -fsSL https://levelrail.com/install.sh | sudo sh

The installer checks the host, starts Levelrail as a systemd service, and prints a dashboard URL with a one-time setup token. Open it, choose a password, and the setup wizard takes you through a domain, a git provider, and your first app. About ten minutes, start to finish.

Prefer containers?

docker run -d -p 127.0.0.1:8080:8080 -v /var/run/docker.sock:/var/run/docker.sock \
  -v levelrail-data:/var/lib/levelrail-data ghcr.io/glincker/levelrail:beta

Images for linux/amd64 and linux/arm64 are published as :beta (use this until a stable release ships) and :edge. Upgrade and uninstall commands, pinning a version, the compose file, and the node agent image are in Installing and Docker. Walkthrough: Getting started.

Your first five minutes

Levelrail setup wizard running server checks on a fresh install
1. Install and sign in
One command, then the setup wizard checks the server and walks you to a first app.
Levelrail Git source settings with GitHub, GitLab, Bitbucket, Gitea, and URL tabs
2. Connect a repo
Pick a provider, let auto-detect choose the build, deploy on every push.
Levelrail Deployments page listing recent deploys and a rollback
3. Watch it ship
Every deploy is listed live, and rolling back is one click.

What you get

  • Safe deploys. Rolling, recreate, or blue-green, gated on real readiness probes. Prior images are pinned, so rollback is always one click and garbage collection cannot remove the target.
  • Observability built in. Node-local metrics at 15 second resolution and full-text log search, with deploy markers drawn on the charts so "which deploy caused this" is visible at a glance.
  • Databases that verify their own backups. Postgres, Redis, MySQL, MongoDB, MariaDB, KeyDB, Dragonfly, and ClickHouse, with scheduled backups, restore, and an automatic re-download and checksum after every backup.
  • Many servers, no open ports. Add nodes with a one-time token. Agents dial out over mTLS, with WireGuard mesh networking, internal DNS, cordon, and drain.
  • Git-native. GitHub, GitLab, Bitbucket, and Gitea webhooks, preview environments per pull request, and an import box that accepts a repo URL, an image, a docker run command, or a compose file.
  • 311 one-click templates for self-hosted services, each a compose file the platform deploys and manages.
  • Access control and audit. Allow and Deny IAM policies scoped to a single app or database, with a full audit log and CSV export, in the free Apache 2.0 core.
  • Alerting. Threshold, crashloop, and certificate expiry rules delivered over 18 notification kinds, including Slack, Discord, email, Telegram, PagerDuty, ntfy, and a generic webhook.
  • AI-ready. The HTTP API the dashboard uses also backs an MCP server with 155 tools, so an AI assistant can list apps, read logs, and diagnose a crashloop. AI never sits in the reconciliation path.

A tour of the dashboard

Every image below is captured from a real, running control plane by scripts/screenshots/capture.sh, with real containers, metrics, and logs. Click one to open the guide for that screen.

Deploy and observe

Levelrail apps list showing all services at a glance
Apps
Every service, its status, and where it runs.
Levelrail deploy history with one-click rollback
Deploy history and rollback
Each release is pinned, so rollback is never a rebuild.
Levelrail deploy settings showing blue-green strategy and replicas
Deploy strategy
Blue-green, rolling, or recreate, plus pre and post deploy hooks.
Levelrail app overview page
App overview
Health, replicas, and recent activity for one app.
Levelrail live log viewer with full-text search
Live logs
Full-text search and live tail, stored on the node.
Levelrail resource suggestion and cost estimate for an app
Right-sizing and cost
Limits suggested from real usage, with a what-it-costs-elsewhere estimate.

Data and edge

Levelrail databases list
Managed databases
Postgres, Redis, MySQL, and more, one registry.
Levelrail database overview with TLS and public access settings
Database overview
TLS, host-port exposure, and backups in one place.
Levelrail load balancer view with upstream health
Load balancer
Per-upstream health once the ingress reconciler observes it.
Levelrail Domains page with platform ingress settings
Domains and TLS
Primary domain, ACME certificates, and HSTS.
Levelrail environment variables and write-only secrets
Environment and secrets
Secrets are write-only and show their age.
Levelrail Backups page prompting for a backup target
Backups
Connect an S3-compatible target, then schedule from any database.
Nodes, networking, and CI
Levelrail nodes list showing health and placement
Nodes
Node health and placement across machines.
Levelrail network topology graph
Network topology
How apps and nodes connect.
Levelrail cloud node providers settings
Cloud node providers
Create servers at Hetzner, DigitalOcean, AWS, or Azure from the Nodes page.
Levelrail Pipelines first-run view with a sample pipeline file
Pipelines
CI/CD runs on your own nodes, defined in a YAML file.
Getting started and operations
Levelrail service templates catalog with categories
Template catalog
One-click services from a searchable catalog.
Levelrail CLI access page with install and login steps
CLI access
Install the CLI and log in with a device code, no SSH key.
Levelrail dashboard home with stats and server checks
Dashboard home
Stats, recent activity, and a Needs attention list from the server checks.
Levelrail status page settings, switched off by default
Public status page
A read-only page with component status, off until you publish it.

Status: pre-release

Levelrail is in active development and has no stable release yet. APIs, the app spec format, and the on-disk layout can change between betas, so do not run production workloads on it yet.

Maturity is uneven, and we label it feature by feature in Feature status. Single node is the well-tested path. Deploy approvals, database backups with point-in-time recovery, and GitHub previews are marked stable, each with a live end-to-end test. Multi-node enrollment, drain, and placement have run against two real Docker daemons, but the WireGuard mesh across hosts is still unverified. Most other areas are beta, and a few (in-app AI chat, GPU models, the load balancer, platform as code, Cloudflare tunnel) are off by default behind APP_EXPERIMENTAL. The roadmap has the current list of what is done and what is next.

Why not Coolify or Dokploy?

Most self-hosted platforms in this category manage servers by SSHing in and shelling out to the docker CLI, then parsing text. That is a common source of flakiness, and it forces polling loops. Levelrail does it differently:

  • Agent-based. A small agent on each node uses the Docker Engine API directly and streams container events up. The control plane never polls.
  • Observability in the core. Metrics and logs ship with the platform.
  • Small footprint. One static Go binary for the control plane and one for the agent, with embedded SQLite, an embedded Caddy ingress, and an embedded dashboard. Measured numbers and conditions are in Performance.
Levelrail Coolify Dokploy CapRover Dokku Kamal
Node control Reverse-dialed agent SSH + CLI SSH + Engine API Swarm API Local bash SSH, one-shot
Orchestration Level-triggered reconciler Compose Swarm Swarm Bash scheduler None
Built-in metrics and logs Yes Opt-in add-on Separate binary No No No
Rollback Pinned images, readiness-gated Health check off by default Swarm rollback Manual Default scheduler: none Proxy health gate
Backup verification Automatic, all 8 engines Non-empty check None None No backups No backups

This is positioning, not a ranking. All of them are worth using. The one area where Levelrail trails is breadth of templates: 311 curated entries against Coolify's roughly 370, an intentional bet on curation (see ADR 015). The full, sourced comparison is in Comparison.

How it is built

  • Control plane (cmd/levelrail): one Go binary with the dashboard embedded. It reconciles declarative desired state against observed Docker state, the Kubernetes controller pattern without the rest of Kubernetes.
  • Node agent (cmd/levelrail-agent): dials out to the control plane. In single-node mode it runs in-process, so one node and ten nodes share one code path.
  • Ingress: Caddy embedded as a library, for automatic TLS and routing.
  • Builds: BuildKit as a library, with Railpack detection for apps without a Dockerfile.
  • State: SQLite in WAL mode via modernc.org/sqlite, pure Go.
  • CLI and MCP: levelrail-cli and levelrail-mcp are thin clients over the same HTTP API under /api/v1.

Details: Architecture.

Build from source

Needs Go 1.26 or newer and Docker.

go build ./cmd/levelrail
go build ./cmd/levelrail-agent
go build ./cmd/levelrail-cli

The frontend is a Vite project in web/ that is embedded into the control plane at build time. See Installing and CONTRIBUTING.md for the dev loop, tests, and commit conventions.

Docs and community

  • levelrail.com -- the hosted docs site: getting started, architecture, app spec reference, roadmap, full index
  • docs/ -- the same content as plain Markdown, for browsing directly on GitHub
  • GitHub Discussions -- questions, ideas, show and tell
  • GLINR Discord -- live chat with maintainers and other users, with a dedicated #levelrail forum channel for questions and support
  • support@levelrail.com -- direct email support

Join the GLINR Discord

Star history

Star History Chart

License

Apache 2.0, see LICENSE.

Founding partners

Founding partner sites and libraries, from the same studio:

theSVG A searchable library of brand SVG icons for developers and designers.
theauth Open-source auth for AI agents and humans, with MCP OAuth 2.1 and audit.
AskVerdict AI Structured multi-agent decisions for teams, with verdicts and action items.

Meet the founder

Levelrail is built by Gagan Deep Singh, founder of GLINR STUDIOS and theSVG. Say hello at thegdsks.com.


GLINR STUDIOS

Powered by GLINR STUDIOS · icon from theSVG

Directories

Path Synopsis
cmd
levelrail command
Command levelrail is the control plane binary.
Command levelrail is the control plane binary.
levelrail-agent command
Command levelrail-agent is the node agent binary (the repo layout names it, this is the first pass to actually build it).
Command levelrail-agent is the node agent binary (the repo layout names it, this is the first pass to actually build it).
levelrail-cli command
Command levelrail-cli is a thin, scriptable HTTP client for the control plane's versioned API (internal/api, mounted at /api/v1), the first command-line surface this project has (cmd/levelrail is the control plane server, cmd/levelrail-agent is the node agent, neither is meant to be typed at by an operator).
Command levelrail-cli is a thin, scriptable HTTP client for the control plane's versioned API (internal/api, mounted at /api/v1), the first command-line surface this project has (cmd/levelrail is the control plane server, cmd/levelrail-agent is the node agent, neither is meant to be typed at by an operator).
levelrail-mcp command
Command levelrail-mcp is an MCP (Model Context Protocol) server that lets an AI agent manage a control plane deployment through the same versioned REST API (internal/api, mounted at /api/v1) cmd/levelrail-cli already drives: see internal/apiclient's own doc comment, and internal/store/tokens.go's APIToken doc comment on why a bearer token was always meant to authenticate "a CLI, an MCP server, or a third-party integration" alike.
Command levelrail-mcp is an MCP (Model Context Protocol) server that lets an AI agent manage a control plane deployment through the same versioned REST API (internal/api, mounted at /api/v1) cmd/levelrail-cli already drives: see internal/apiclient's own doc comment, and internal/store/tokens.go's APIToken doc comment on why a bearer token was always meant to authenticate "a CLI, an MCP server, or a third-party integration" alike.
internal
agent
Package agent is the transport boundary: the interface ADR 003 describes ("the reconciler and everything above the transport boundary never knows whether it's talking to a local in-process agent or a remote one over mTLS") but that Phase 1 never actually built, confirmed directly against this repo before writing this package: every reconcile controller (internal/reconcile/application, internal/reconcile/database) takes a bare docker.Runtime, and cmd/levelrail/main.go's dynamicSource hands every controller the same single local docker.Runtime with no node concept anywhere.
Package agent is the transport boundary: the interface ADR 003 describes ("the reconciler and everything above the transport boundary never knows whether it's talking to a local in-process agent or a remote one over mTLS") but that Phase 1 never actually built, confirmed directly against this repo before writing this package: every reconcile controller (internal/reconcile/application, internal/reconcile/database) takes a bare docker.Runtime, and cmd/levelrail/main.go's dynamicSource hands every controller the same single local docker.Runtime with no node concept anywhere.
agentinit
Package agentinit renders the files "init" writes into a project: app.yaml, AGENTS.md and .mcp.json.
Package agentinit renders the files "init" writes into a project: app.yaml, AGENTS.md and .mcp.json.
ai
Package ai implements the BYOK AI assistant chat feature: a provider-agnostic turn engine (engine.go) that runs a conversation against an LLM (Provider below) with tool use backed by the existing MCP tool surface (toolcaller.go, internal/mcptools), pausing every mutating tool call for an explicit human confirmation click (classify.go).
Package ai implements the BYOK AI assistant chat feature: a provider-agnostic turn engine (engine.go) that runs a conversation against an LLM (Provider below) with tool use backed by the existing MCP tool surface (toolcaller.go, internal/mcptools), pausing every mutating tool call for an explicit human confirmation click (classify.go).
alerting
Package alerting implements threshold rules over internal/telemetry's metrics and logs, and crashloop detection as a built-in rule kind sharing the same evaluate/notify path rather than a separate mechanism.
Package alerting implements threshold rules over internal/telemetry's metrics and logs, and crashloop detection as a built-in rule kind sharing the same evaluate/notify path rather than a separate mechanism.
api
Package api implements the HTTP API the web frontend (1.10) and, later, the MCP layer both build on.
Package api implements the HTTP API the web frontend (1.10) and, later, the MCP layer both build on.
apiclient
Package apiclient is the one HTTP client implementation for the control plane's versioned API (internal/api, mounted at /api/v1).
Package apiclient is the one HTTP client implementation for the control plane's versioned API (internal/api, mounted at /api/v1).
attention
Package attention builds the list of things an operator should look at right now, shared by the CLI and the MCP server.
Package attention builds the list of things an operator should look at right now, shared by the CLI and the MCP server.
backup
Package backup drives a database backup end to end: dump a managed database container's data, stream it straight to an S3-compatible bucket, and record the attempt in store.BackupHistory.
Package backup drives a database backup end to end: dump a managed database container's data, stream it straight to an S3-compatible bucket, and record the attempt in store.BackupHistory.
bindaddr
Package bindaddr resolves the small bind-address vocabulary app services and managed databases use to choose which network interface a published port binds to.
Package bindaddr resolves the small bind-address vocabulary app services and managed databases use to choose which network interface a published port binds to.
bindmount
Package bindmount validates a service's bind-mount host path, shared by internal/compose and internal/spec: internal/compose imports internal/spec (a compose service expands into a spec.Service), so neither of those two packages can hold this logic without the other importing it back and cycling.
Package bindmount validates a service's bind-mount host path, shared by internal/compose and internal/spec: internal/compose imports internal/spec (a compose service expands into a spec.Service), so neither of those two packages can hold this logic without the other importing it back and cycling.
bitbucketapp
Package bitbucketapp implements OAuth2 and the small slice of Bitbucket Cloud's REST API this control plane needs once connected.
Package bitbucketapp implements OAuth2 and the small slice of Bitbucket Cloud's REST API this control plane needs once connected.
brand
Package brand provides the branding indirection layer this project requires: no product name is ever hardcoded in source.
Package brand provides the branding indirection layer this project requires: no product name is ever hardcoded in source.
build
Package build drives container image builds through BuildKit's Go client (github.com/moby/buildkit/client), never by shelling out to `docker build` or the `docker` CLI, matching the same "no CLI shelling" rule the node communication layer follows.
Package build drives container image builds through BuildKit's Go client (github.com/moby/buildkit/client), never by shelling out to `docker build` or the `docker` CLI, matching the same "no CLI shelling" rule the node communication layer follows.
catalog
Package catalog holds Levelrail's own curated set of one-click service templates (ADR 015).
Package catalog holds Levelrail's own curated set of one-click service templates (ADR 015).
changelog
Package changelog parses the repo's release-please-maintained CHANGELOG.md into the entries GET /api/v1/changelog and the dashboard's "What's new" panel serve, so release notes keep exactly one source of truth instead of a second, hand-curated copy.
Package changelog parses the repo's release-please-maintained CHANGELOG.md into the entries GET /api/v1/changelog and the dashboard's "What's new" panel serve, so release notes keep exactly one source of truth instead of a second, hand-curated copy.
changes
Package changes answers "what changed on this app recently" by merging the app event log, deploy attempts and the audit log into one ordered list.
Package changes answers "what changed on this app recently" by merging the app event log, deploy attempts and the audit log into one ordered list.
compose
Package compose parses a Docker Compose file into Levelrail's own desired-state model, in two shapes depending on the caller.
Package compose parses a Docker Compose file into Levelrail's own desired-state model, in two shapes depending on the caller.
costestimate
Package costestimate is a deterministic, pure-Go engine that turns an app's CPU/memory allocation into an ESTIMATED monthly cost under a few generic reference pricing profiles (a plain VM, a managed VM, a metered container PaaS).
Package costestimate is a deterministic, pure-Go engine that turns an app's CPU/memory allocation into an ESTIMATED monthly cost under a few generic reference pricing profiles (a plain VM, a managed VM, a metered container PaaS).
cpbackup
Package cpbackup manages control plane self-backups: verified SQLite snapshots kept in a directory under the data dir.
Package cpbackup manages control plane self-backups: verified SQLite snapshots kept in a directory under the data dir.
cronexpr
Package cronexpr parses and evaluates standard 5-field cron expressions ("minute hour day-of-month month day-of-week", e.g.
Package cronexpr parses and evaluates standard 5-field cron expressions ("minute hour day-of-month month day-of-week", e.g.
deploy
Package deploy is the build integration: it connects internal/spec's build declaration to internal/build's BuildKit client, and a successful build's output to internal/store's desired state, closing the loop the application controller (internal/reconcile/ application) reads from on every reconcile.
Package deploy is the build integration: it connects internal/spec's build declaration to internal/build's BuildKit client, and a successful build's output to internal/store's desired state, closing the loop the application controller (internal/reconcile/ application) reads from on every reconcile.
deploylog
Package deploylog is the glue between internal/build.ProgressEvent (the progress callback all three real deploy-attempt trigger paths already thread through internal/deploy.Pipeline.Deploy) and two real consumers: a persisted, replayable row in telemetry.db (internal/telemetry's deploy_logs table) and any currently-connected SSE viewer watching that same attempt live.
Package deploylog is the glue between internal/build.ProgressEvent (the progress callback all three real deploy-attempt trigger paths already thread through internal/deploy.Pipeline.Deploy) and two real consumers: a persisted, replayable row in telemetry.db (internal/telemetry's deploy_logs table) and any currently-connected SSE viewer watching that same attempt live.
diagnose
Package diagnose is a deterministic, pure-Go pattern matcher over diagnostic signals the platform already collects: deploy attempt status/error, reconcile condition reason strings, crashloop alert state, and recent log lines.
Package diagnose is a deterministic, pure-Go pattern matcher over diagnostic signals the platform already collects: deploy attempt status/error, reconcile condition reason strings, crashloop alert state, and recent log lines.
diskspace
Package diskspace provides a single, reusable free-disk-space check (statfs's Bavail, the same "free space an unprivileged user could actually write" number GET /api/v1/system/doctor's disk_space check and GET /api/v1/system/status already surface), so disk-heavy operations elsewhere in this codebase (BuildKit builds, backup bookkeeping) can gate on it without reimplementing the syscall.
Package diskspace provides a single, reusable free-disk-space check (statfs's Bavail, the same "free space an unprivileged user could actually write" number GET /api/v1/system/doctor's disk_space check and GET /api/v1/system/status already surface), so disk-heavy operations elsewhere in this codebase (BuildKit builds, backup bookkeeping) can gate on it without reimplementing the syscall.
dnsrecords
Package dnsrecords builds a provider-agnostic DNS record manager from whichever ACME DNS-01 provider a control plane already has credentials for (Cloudflare or Route53), reusing libdns's own interfaces instead of inventing a second one: github.com/libdns/cloudflare and github.com/libdns/route53, both already a dependency via internal/ingress's Caddy DNS-01 wiring, implement them already.
Package dnsrecords builds a provider-agnostic DNS record manager from whichever ACME DNS-01 provider a control plane already has credentials for (Cloudflare or Route53), reusing libdns's own interfaces instead of inventing a second one: github.com/libdns/cloudflare and github.com/libdns/route53, both already a dependency via internal/ingress's Caddy DNS-01 wiring, implement them already.
docker
Package docker wraps the Docker Engine API.
Package docker wraps the Docker Engine API.
dockerhub
Package dockerhub implements a minimal client for Docker Hub's public, unauthenticated Hub API: repository search and tag listing, used to let an operator discover a well-known public image from the app-creation "docker image" step (RegistryImagePicker.tsx) instead of typing a reference blind.
Package dockerhub implements a minimal client for Docker Hub's public, unauthenticated Hub API: repository search and tag listing, used to let an operator discover a well-known public image from the app-creation "docker image" step (RegistryImagePicker.tsx) instead of typing a reference blind.
dockertest
Package dockertest holds test helpers shared by every package whose _live_test.go files need a real Docker daemon (or other real, network-dependent infra) to run.
Package dockertest holds test helpers shared by every package whose _live_test.go files need a real Docker daemon (or other real, network-dependent infra) to run.
email
Package email is the platform's one email-sending capability: a narrow Sender interface plus SMTP, SES, and Resend implementations, shared by internal/alerting and internal/api so neither imports the other.
Package email is the platform's one email-sending capability: a narrow Sender interface plus SMTP, SES, and Resend implementations, shared by internal/alerting and internal/api so neither imports the other.
experimental
Package experimental is the single platform gate for features hidden at launch.
Package experimental is the single platform gate for features hidden at launch.
failure
Package failure classifies a failed, held or unhealthy deploy into one structured object shared by the API, CLI and MCP surfaces.
Package failure classifies a failed, held or unhealthy deploy into one structured object shared by the API, CLI and MCP surfaces.
firewall
Package firewall manages host ufw rules as declarative allow/deny records.
Package firewall manages host ufw rules as declarative allow/deny records.
forecast
Package forecast projects a resource's usage trend forward with a plain ordinary-least-squares line fit over recent (timestamp, bytes used) samples: deterministic, pure-Go, no external model, the same read-and-suggest shape internal/rightsizing already establishes.
Package forecast projects a resource's usage trend forward with a plain ordinary-least-squares line fit over recent (timestamp, bytes used) samples: deterministic, pure-Go, no external model, the same read-and-suggest shape internal/rightsizing already establishes.
giteaapp
Package giteaapp implements OAuth2 and the small slice of Gitea's REST API this control plane needs once connected.
Package giteaapp implements OAuth2 and the small slice of Gitea's REST API this control plane needs once connected.
githubapp
Package githubapp implements the GitHub App manifest registration flow, App-level JWT signing (RS256, per GitHub's own App authentication spec), and the small slice of the GitHub REST API this control plane needs once an App is connected: minting installation access tokens, listing an installation's repositories, and listing a repository's branches.
Package githubapp implements the GitHub App manifest registration flow, App-level JWT signing (RS256, per GitHub's own App authentication spec), and the small slice of the GitHub REST API this control plane needs once an App is connected: minting installation access tokens, listing an installation's repositories, and listing a repository's branches.
gitlabapp
Package gitlabapp implements OAuth2 and the small slice of GitLab's REST API this control plane needs once connected.
Package gitlabapp implements OAuth2 and the small slice of GitLab's REST API this control plane needs once connected.
gitprovider
Package gitprovider holds the small slice of REST-client plumbing that is genuinely identical across internal/githubapp, internal/gitlabapp, and internal/bitbucketapp: sending a built request and turning its response into either a decoded value or a uniform API error.
Package gitprovider holds the small slice of REST-client plumbing that is genuinely identical across internal/githubapp, internal/gitlabapp, and internal/bitbucketapp: sending a built request and turning its response into either a decoded value or a uniform API error.
gpu
Package gpu detects NVIDIA GPUs on a node by querying nvidia-smi and the Docker daemon's registered runtimes.
Package gpu detects NVIDIA GPUs on a node by querying nvidia-smi and the Docker daemon's registered runtimes.
iac
Package iac turns multi-document YAML resource files into a plan of changes against a control plane and applies it through the ordinary REST API, so per-resource authorization applies to every item.
Package iac turns multi-document YAML resource files into a plan of changes against a control plane and applies it through the ordinary REST API, so per-resource authorization applies to every item.
importplan
Package importplan classifies an import input (repo URL, docker run command, image reference, compose file or Dockerfile) and builds a side-effect free deployment plan preview from it.
Package importplan classifies an import input (repo URL, docker run command, image reference, compose file or Dockerfile) and builds a side-effect free deployment plan preview from it.
ingress
Package ingress is the Phase 0 spike for embedding Caddy as a Go library, driven entirely through its in-process admin API.
Package ingress is the Phase 0 spike for embedding Caddy as a Go library, driven entirely through its in-process admin API.
integrations
Package integrations holds the curated catalog of third-party tools an app can attach (internal/catalog's deployable-template catalog is unrelated: this is per-app add-ons, not services to deploy).
Package integrations holds the curated catalog of third-party tools an app can attach (internal/catalog's deployable-template catalog is unrelated: this is per-app add-ons, not services to deploy).
loadbalancer
Package loadbalancer is the product-level load balancer model layered on the embedded Caddy reverse_proxy upstream pool (internal/ingress).
Package loadbalancer is the product-level load balancer model layered on the embedded Caddy reverse_proxy upstream pool (internal/ingress).
loadbalancer/lbexport
Package lbexport renders a load balancer config as Terraform, CDK, CloudFormation, Caddyfile or Caddy JSON.
Package lbexport renders a load balancer config as Terraform, CDK, CloudFormation, Caddyfile or Caddy JSON.
mcptools
Package mcptools builds the MCP tool server every levelrail-mcp transport (stdio, network, and the in-process transport an embedded caller like internal/ai uses) shares: one *mcp.Server with every tool registered against the same apiclient.Client.
Package mcptools builds the MCP tool server every levelrail-mcp transport (stdio, network, and the in-process transport an embedded caller like internal/ai uses) shares: one *mcp.Server with every tool registered against the same apiclient.Client.
models
Package models manages AI model resources: an inference engine (Ollama, vLLM, llama.cpp) running as a container on a GPU node, with an OpenAI-compatible endpoint fronted by an API-key gateway.
Package models manages AI model resources: an inference engine (Ollama, vLLM, llama.cpp) running as a container on a GPU node, with an OpenAI-compatible endpoint fronted by an API-key gateway.
netguard
Package netguard builds HTTP clients for user-configured outbound URLs (alert and deploy notification webhooks) that refuse to connect to loopback, private, link-local, or otherwise internal addresses.
Package netguard builds HTTP clients for user-configured outbound URLs (alert and deploy notification webhooks) that refuse to connect to loopback, private, link-local, or otherwise internal addresses.
network
Package network is ADR 006's WireGuard mesh: the abstraction that ADR 006 says "has to be designed in Phase 1 as an interface, not a concrete WireGuard dependency" and that, until now, did not exist at all (the directory the project's repo layout reserves for it was empty).
Package network is ADR 006's WireGuard mesh: the abstraction that ADR 006 says "has to be designed in Phase 1 as an interface, not a concrete WireGuard dependency" and that, until now, did not exist at all (the directory the project's repo layout reserves for it was empty).
objectstore
Package objectstore is the S3-compatible storage layer shared by log archive and other features that write to a connected storage destination.
Package objectstore is the S3-compatible storage layer shared by log archive and other features that write to a connected storage destination.
objectstore/objectstoretest
Package objectstoretest is an in-memory, path-style S3 server for tests.
Package objectstoretest is an in-memory, path-style S3 server for tests.
oidc
Package oidc mints short-lived, signed OIDC tokens for pipeline jobs that opt in with `oidc: {audience: ...}`, and publishes the matching JWKS so AWS IAM, GCP workload identity federation, and Vault's JWT auth method can verify them without a long-lived credential ever touching a job.
Package oidc mints short-lived, signed OIDC tokens for pipeline jobs that opt in with `oidc: {audience: ...}`, and publishes the matching JWKS so AWS IAM, GCP workload identity federation, and Vault's JWT auth method can verify them without a long-lived credential ever touching a job.
passkey
Package passkey wraps github.com/go-webauthn/webauthn for this project's two ceremonies (registering a credential, signing in with one).
Package passkey wraps github.com/go-webauthn/webauthn for this project's two ceremonies (registering a credential, signing in with one).
pathfilter
Package pathfilter matches changed file paths against doublestar-style globs, the filter behind pipeline `paths` / `paths_ignore` and the deploy-on-push path filters.
Package pathfilter matches changed file paths against doublestar-style globs, the filter behind pipeline `paths` / `paths_ignore` and the deploy-on-push path filters.
pipeline
Package pipeline is a user-defined CI/CD layer on top of the existing build and deploy primitives.
Package pipeline is a user-defined CI/CD layer on top of the existing build and deploy primitives.
platformimport
Package platformimport reads apps from another self-hosted platform (read-only) into a neutral model and maps it to this platform's resources.
Package platformimport reads apps from another self-hosted platform (read-only) into a neutral model and maps it to this platform's resources.
preflight
Package preflight runs deterministic pre-deploy checks (DNS, ports, disk, memory, image and git reachability, env, mounts, GPU) and reports pass, warn or fail with a reason and fix hint for each.
Package preflight runs deterministic pre-deploy checks (DNS, ports, disk, memory, image and git reachability, env, mounts, GPU) and reports pass, warn or fail with a reason and fix hint for each.
preview
Package preview captures a thumbnail of each deployed release with a short-lived browser container and keeps them within bounded storage.
Package preview captures a thumbnail of each deployed release with a short-lived browser container and keeps them within bounded storage.
probe
Package probe implements readiness and liveness checks the controller runs against a container: an HTTP(S) request to its published port, or a command exec'd inside it.
Package probe implements readiness and liveness checks the controller runs against a container: an HTTP(S) request to its published port, or a command exec'd inside it.
prompb
Package prompb implements the small subset of Prometheus's remote-read wire protocol needed for a Prometheus remote read endpoint (ReadRequest/ReadResponse and their nested messages), by hand, using google.golang.org/protobuf's low-level protowire primitives (already a transitive dependency, no new module).
Package prompb implements the small subset of Prometheus's remote-read wire protocol needed for a Prometheus remote read endpoint (ReadRequest/ReadResponse and their nested messages), by hand, using google.golang.org/protobuf's low-level protowire primitives (already a transitive dependency, no new module).
provision
Package provision creates and tears down cloud VMs at a provider (Hetzner, DigitalOcean, Azure, GCP) so a fresh node can join the fleet through the existing join-token enrollment flow, without an operator manually clicking through a cloud console first.
Package provision creates and tears down cloud VMs at a provider (Hetzner, DigitalOcean, Azure, GCP) so a fresh node can join the fleet through the existing join-token enrollment flow, without an operator manually clicking through a cloud console first.
reconcile
Package reconcile implements the core convergence loop: desired state in, observed state diffed against it, idempotent and level-triggered controllers converge the two.
Package reconcile implements the core convergence loop: desired state in, observed state diffed against it, idempotent and level-triggered controllers converge the two.
reconcile/application
Package application implements the declarative app spec's service contract and the application controller: the reconcile.Controller that converges a real, store-backed desired service to a running container, replacing nginxdemo's hardcoded desired state with the real thing.
Package application implements the declarative app spec's service contract and the application controller: the reconcile.Controller that converges a real, store-backed desired service to a running container, replacing nginxdemo's hardcoded desired state with the real thing.
reconcile/cloudflaretunnel
Package cloudflaretunnel implements the reconcile.Controller that converges a single, platform-wide desired state (store.
Package cloudflaretunnel implements the reconcile.Controller that converges a single, platform-wide desired state (store.
reconcile/database
Package database implements the managed database controller: the reconcile.Controller that converges a store-backed store.DesiredDatabase to a running, volume-backed container, the same architectural pattern internal/reconcile/application already establishes (level-triggered, deterministic naming, a narrow store interface for testability), applied to a database instead of a built application image.
Package database implements the managed database controller: the reconcile.Controller that converges a store-backed store.DesiredDatabase to a running, volume-backed container, the same architectural pattern internal/reconcile/application already establishes (level-triggered, deterministic naming, a narrow store interface for testability), applied to a database instead of a built application image.
reconcile/firewall
Package firewall implements the reconcile.Controller that converges internal/store's firewall_rules table onto the local host's ufw via internal/firewall.
Package firewall implements the reconcile.Controller that converges internal/store's firewall_rules table onto the local host's ufw via internal/firewall.
reconcile/ingress
Package ingress implements the ingress controller: the reconcile.Controller that keeps Caddy's config (internal/ingress, ADR 005) in sync with every service that declares domains.
Package ingress implements the ingress controller: the reconcile.Controller that keeps Caddy's config (internal/ingress, ADR 005) in sync with every service that declares domains.
reconcile/mesh
Package mesh implements the mesh controller: the reconcile.Controller that keeps the WireGuard mesh and the internal DNS zone converged on whatever the store currently says the fleet and its placements look like.
Package mesh implements the mesh controller: the reconcile.Controller that keeps the WireGuard mesh and the internal DNS zone converged on whatever the store currently says the fleet and its placements look like.
reconcile/nginxdemo
Package nginxdemo is the Phase 0 exit criterion: one controller that keeps a single hardcoded nginx container running.
Package nginxdemo is the Phase 0 exit criterion: one controller that keeps a single hardcoded nginx container running.
reconcile/nodehealth
Package nodehealth implements the node health check: the reconcile.Controller that converges a node's observed heartbeat (internal/store's last_seen_at, kept fresh by internal/agent.Server's periodic touch loop while a node's gRPC session stays open) against its recorded Status, the same architectural pattern internal/reconcile/application and internal/reconcile/database already establish (level-triggered, a narrow store interface for testability, one controller instance per resource), applied to a node instead of a service or database.
Package nodehealth implements the node health check: the reconcile.Controller that converges a node's observed heartbeat (internal/store's last_seen_at, kept fresh by internal/agent.Server's periodic touch loop while a node's gRPC session stays open) against its recorded Status, the same architectural pattern internal/reconcile/application and internal/reconcile/database already establish (level-triggered, a narrow store interface for testability, one controller instance per resource), applied to a node instead of a service or database.
reconcile/registry
Package registry implements the reconcile.Controller that converges a single, platform-wide desired state (store.RegistrySettings plus a generated password in internal/secrets) to a running or absent registry:2 container: Levelrail's own built-in image registry, so a multi-node deployment gets a BuildKit cache/distribution backend (internal/build's WithCacheRegistry) without an operator first signing up for an external one.
Package registry implements the reconcile.Controller that converges a single, platform-wide desired state (store.RegistrySettings plus a generated password in internal/secrets) to a running or absent registry:2 container: Levelrail's own built-in image registry, so a multi-node deployment gets a BuildKit cache/distribution backend (internal/build's WithCacheRegistry) without an operator first signing up for an external one.
registrycatalog
Package registrycatalog implements a minimal client for the Docker Registry HTTP API v2's catalog endpoints (_catalog, <name>/tags/list), used to browse repositories and tags in Levelrail's own built-in registry (internal/reconcile/registry) from the app-creation UI.
Package registrycatalog implements a minimal client for the Docker Registry HTTP API v2's catalog endpoints (_catalog, <name>/tags/list), used to browse repositories and tags in Levelrail's own built-in registry (internal/reconcile/registry) from the app-creation UI.
rightsizing
Package rightsizing is a deterministic, pure-Go engine that turns an app's historical CPU/memory usage into a resource-limit suggestion.
Package rightsizing is a deterministic, pure-Go engine that turns an app's historical CPU/memory usage into a resource-limit suggestion.
scheduledeploy
Package scheduledeploy checks, on an interval, which apps have a due cron schedule (store.AppSchedule, migrations/0250_app_schedules.sql) and redeploys the latest commit on their configured branch.
Package scheduledeploy checks, on an interval, which apps have a due cron schedule (store.AppSchedule, migrations/0250_app_schedules.sql) and redeploys the latest commit on their configured branch.
scheduledtask
Package scheduledtask execs an operator-defined command into a running app's container on a cron schedule (e.g.
Package scheduledtask execs an operator-defined command into a running app's container on a cron schedule (e.g.
secrets
Package secrets implements envelope encryption: per-app data encryption keys, wrapped by a master key held only by the control plane, using filippo.io/age for the crypto primitives.
Package secrets implements envelope encryption: per-app data encryption keys, wrapped by a master key held only by the control plane, using filippo.io/age for the crypto primitives.
sharedenv
Package sharedenv composes internal/store's shared env var tables (project_env_vars, organization_env_vars, environment_env_vars) with internal/secrets' envelope encryption, so a secret-marked shared env var resolves to its decrypted plaintext by the time internal/reconcile/application's resolveEnv merges it into a running container's environment.
Package sharedenv composes internal/store's shared env var tables (project_env_vars, organization_env_vars, environment_env_vars) with internal/secrets' envelope encryption, so a secret-marked shared env var resolves to its decrypted plaintext by the time internal/reconcile/application's resolveEnv merges it into a running container's environment.
slowquery
Package slowquery parses already-stored container log lines (see internal/api/database_slow_queries.go) into structured slow-query entries for Postgres and MySQL.
Package slowquery parses already-stored container log lines (see internal/api/database_slow_queries.go) into structured slow-query entries for Postgres and MySQL.
spec
Package spec parses and validates the app.yaml file: the one declarative file a user writes in their repo, per the app spec design.
Package spec parses and validates the app.yaml file: the one declarative file a user writes in their repo, per the app spec design.
sshprovision
Package sshprovision adopts a machine the operator already has (any VPS, home server, Raspberry Pi) as a node by dialing into it over SSH and installing the node agent there.
Package sshprovision adopts a machine the operator already has (any VPS, home server, Raspberry Pi) as a node by dialing into it over SSH and installing the node agent there.
stackdetect
Package stackdetect inspects a local project directory and guesses how the platform should build it.
Package stackdetect inspects a local project directory and guesses how the platform should build it.
statuspage
Package statuspage builds the opt-in public status page: component probing, 90-day uptime bars, operator-authored incidents and the whitelisted public view.
Package statuspage builds the opt-in public status page: component probing, 90-day uptime bars, operator-authored incidents and the whitelisted public view.
store
Package store is the embedded SQLite state layer: WAL mode, modernc.org/sqlite (pure Go, no cgo, keeps cross-compiling the control plane binary trivial), forward-only versioned migrations.
Package store is the embedded SQLite state layer: WAL mode, modernc.org/sqlite (pure Go, no cgo, keeps cross-compiling the control plane binary trivial), forward-only versioned migrations.
supplychain
Package supplychain records the SBOM of each build, optionally scans it for known vulnerabilities in a short-lived container, and decides whether a release may go live.
Package supplychain records the SBOM of each build, optionally scans it for known vulnerabilities in a short-lived container, and decides whether a release may go live.
telemetry
Package telemetry is the node-local metrics store, decided in ADR 009: a dedicated SQLite database (telemetry.db, separate from internal/store's levelrail.db) holding container resource-usage samples, queried in place rather than shipped anywhere centrally.
Package telemetry is the node-local metrics store, decided in ADR 009: a dedicated SQLite database (telemetry.db, separate from internal/store's levelrail.db) holding container resource-usage samples, queried in place rather than shipped anywhere centrally.
ticker
Package ticker is the run-until-cancelled loop shared by this codebase's periodic schedulers (backup, scheduledeploy, scheduledtask, updatecheck), extracted here so a new one doesn't add another copy.
Package ticker is the run-until-cancelled loop shared by this codebase's periodic schedulers (backup, scheduledeploy, scheduledtask, updatecheck), extracted here so a new one doesn't add another copy.
totp
Package totp implements time-based one-time passwords (RFC 6238, the algorithm every mainstream authenticator app speaks) plus the small amount of supporting logic 2FA needs: secret generation, an otpauth:// provisioning URI, and single-use recovery codes.
Package totp implements time-based one-time passwords (RFC 6238, the algorithm every mainstream authenticator app speaks) plus the small amount of supporting logic 2FA needs: secret generation, an otpauth:// provisioning URI, and single-use recovery codes.
untrusted
Package untrusted prepares attacker-influenced text (workload logs, env values, deploy output, error messages, commit messages, PR titles) for an AI model: it strips terminal and invisible characters, redacts obvious secrets, truncates, and wraps the result in a delimited block that says it is data.
Package untrusted prepares attacker-influenced text (workload logs, env values, deploy output, error messages, commit messages, PR titles) for an AI model: it strips terminal and invisible characters, redacts obvious secrets, truncates, and wraps the result in a delimited block that says it is data.
updatecheck
Package updatecheck periodically checks the configured update channel's latest release against the running build, when an operator has opted into auto-update checking (update_settings.auto_update_enabled, migrations/0258_update_settings.sql).
Package updatecheck periodically checks the configured update channel's latest release against the running build, when an operator has opted into auto-update checking (update_settings.auto_update_enabled, migrations/0258_update_settings.sql).
upgrade
Package upgrade runs the read-only checks that gate a platform self-upgrade.
Package upgrade runs the read-only checks that gate a platform self-upgrade.
vault
Package vault resolves a live secret value from an external HashiCorp Vault instance at container-create time, as an alternative to internal/secrets' own envelope-encrypted storage.
Package vault resolves a live secret value from an external HashiCorp Vault instance at container-create time, as an alternative to internal/secrets' own envelope-encrypted storage.
version
Package version holds the control plane's own build version, injected via -ldflags at release build time (see .github/workflows/release.yml).
Package version holds the control plane's own build version, injected via -ldflags at release build time (see .github/workflows/release.yml).
webhook
Package webhook is the git integration: a GitHub push-webhook receiver that verifies the request signature, extracts the pushed commit SHA, fetches the repository at that SHA to a local checkout, and hands the result to internal/deploy's Pipeline, the same pipeline a manual deploy trigger will use once the HTTP API exists.
Package webhook is the git integration: a GitHub push-webhook receiver that verifies the request signature, extracts the pushed commit SHA, fetches the repository at that SHA to a local checkout, and hands the result to internal/deploy's Pipeline, the same pipeline a manual deploy trigger will use once the HTTP API exists.
webpush
Package webpush sends browser push notifications (RFC 8030/8291) to every subscription this control plane's dashboard has registered, backing the "webpush" notification-channel kind in internal/alerting: an operator gets a deploy/alert notification even with no dashboard tab focused or open, something none of the other 17 channel kinds (all webhooks or email) can do on their own.
Package webpush sends browser push notifications (RFC 8030/8291) to every subscription this control plane's dashboard has registered, backing the "webpush" notification-channel kind in internal/alerting: an operator gets a deploy/alert notification even with no dashboard tab focused or open, something none of the other 17 channel kinds (all webhooks or email) can do on their own.
kit module
scripts
gen-api-reference command
Command gen-api-reference regenerates the route tables in docs/api-reference.md and the route metadata in internal/api/openapi_gen.go, both derived from the mux registrations in internal/api/routes*.go.
Command gen-api-reference regenerates the route tables in docs/api-reference.md and the route metadata in internal/api/openapi_gen.go, both derived from the mux registrations in internal/api/routes*.go.
gen-template-catalog-docs command
Command gen-template-catalog-docs regenerates the per-category tables in docs/template-catalog.md from internal/catalog.Templates, the same data GET /api/v1/service-templates serves.
Command gen-template-catalog-docs regenerates the per-category tables in docs/template-catalog.md from internal/catalog.Templates, the same data GET /api/v1/service-templates serves.
go-top-level-idents command
Command go-top-level-idents prints every top-level identifier (func, method, type, var, const, including grouped blocks) a single Go file declares, one per line.
Command go-top-level-idents prints every top-level identifier (func, method, type, var, const, including grouped blocks) a single Go file declares, one per line.
test
e2e
e2e/testenv
Package testenv holds the live-Docker test helpers shared by both test/e2e (tests that exercise a real api.Router over HTTP) and test/e2e/reconcile (tests that drive the reconciler/Docker runtime directly, with no internal/api dependency).
Package testenv holds the live-Docker test helpers shared by both test/e2e (tests that exercise a real api.Router over HTTP) and test/e2e/reconcile (tests that drive the reconciler/Docker runtime directly, with no internal/api dependency).
Package web embeds the built frontend via embed.FS, keeping the control plane a single static binary with no Node runtime required on the server, and serves it with client-side-routing fallback, so a hard refresh or direct link to a TanStack Router path like /apps/foo resolves correctly instead of 404ing at the server before React Router ever gets a chance to handle it.
Package web embeds the built frontend via embed.FS, keeping the control plane a single static binary with no Node runtime required on the server, and serves it with client-side-routing fallback, so a hard refresh or direct link to a TanStack Router path like /apps/foo resolves correctly instead of 404ing at the server before React Router ever gets a chance to handle it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL