Introducing a new way to review your PRs.

Read the announcement

getarcaneapp / arcane

Modern Docker Management, Designed for Everyone

View on GitHub

26 documents · Updated Oct 19, 2026

docs / workload-management

Containers, environments, and workloads

Arcane is a control plane for Docker workloads. It gives one view of local, remote, and edge Docker targets and lets an engineer create, inspect, change, deploy, and remove projects, containers, networks, volumes, ports, and templates. Each action stays tied to the selected environment and reports the resulting runtime state.

Workload model

Environment scope

An environment is a named Docker target. The local Docker daemon uses the reserved local environment. Other environments use direct HTTP or an edge agent. Arcane uses this scope for workload reads, writes, health state, access checks, and live updates, so one control plane can address several Docker targets.

An environment joins saved connection data with current runtime data. Saved data identifies the target, its enabled and visible state, its access token, and its optional cluster relationship. Runtime data describes reachability, transport, session state, polling, and agent capabilities. Only enabled and visible remote environments are active targets for remote work.

Environment lists are filtered by the caller's environment permissions. The REST list and live stream use the same accessible set, so the environment switcher and live updates do not expose different targets. Runtime changes wake stream producers, while periodic reloads provide a safety net for changes that do not emit a signal.

References: backend/…/service.go• L332-455 backend/…/service.go• L717-747 backend/…/handler.go• L168-294 backend/…/helpers.go• L11-85 backend/…/module.go• L74-172

Project scope

A project is a Docker Compose application grouped under one environment. Its Compose files describe the desired application shape. Arcane relates that shape to the containers Docker runs, so project views can show intended services beside live state.

Projects are the main unit for multi-container work. They support deployment, stop, restart, image pull and build, service updates, redeploy, archive, and destroy actions. An archived project stays inactive until it is unarchived. GitOps can supply project files and then use the same project lifecycle to apply them to Docker. See GitOps and project automation for that source flow.

References: backend/…/model.go• L23-39 backend/…/project_details.go• L92-181 backend/…/project_lifecycle.go• L266-329 backend/…/project_lifecycle.go• L338-400 backend/…/project_sync.go• L140-181

Container scope

A container is the smallest directly managed workload unit. Arcane supports standalone containers and containers owned by a Compose project. Standalone creation can define the image, command, storage, resource limits, ports, networks, health check, and restart behavior. Compose containers remain tied to the project definition.

The container view supports inventory, grouping, detail, logs, processes, resource use, shell access, Compose data, inspect data, image snapshots, and lifecycle actions. The API also supports start, stop, restart, kill, pause, unpause, redeploy, edit, delete, and auto-update control. These actions carry the environment and container identity into activity and event records.

Compose ownership controls change paths. A Compose-managed container is redeployed through its project service and cannot be edited as a standalone container. A standalone container can be recreated from its inspected Docker configuration. Edits change only the sections owned by the request, so unrelated runtime settings remain in place. Replacement work journals the original before it changes names, restores the original after a failed replacement, and resolves interrupted redeploys after a restart.

References: backend/…/handler.go• L45-69 backend/…/handler.go• L216-337 backend/…/handler.go• L392-535 backend/…/handler.go• L561-739 backend/…/model.go• L5-15 backend/…/service.go• L200-329 backend/…/service.go• L533-650 backend/…/service.go• L653-873 backend/…/service.go• L1119-1151

Shared runtime resources

Networks, volumes, and ports connect containers to each other and to the outside world. Arcane treats them as first-class workload resources and derives their use from Docker's current container state. This keeps resource pages useful even when Docker changed outside Arcane.

The platform can also merge resource results across accessible environments. A failed target is reported as a failed environment instead of being presented as an empty resource set. Dashboards can combine containers, images, networks, and volumes into a view of one selected environment.

References: backend/…/service.go• L390-460 backend/…/service.go• L30-80 backend/…/service.go• L764-931

Workload control flow

Environment-targeted operations

