plexd

module
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0

README

plexd

Docs DeepWiki

plexd runs on every node in a Plexsphere-managed environment. It connects to the control plane, registers the node, establishes encrypted WireGuard mesh tunnels to peers, enforces network policies, and continuously reconciles local state against the desired state.

MVP / Work in Progress – This project is under active development. APIs, configuration formats, protocols, and internal interfaces are subject to change without prior notice. Do not rely on current behavior or interfaces for production use.

Key Capabilities

  • Self-Registration with bootstrap tokens (Cloud-Init, K8s Secret, or manual enrollment)
  • Mesh Connectivity via direct encrypted WireGuard tunnels between authorized peers
  • NAT Traversal with STUN endpoint discovery and bridge-node relay fallback
  • Policy Enforcement through peer visibility filtering and local firewall rules
  • Configuration Reconciliation against the control plane's source of truth
  • Bridge Mode for user access, public ingress, site-to-site VPN, and NAT relay
  • Observability with metrics collection, log forwarding, and audit data forwarding
  • Remote Actions & Hooks with SHA-256 integrity verification
  • Local Node API exposing node state via a local endpoint (Unix socket, named pipe on Windows) or CRD (Kubernetes)
  • Secure Access for platform-mediated SSH and Kubernetes API tunneling through the mesh

Runs on bare-metal servers, VMs, Kubernetes clusters, OpenWRT routers, and as bridge/gateway. Linux (amd64, arm64, mipsle), macOS (amd64, arm64) and Windows (amd64, arm64). Platform Support says what each one supports.

Quick Start

# Install (Linux; use `| sudo sh` on macOS)
curl -fsSL https://get.plexsphere.com/plexd | sh

# Enroll the node (interactive token prompt)
plexd join

# Run as a service
sudo plexd install
sudo systemctl enable --now plexd                                   # Linux
sudo launchctl bootstrap system \
  /Library/LaunchDaemons/com.plexsphere.plexd.plist                 # macOS

On Windows, download plexd-windows-amd64.exe and run .\plexd.exe install then sc.exe start plexd from an elevated PowerShell; see the Windows guide.

See Installation & Quick Start for container, Kubernetes, OpenWRT, and bridge-mode deployments.

Documentation

The full documentation lives at https://plexsphere.github.io/plexd/:

The documentation source is in docs/; preview locally with npm install && npm run docs:dev.

Development

Requires Go 1.26+. The Linux data plane and the e2e suites also need WireGuard tools and nftables.

make build   # Build the plexd binary
make test    # Run unit tests
make lint    # Run golangci-lint

See Development: Getting Started for the project structure, e2e tests, and CI workflows.

License

Apache License 2.0 - see LICENSE for details.

Directories

Path Synopsis
cmd
plexd command
Package main is the entry point for the plexd binary.
Package main is the entry point for the plexd binary.
plexd/cmd
Package cmd implements the plexd CLI commands.
Package cmd implements the plexd CLI commands.
internal
actions
Package actions provides remote action execution and hook management for plexd mesh nodes.
Package actions provides remote action execution and hook management for plexd mesh nodes.
agent
Package agent implements agent-level runtime services.
Package agent implements agent-level runtime services.
api
auditfwd
Package auditfwd provides audit data collection and forwarding from plexd mesh nodes to the control plane.
Package auditfwd provides audit data collection and forwarding from plexd mesh nodes to the control plane.
bridge
Package bridge provides bridge mode functionality including user access integration.
Package bridge provides bridge mode functionality including user access integration.
integrity
Package integrity verifies the plexd binary and hook scripts by SHA-256 checksum, and the SSH host key by its OpenSSH fingerprint.
Package integrity verifies the plexd binary and hook scripts by SHA-256 checksum, and the SSH host key by its OpenSSH fingerprint.
kubernetes
Package kubernetes provides Kubernetes environment detection and integration.
Package kubernetes provides Kubernetes environment detection and integration.
logfwd
Package logfwd provides log forwarding from plexd mesh nodes to the control plane.
Package logfwd provides log forwarding from plexd mesh nodes to the control plane.
meshdns
Package meshdns answers the mesh DNS names of a node's Domain and forwards the names its forwarding setting sends elsewhere.
Package meshdns answers the mesh DNS names of a node's Domain and forwards the names its forwarding setting sends elsewhere.
metrics
Package metrics provides metrics collection and reporting for plexd mesh nodes.
Package metrics provides metrics collection and reporting for plexd mesh nodes.
nat
Package nat provides NAT traversal via STUN for plexd mesh nodes.
Package nat provides NAT traversal via STUN for plexd mesh nodes.
packaging
Package packaging installs plexd as a host service: a systemd unit on Linux, a launchd daemon on macOS, a Windows service on Windows.
Package packaging installs plexd as a host service: a systemd unit on Linux, a launchd daemon on macOS, a Windows service on Windows.
paths
Package paths resolves the directories plexd uses by default on the host it runs on: the configuration directory, the data directory and the runtime directory, plus the files the rest of the agent derives from them.
Package paths resolves the directories plexd uses by default on the host it runs on: the configuration directory, the data directory and the runtime directory, plus the files the rest of the agent derives from them.
peerexchange
Package peerexchange orchestrates peer endpoint exchange for plexd mesh nodes.
Package peerexchange orchestrates peer endpoint exchange for plexd mesh nodes.
policy
Package policy implements network policy enforcement for plexd mesh nodes.
Package policy implements network policy enforcement for plexd mesh nodes.
registration
Package registration implements node self-registration.
Package registration implements node self-registration.
tunnel
Package tunnel implements secure access tunneling for plexd mesh nodes.
Package tunnel implements secure access tunneling for plexd mesh nodes.
upgrade
Package upgrade downloads plexd release binaries from the GitHub release channel and verifies their Sigstore bundles before they are trusted.
Package upgrade downloads plexd release binaries from the GitHub release channel and verifies their Sigstore bundles before they are trusted.
test
e2e/mockapi
Package mockapi provides a mock Central API server for end-to-end testing.
Package mockapi provides a mock Central API server for end-to-end testing.
e2e/mockapi/cmd/mockapi command
Command mockapi runs a mock Central API server for end-to-end testing.
Command mockapi runs a mock Central API server for end-to-end testing.
tools
docs-figures command
Command docs-figures draws the figures of the documentation.
Command docs-figures draws the figures of the documentation.

Jump to

Keyboard shortcuts

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