Caddy Lifecycle API

The Lifecycle API from Caddy — 2 operation(s) for lifecycle.

OpenAPI Specification

caddy-lifecycle-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Caddy Admin Adapt Lifecycle API
  version: '1.0'
  description: Minimal OpenAPI 3.1 description of the Caddy web server admin API. By default the admin endpoint is bound to localhost:2019 and is used to inspect and dynamically modify the running configuration without restarts.
  x-generated-from: https://caddyserver.com/docs/api
  x-generated-by: claude-crawl-2026-05-08
servers:
- url: http://localhost:2019
  description: Default admin endpoint
tags:
- name: Lifecycle
paths:
  /load:
    post:
      tags:
      - Lifecycle
      summary: Set or replace the active configuration
      operationId: loadConfig
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Config'
      responses:
        '200':
          description: Loaded
        '400':
          description: Invalid configuration
  /stop:
    post:
      tags:
      - Lifecycle
      summary: Gracefully shut down the server
      operationId: stopServer
      responses:
        '200':
          description: Stopped
components:
  schemas:
    Config:
      type: object
      additionalProperties: true