Every workload action starts with an environment target. Arcane resolves that target, selects the local Docker client or a remote transport, performs the action, and returns the result through the same API shape. The remote transport can use direct HTTP or an edge tunnel, and it forwards the access token and activity batch identity needed by the target.

Health checks use the matching path for the target: the local Docker socket, a direct agent URL, or an edge tunnel. A successful remote health check can trigger delivery of manager-owned registries, backup destinations, Git repositories, and global variables. Delivery skips an unchanged payload, but a reconnect forces a fresh sync.

The following diagram shows how a workload request moves from the selected environment to Docker and back to the user.

flowchart LR
    U[Engineer or UI] --> E[Selected environment]
    E --> R{Runtime path}
    R --> L[Local Docker daemon]
    R --> H[Remote agent over HTTP]
    R --> T[Edge tunnel]
    L --> W[Project or resource action]
    H --> W
    T --> W
    W --> X[Containers networks volumes ports and images]
    W --> S[Live state activity and events]
    S --> U

References: backend/…/service.go• L20-88 backend/…/service.go• L34-186 backend/…/service.go• L189-366 backend/…/service.go• L1105-1164 backend/…/handler.go• L503-535

Environment listing and live state

The environment view combines saved records with current edge state. A list applies visibility and caller access rules, then overlays tunnel and poll data. An edge target is online when its tunnel is active, standby when it has recent poll data, and offline when neither is true unless it is still pending pairing.

The live stream reloads after environment changes and publishes runtime updates on a short interval. It filters each snapshot for the subscriber before sending it. This makes persisted status useful for management while keeping the user view close to the current connection state.

The following diagram shows how saved environment data becomes an access-controlled live view.

flowchart TD
    A[Saved environment records] --> B[Visible environment set]
    B --> C[Caller access scope]
    C --> D[Apply tunnel and poll state]
    D --> E[REST list or live snapshot]
    F[Environment or runtime change] --> G[Coalesced refresh signal]
    G --> D
    H[Periodic refresh] --> D

References: backend/…/handler.go• L168-294 backend/…/service.go• L923-1023 backend/…/service.go• L1266-1339 backend/…/helpers.go• L19-85

Container inventory flow

The container inventory loads summaries for the selected environment, applies search and filters, and then adds live resource samples when the view needs them. Project labels group Compose containers, while containers without a project stay in a separate group.

CPU sorting uses CPU percentage. Memory sorting uses memory bytes. Only running containers are sampled. A missing sample stays visible and sorts after available samples in either order. Samples are scoped to the Docker target, reused for a short time, and shared when concurrent requests ask for the same container.

The inventory treats an environment change as a new view. It drops old selections and rejects late results from an earlier target or refresh. Resource sorting also needs container read permission in addition to list permission.

The following diagram shows how an environment becomes a filtered container view with live data where it is useful.

flowchart TD
    A[Selected environment] --> B[Load container summaries]
    B --> C[Apply search and filters]
    C --> D{Resource sort requested?}
    D -->|Yes| E[Sample matching running containers]
    E --> F[Sort full result and paginate]
    D -->|No| G[Apply normal sort and paginate]
    F --> H[Show state ports updates and project relation]
    G --> H
    H --> I[Open detail or run an action]

References: backend/…/handler.go• L148-187 backend/…/service.go• L44-173 backend/…/service.go• L175-251 backend/…/service.go• L389-441 backend/…/service_test.go• L1213-1375

Project deployment flow

Project deployment turns Compose intent into runtime state. Arcane checks the project and its Compose input, runs any configured preparation, applies image pull or build policy, and asks the Compose engine to start the selected services. It then reads the resulting containers and health state.

The project path remains authoritative for Compose-managed services. A direct container redeploy uses that path when Arcane can identify the registered project. It uses inspected Docker configuration only for a container outside a registered project.

The following diagram shows the main deployment stages and the point where project intent becomes live workload state.

flowchart TD
    A[Project files] --> B[Load Compose application]
    B --> C[Run preparation step]
    C --> D[Pull or build images by policy]
    D --> E[Compose up services]
    E --> F[Read containers and health]
    F --> G[Set project status and counts]

References: backend/…/project_lifecycle.go• L338-400 backend/…/project_lifecycle.go• L678-735 backend/…/service.go• L576-631 backend/…/service.go• L633-650

Environment health and synchronization

Each enabled environment has a scheduled health check. The probe uses the local Docker socket for the local target, direct HTTP for a configured API URL, or an edge tunnel for an agent target. The check updates connection state and synchronizes manager-owned resources when a remote target is online.

Manual sync attempts each resource group and reports failed groups without hiding groups that succeeded. Environment credentials are linked to a target and can be rotated. A target URL change with an existing credential requires an explicit credential update. Token caches and active-target snapshots are invalidated when the target changes or is deleted.

Edge deployment support includes direct and outbound agent snippets. When edge mTLS is enabled, Arcane can issue client assets and render snippets that use them. Private key material is not returned inline. Protected downloads are audited without putting the key material in the audit record.

For clustered workloads, a manager environment can bind a visible environment to a Swarm node agent. A node has one visible binding unless an explicit rebind moves it. The agent environment remains a normal visible remote target for workload actions.

References: backend/…/service.go• L20-88 backend/…/service.go• L386-517 backend/…/service.go• L541-599 backend/…/service.go• L1032-1164 backend/…/service.go• L28-109 backend/…/service.go• L23-206 backend/…/handler.go• L568-722 backend/…/handler.go• L755-917

Runtime resources

Network relationships

A network is a Docker communication boundary. Arcane can list, inspect, create, remove, prune, and change container attachments. It also exposes a topology that represents networks as nodes and container attachments as links.

Network use comes from current container attachments. Default Docker networks remain visible and count as in use for platform summaries. Network changes validate requested IP addresses before Docker receives them and advance the topology view so later reads do not reuse a pre-change graph.

References: backend/…/service.go• L83-120 backend/…/service.go• L122-221 backend/…/service.go• L224-387 backend/…/service.go• L390-460 backend/…/handler.go• L91-118 backend/…/handler.go• L238-248

Volume storage

A volume is persistent Docker-managed storage that containers can mount. Arcane lists its driver, size, reference count, current container use, and internal-resource status. It can create, remove, rename, prune, inspect, browse, back up, and restore volumes.

The volume workspace gives an engineer a controlled way to inspect and change files. It checks the tree revision before a mutation, uses a helper that matches the consuming runtime identity where possible, and rolls back the affected paths if the change fails. Read and mutation work share per-volume coordination, so a download or browse operation does not race with a change.

Volume backup policies can run on schedules and can keep local snapshots, send snapshots to S3, or use both. Backup and restore work coordinates with containers that use the volume. Restore refuses unsafe overlap with Arcane-managed writers, stops eligible consumers, and starts the matching containers again after the data change. Policy records and backup history follow a volume rename.

Arcane reuses one helper per volume for concurrent read-only work and removes idle or orphaned helpers. Backup storage mirrors Arcane's /backups mount when available and otherwise uses a dedicated Docker volume. Centralized backup selection excludes Arcane-owned volumes and volumes mounted into Arcane. Volume lists join Docker's volume list with the current container mount map. Size sorting uses a recent usage snapshot and falls back to name order when no snapshot is ready.

Volume rename protects internal and backup volumes. It copies an unused volume to the new name, updates backup history and policies, and removes the source only after the metadata change succeeds. If metadata or source cleanup fails, the volume migration can report the partial state or roll back the copy.

References: backend/…/service.go• L63-123 backend/…/service.go• L475-633 backend/…/service.go• L87-198 backend/…/service.go• L317-469 backend/…/service.go• L91-185 backend/…/service.go• L290-363 backend/…/helpers.go• L46-113 backend/…/helpers.go• L115-239 backend/…/helpers.go• L31-67 backend/…/helpers.go• L132-262 backend/…/service.go• L131-150 backend/…/service.go• L193-210 backend/…/service.go• L464-538 backend/…/service.go• L691-761 backend/…/service.go• L764-931 backend/…/service.go• L951-1058

Port exposure

A port mapping connects a port inside a container to a port on the Docker host. Arcane uses one readable mapping shape for Compose services, standalone containers, and the environment-wide port list.

The port view is built from current Docker container summaries. It includes published mappings and internal-only ports. An internal-only port has no host port and stays distinct from a published mapping. The same view can therefore explain both service intent and current runtime exposure.

References: backend/…/service.go• L22-80 backend/…/service.go• L83-155 backend/…/handler.go• L18-49 backend/…/service_test.go• L46-180

Template-driven workload creation

Compose template sources

A Compose template is reusable Compose content with optional environment content and metadata. Arcane combines templates from local storage with templates from enabled remote registries. Local templates can be changed. Remote templates remain registry-owned until an engineer downloads them into local storage.

Local templates can also be represented by folders in the configured templates directory. Arcane syncs those folders into the template catalog and keeps their file ownership rules when an engineer edits or removes them. Template content can be previewed with service names and environment variables before project creation. The template describes the workload. The selected environment decides where the new project runs.

References: backend/…/handler.go• L84-172 backend/…/handler.go• L175-303 backend/…/service.go• L177-195 backend/…/service.go• L265-376 backend/…/service.go• L378-427 backend/…/service.go• L1070-1161 backend/…/service.go• L1188-1230 backend/…/handler.go• L710-782

Template registry flow

A template registry is a remote source that publishes Compose templates. Arcane validates registry URLs, fetches enabled registries, and merges their results with local templates.

Registry failures are isolated. Arcane keeps successful cached data and reports the failed source, so one unavailable registry does not block all template discovery. A remote template lookup can refresh the catalog when its ID is not in the current cache. Registry changes invalidate the remote catalog so later project creation does not use an old source list.

References: backend/…/module.go• L35-200 backend/…/handler.go• L334-449 backend/…/service.go• L553-670 backend/…/service.go• L672-750 backend/…/service.go• L775-867 backend/…/service.go• L951-1017 backend/…/service_test.go• L77-170 backend/…/service_test.go• L347-413

Live state and activities

Arcane treats Docker as the source of live workload state. It reads containers, networks, volumes, and images from the target. It also watches Docker events and suppresses expected event noise during controlled changes.

Container stats serve both resource views and platform metrics. The stats service samples running containers, scopes samples to the Docker host, reuses recent results, and exposes CPU, memory, process, network, disk, restart, and uptime measures. A live stream can keep history for one container. Resource-sorted inventory collects the full filtered set before pagination, so page order reflects the selected resource value.

Runtime pages connect a workload summary to diagnosis and change. Container views lead to logs, processes, metrics, shell access, health, network, storage, Compose, and inspect data. Volume views lead to workspace and backup recovery. These paths preserve the selected environment context.

References: backend/…/service.go• L44-173 backend/…/service.go• L254-387 backend/…/service.go• L389-441 backend/…/service_test.go• L1213-1375 backend/…/service_test.go• L658-891 backend/…/service.go• L83-120 backend/…/helpers.go• L408-469

Container and environment lifecycles

Environment lifecycle work covers target creation, pairing, health, connection changes, synchronization, edge security, and removal. Container lifecycle work covers the state and configuration of individual runtime units. Project lifecycle work sits between them by turning Compose files into groups of containers and coordinating their networks, volumes, images, and ports.

The key boundary is ownership. The environment selects the Docker target. The project owns the desired multi-service definition. Docker owns live containers and runtime resources. Arcane joins these views so each action uses the right owner and then reports the resulting state. Read Container and environment lifecycles for the detailed lifecycle view.

References: backend/…/service.go• L332-517 backend/…/service.go• L30-88 backend/…/project_lifecycle.go• L338-432 backend/…/service.go• L533-650 backend/…/service.go• L653-873

Change checklist

When these files or sections are changed, remember to consider these:

  • When an environment target, access token, or edge transport changes, keep health checks, direct HTTP, edge tunnels, active-target membership, cache invalidation, and deployment snippets aligned.
  • When environment visibility or access rules change, keep REST lists, aggregate requests, live streams, and remote snapshots based on the same accessible environment set.
  • When environment health or stream state changes, keep saved status, live tunnel state, poll state, wake-up signals, and periodic refresh consistent.
  • When manager-owned sync data changes, preserve credential conversion before send, unchanged-payload gating, reconnect resync, and partial results for independent resource groups.
  • When Compose identity or container change paths change, preserve project lookup, direct-edit rejection, standalone fallback, replacement journaling, rollback, startup recovery, and activity reporting.
  • When container inventory or resource sorting changes, keep filtering before sampling, full-result sorting, sample target scope, permission gates, unavailable-sample placement, and late-response rejection aligned.
  • When container edits change, keep partial-update behavior, preserved runtime settings, mount options, exposed ports, network attachments, and address validation aligned.
  • When network topology or attachment changes, invalidate the topology view and keep default-network use counts consistent with container attachments.
  • When port list mapping changes, keep published and internal-only rows, container identity, search fields, sorting, aggregation, and environment identity aligned.
  • When volume workspace, helper, backup, restore, or rename behavior changes, keep revision checks, runtime write identity, locks, helper cleanup, rollback, container stop and restart matching, policy records, and backup history aligned.
  • When volume backup storage changes, keep /backups mount mirroring, fallback volume use, local and S3 repository paths, recovery-key handling, and discovered remote instance roots aligned.
  • When volume list, centralized backup selection, or size behavior changes, keep internal-volume filtering, Arcane-mounted-volume exclusion, mount-based use detection, usage-cache fallback, anonymous-volume classification, and prune protection aligned.
  • When volume startup recovery changes, keep interrupted backup settlement separate from accepted workflows that must resume.
  • When template content or registry behavior changes, keep local folders, remote metadata, cache refresh, registry error display, parsed Compose services, environment content, and project creation inputs consistent.
  • When Swarm node binding or agent-key rotation changes, keep one-binding rules, explicit rebind behavior, visible-environment eligibility, key cleanup, and runtime state aligned.

Important failure modes

TriggerConsequenceGuard
An environment target changes while its old access token remains in useA credential can reach the wrong Docker targetTarget changes require an explicit credential update. Caches and token indexes are refreshed after the write.
A caller's environment access set differs between the REST list and live streamThe caller can see a target in one view but not the otherBoth paths derive the accessible environment IDs from the same permission set. backend/…/handler.go• L168-212, backend/…/handler.go• L274-294
An edge environment has no active tunnel or recent pollThe target is unreachable but appears onlineRuntime state derives online, standby, and offline from current tunnel and poll registries. backend/…/service.go• L1294-1338
A remote sync payload contains a credential that cannot be decryptedThe incomplete payload is not sent to the targetCredential conversion fails before the request is delivered. backend/…/service.go• L189-224, backend/…/service.go• L227-296
A Compose-managed container uses the standalone edit pathRuntime state can drift from the project definitionDirect edit rejects Compose ownership. Project service update owns the change. backend/…/service.go• L1145-1149, backend/…/service.go• L576-623
A replacement container fails during create or startThe original workload can be lost or left in the wrong stateArcane journals the original, removes the failed replacement, restores the original, and retries journal recovery after restart. backend/…/model.go• L5-15, backend/…/service.go• L200-329, backend/…/service.go• L738-873
A resource sort samples only part of the matching container setPage order is not globally correctBatch timeout or cancellation fails the sort request. An individual sample failure remains visible and sorts last. backend/…/service.go• L146-202, backend/…/service_test.go• L1246-1337
Samples are shared between Docker targetsOne environment shows another environment's CPU or memory valuesSample keys include the Docker host and container ID. backend/…/service.go• L204-234
A network attachment contains an invalid IP addressDocker does not receive the changeIPv4 and IPv6 values are parsed before the network operation. backend/…/service.go• L274-319
A topology read completes after a network mutationThe UI shows a stale graphNetwork mutations advance the topology generation, and builds use that generation before entering the cache. backend/…/service.go• L83-120, backend/…/service.go• L224-387
A port view assumes every exposed port has a host bindingInternal-only ports disappear or look publishedRows preserve zero host ports and mark publication from the Docker summary. backend/…/service.go• L36-52
A volume is removed or pruned while a browse helper still mounts itDocker reports a false in-use state or refuses the operationHelpers are stopped before delete, rename, and prune. backend/…/service.go• L466-522, backend/…/helpers.go• L376-406
A volume workspace update uses an old tree revisionOne edit can overwrite a later editThe current tree is read and compared before mutation. backend/…/service.go• L521-545, backend/…/service_test.go• L76-87
A workspace helper cannot support the volume's custom mountFile access can use the wrong path or mount semanticsWorkspace access rejects unsupported custom mount configurations before it starts a helper. backend/…/service.go• L402-412, backend/…/service_test.go• L46-74
A volume restore runs while an Arcane-managed writer still uses the volumeThe restore can corrupt active application dataRestore refuses the operation when a protected Arcane-managed writer is running. backend/…/helpers.go• L126-146
A volume rename updates Docker but not backup recordsBackup history and scheduled policies point to the old volume nameRename metadata is updated in one transaction and the data migration can roll back. backend/…/service.go• L1095-1128, backend/…/service_test.go• L124-141
Volume pruning includes an Arcane-managed volumeArcane's backup or helper storage can be deleted as unused dataThe prune request excludes the internal-resource label, and the service removes helper and policy state only for volumes Docker actually deleted. backend/…/service.go• L492-538
Centralized backup selection includes Arcane's own or mounted volumeA system backup can capture or overwrite Arcane runtime dataBackup options exclude internal volumes and volumes mounted into the Arcane container. backend/…/service.go• L718-761
A template registry failsThat source becomes stale or unavailableRegistry errors are isolated and successful cached sources remain usable. backend/…/service.go• L691-750

Key files

FileWhy to read it
backend/…/service.goShows environment targets, health jobs, synchronization, cache boundaries, and runtime state.
backend/…/handler.goShows environment access filtering, live snapshots, pairing, sync actions, and protected edge assets.
backend/…/service.goShows the local, direct-agent, and edge-tunnel connectivity paths.
backend/…/service.goShows remote and edge request routing and manager-to-agent sync.
backend/…/service.goShows direct-agent, edge-agent, and mTLS deployment guidance.
backend/…/service.goShows node binding rules and agent-key rotation.
backend/…/project_lifecycle.goShows how Compose intent becomes deployed or stopped workload state.
backend/…/service.goShows direct container actions, replacement recovery, and the boundary between Compose ownership and standalone recreation.
backend/…/model.goShows the durable record used to recover an interrupted replacement.
backend/…/handler.goShows the environment-scoped container API and activity reporting.
backend/…/service.goShows live resource samples, metrics, caching, and resource sorting.
backend/…/service.goShows network use, topology generation, aggregation, and Docker network changes.
backend/…/service.goShows how the port view is derived from live container summaries.
backend/…/service.goShows volume orchestration, internal-volume protection, centralized backup selection, list behavior, rename, and the bridge to backup and workspace work.
backend/…/helpers.goShows reusable helper containers, backup storage mounts, cleanup, and container coordination.
backend/…/service.goShows safe volume browsing, revision-checked edits, and rollback.
backend/…/service.goShows scheduled and manual backup plans, local and S3 snapshots, leases, and recovery.
backend/…/service.goShows full, selected-file, and uploaded-archive restore flows.
backend/…/module.goShows the template and registry management surface.
backend/…/service.goShows how filesystem, local database, and remote Compose templates feed project creation.
backend/…/service.goShows the shared Docker client and runtime snapshot boundary.