About
Lightweight, cross-platform process manager and PM2 alternative written in Rust: run, supervise, reload and monitor long-running services and scheduled jobs in any language on Linux, macOS and Windows.
Developer ToolsWhat you can do
- Lifecycle control - Start, stop, restart, reload and delete processes by name, id or all
- Restart policies - always, on-failure, never, with restart delays, exponential backoff and crash-loop protection
- Health checks - Command-based checks with automatic restart on repeated failures and readiness-aware reloads (--wait-ready)
- Scheduled jobs - --schedule "0 3 * * *" runs a command at each cron occurrence, with run history and failure alerts
Measured star growth
- in 24h
- +2
- in 7 days
- +6
- in 15 days
- +8
- in 1 month
- +22
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalOxmgr
Lightweight, cross-platform process manager and PM2 alternative written in Rust: run, supervise, reload and monitor long-running services and scheduled jobs in any language on Linux, macOS and Windows.
Table of contents
- Overview
- Features
- Supported platforms
- Tech stack
- Architecture
- Installation
- Quick start
- Usage
- Web dashboard
- PM2 migration
- SDKs and integrations
- Configuration
- Building from source
- Project structure
- Development guidelines
- Testing
- Documentation
- Release and distribution
- Security
- Troubleshooting
- Related repositories
- Maintainers
- Ownership and support
- License
Overview
Oxmgr keeps your services running. A small per-user daemon starts processes, restarts them by
policy, runs health checks, rotates logs, collects CPU and memory metrics and runs cron-scheduled
jobs; the oxmgr CLI, a terminal UI, an optional web dashboard and typed SDKs talk to it. It is
language-agnostic: Node.js, Python, Go, Rust binaries and plain shell commands are all managed the
same way, and existing PM2 ecosystem.config.* files work as they are.
| Audience | Developers and operators who run services on servers, VMs, containers or their own machine |
| Role | Process supervisor: daemon, CLI, terminal UI, web dashboard, foreground runtime for containers |
| Interfaces | Authenticated IPC (CLI and SDKs), Unix event socket, HTTP API (Prometheus metrics, dashboard, pull webhooks) |
| Configuration | CLI flags, declarative oxfile.toml, PM2 ecosystem.config.{js,cjs,mjs,json}, .oxpkg bundles |
| Distribution | npm, Homebrew, Scoop, APT, AUR, Nix flake, signed GitHub Release binaries |
| Current version | 0.7.0 |
| Status | Actively developed, pre-1.0; see CHANGELOG.md for breaking changes per release |
Latest published benchmark snapshots: BENCHMARK.md and benchmark.json.
Features
| Capability | Description |
|---|---|
| Lifecycle control | Start, stop, restart, reload and delete processes by name, id or all |
| Restart policies | always, on-failure, never, with restart delays, exponential backoff and crash-loop protection |
| Health checks | Command-based checks with automatic restart on repeated failures and readiness-aware reloads (--wait-ready) |
| Scheduled jobs | --schedule "0 3 * * *" runs a command at each cron occurrence, with run history and failure alerts |
| Logs | Per-process stdout and stderr files, rotation by size, count and age, oxmgr logs <name> -f, oxmgr logs all -f |
| Metrics | CPU and memory per process, Prometheus endpoint on /metrics |
| Notifications | Crashes, give-ups, failing health checks and failed jobs to Slack, Discord, Telegram, ntfy and webhooks |
| Event stream | Live lifecycle, log, health and job events on a Unix socket (oxmgr events) |
| Declarative config | oxmgr apply reconciles an oxfile.toml idempotently; validate and convert without side effects |
| PM2 compatibility | ecosystem.config.{js,cjs,mjs,json}, including watch settings and readiness-aware reload fields |
| File watching | Restart on change with ignore patterns and debounce |
| Git deployments | oxmgr pull and authenticated pull webhooks; PM2-style oxmgr deploy |
| Resource limits | Memory and CPU limits, optional cgroup v2 enforcement and GPU denial on Linux |
| Zero-downtime reloads | SO_REUSEPORT handoff and Node.js cluster mode |
| Terminal UI | oxmgr ui with live search, status filters and CPU, RAM and restart sorting |
| Web dashboard | Optional browser dashboard with live status, logs, history, alerts and actions |
| Container runtime | oxmgr runtime runs in the foreground like pm2-runtime for Docker and Kubernetes |
| Service installation | oxmgr service for systemd, launchd and Windows Task Scheduler |
| Bundles | Export and import processes as portable .oxpkg bundles |
| Diagnostics | oxmgr doctor checks the local installation and environment |
Supported platforms
| Platform | Release binary | Notes |
|---|---|---|
| Linux x86_64 | x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl |
.deb packages, cgroup v2 limits, event socket |
| Linux aarch64 | aarch64-unknown-linux-gnu, aarch64-unknown-linux-musl |
Same as x86_64 |
| macOS Apple Silicon | aarch64-apple-darwin |
launchd service integration |
| macOS Intel | x86_64-apple-darwin |
launchd service integration |
| Windows x86_64 | x86_64-pc-windows-msvc |
Job Objects reap whole process trees; no event socket |
Tech stack
| Layer | Technology |
|---|---|
| Language | Rust 2021 edition |
| Async runtime | tokio |
| CLI | clap 4 |
| Terminal UI | crossterm |
| Configuration | toml, json5, serde_json (oxfile, PM2 ecosystem files, bundles) |
| Scheduling | croner (5 and 6 field cron expressions) |
| System metrics | sysinfo |
| Security | sha2 HMAC-SHA256 IPC authentication, getrandom |
| Notifications | ureq with rustls |
| Web dashboard | React and TypeScript built with Vite, embedded in the binary; WebSocket via tokio-tungstenite |
| Platform APIs | nix (Unix), windows-sys Job Objects (Windows) |
| CI and release | GitHub Actions, Dependabot, signed release assets |
Architecture
flowchart LR
CLI["oxmgr CLI / TUI"] -- "authenticated IPC<br/>TCP 127.0.0.1" --> Daemon
SDK["oxmgr SDKs<br/>(Rust, TypeScript)"] -- "authenticated IPC" --> Daemon
SDK -- "events.sock" --> Bus
Browser["Web dashboard"] -- "HTTP + WebSocket<br/>OXMGR_API_ADDR" --> Api
Prometheus["Prometheus"] -- "/metrics" --> Api
Git["Git host"] -- "/pull/<name> webhook" --> Api
subgraph Daemon["oxmgr daemon"]
PM["ProcessManager"]
Bus["Event bus"]
Api["HTTP API"]
end
PM --> Children["Managed processes"]
PM --> State[("OXMGR_HOME<br/>state.json, logs/, history.jsonl")]
Bus --> Notify["Slack, Discord, Telegram,<br/>ntfy, webhooks"]
Request lifecycle. Each CLI command resolves the paths and addresses (src/config.rs), makes
sure the daemon runs (src/daemon.rs), then opens one authenticated IPC connection
(src/ipc.rs): both sides prove knowledge of <OXMGR_HOME>/daemon.key with HMAC-SHA256 before the
CLI sends its request, and every request and response is signed for that connection.
State. The daemon owns a single ProcessManager (src/process_manager.rs) and serialises all
mutations through one command channel. It persists process definitions to state.json with atomic
replace, so a daemon restart recovers every service whose desired state is running, after
revalidating PIDs. Process records sent to clients never contain environment variables or webhook
secrets.
| Module | Responsibility |
|---|---|
src/cli.rs, src/commands/ |
Argument parsing and one module per command |
src/daemon.rs, src/daemon/ |
Daemon loop, IPC listener, event socket, HTTP API and dashboard |
src/ipc.rs |
Authenticated line-delimited JSON protocol |
src/process_manager.rs, src/process_manager/ |
Lifecycle, restarts, health checks, metrics, scheduled jobs |
src/process.rs |
Shared domain model (StartProcessSpec, ManagedProcess, enums) |
src/events.rs, src/history.rs, src/notify.rs |
Event bus, persisted history, notification channels |
src/oxfile.rs, src/ecosystem.rs, src/bundle.rs |
oxfile, PM2 ecosystem and .oxpkg formats |
src/storage.rs, src/logging.rs, src/cgroup.rs |
Persistence, log files and rotation, Linux cgroups |
The full internal overview is in docs/ARCHITECTURE.md.
Installation
Pick one channel. Every channel installs the same oxmgr binary.
npm
npm install -g oxmgr
Homebrew (macOS, Linux)
brew tap empellio/homebrew-tap
brew install oxmgr
Scoop (Windows)
scoop bucket add oxmgr https://github.com/empellio/scoop-bucket
scoop install oxmgr/oxmgr
Windows package-manager channels are currently Scoop and npm.
AUR (Arch Linux)
yay -S oxmgr-bin
APT (Debian, Ubuntu)
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://vladimir-urik.github.io/OxMgr/apt/keyrings/oxmgr-archive-keyring.gpg \
| sudo tee /etc/apt/keyrings/oxmgr-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/etc/apt/keyrings/oxmgr-archive-keyring.gpg] https://vladimir-urik.github.io/OxMgr/apt stable main" \
| sudo tee /etc/apt/sources.list.d/oxmgr.list
sudo apt update
sudo apt install oxmgr
Nix
Until NixOS/nixpkgs#588645 is merged, install or run Oxmgr from the included flake:
nix run github:Vladimir-Urik/OxMgr
nix profile install github:Vladimir-Urik/OxMgr
Or add it to your flake.nix:
{
inputs = {
oxmgr.url = "github:Vladimir-Urik/OxMgr";
};
}
and add inputs.oxmgr.packages.${pkgs.system}.default to environment.systemPackages (NixOS) or
home.packages (Home Manager).
Release binaries
Signed binaries and SHA256SUMS for every supported platform are attached
to each GitHub Release. Platform notes are in
docs/install.md; building from source is described
below.
Quick start
Start a service:
oxmgr start "node server.js" --name api --restart always
Inspect and operate it:
oxmgr list
oxmgr status api
oxmgr logs api -f
oxmgr logs all -f
oxmgr ui
Inside oxmgr ui, use / for live search, f to cycle status filters and o to cycle the sort
order. The first command starts the daemon automatically.
Usage
Commands
| Command | Description |
|---|---|
oxmgr start "<cmd>" [flags] |
Start and register a process (or a scheduled job with --schedule) |
oxmgr stop <target> |
Stop a process by name, id or all |
oxmgr restart <target> |
Restart a process; runs a scheduled job now |
oxmgr reload <target> |
Reload with minimal downtime |
oxmgr delete <target> |
Stop and remove a process |
oxmgr list [--json] |
All processes with status, PID, uptime, restarts, CPU, RAM, health |
oxmgr status <target> |
Detailed view of one process |
oxmgr logs <target|all> [-f] |
Recent or followed logs |
oxmgr events [--process <name>] [--filter <pattern>] [--json] |
Live event stream |
oxmgr ui [tui|web] |
Terminal UI, or open the web dashboard |
oxmgr apply <oxfile> |
Reconcile the daemon with an oxfile, idempotently |
oxmgr import <file> / oxmgr export <target> |
oxfile, PM2 ecosystem or .oxpkg bundle in; bundle out |
oxmgr validate <oxfile> / oxmgr convert <ecosystem> |
Check an oxfile; convert a PM2 ecosystem file |
oxmgr pull [target] |
Git pull and reload what changed |
oxmgr deploy ... |
PM2-style deployments from a deploy configuration |
oxmgr notify list / oxmgr notify test |
Show and test notification channels |
oxmgr runtime <config> |
Foreground mode for containers (pm2-runtime style) |
oxmgr service ... / oxmgr startup |
Install the daemon as a system service; print startup instructions |
oxmgr doctor |
Environment and installation diagnostics |
oxmgr daemon run / oxmgr daemon stop |
Run the daemon in the foreground; stop it |
Every flag is documented in the CLI reference.
Common start flags
| Flag | Default | Description |
|---|---|---|
--name <name> |
derived from the command | Unique name: letters, digits, _, -; all is reserved |
--restart <policy> |
on-failure |
always, on-failure, never |
--max-restarts <n> |
10 |
Restart budget |
--crash-restart-limit <n> |
3 |
Restarts inside the crash-loop window before the process is marked errored |
--cwd <dir> / --env KEY=VALUE |
current directory / none | Working directory and environment |
--health-cmd <cmd> |
none | Health check (--health-interval 30, --health-timeout 5, --health-max-failures 3) |
--wait-ready / --ready-timeout <s> |
off / 30 |
Report online only after the health check passes |
--watch |
off | Restart on file changes (--watch-path, --ignore-watch, --watch-delay) |
--cluster / --cluster-instances <n> |
off | Node.js cluster mode |
--max-memory-mb, --max-cpu-percent, --cgroup-enforce, --deny-gpu |
none | Resource limits |
--reuse-port |
off | SO_REUSEPORT zero-downtime reloads |
--cron-restart <cron> |
none | Periodic restarts |
--schedule <cron> |
none | Run as a scheduled job instead of a service |
Declarative configuration
# oxfile.toml
version = 1
[[apps]]
name = "api"
command = "node server.js"
restart_policy = "always"
max_restarts = 10
oxmgr apply oxfile.toml
The Oxfile specification covers every field, profiles and monorepos; ready-made files are in docs/examples.
Web dashboard
The daemon can serve a browser dashboard with live process status, log streaming, process history, alerts and stop / restart / reload buttons. It is off by default; enable it when starting the daemon:
OXMGR_DASHBOARD=1 oxmgr daemon run
oxmgr ui web
It listens on OXMGR_API_ADDR (loopback by default). Binding it to another interface requires
OXMGR_DASHBOARD_USER and OXMGR_DASHBOARD_PASS. See the
Web Dashboard section of the UI guide.

PM2 migration
Oxmgr reads PM2-style ecosystem.config.{js,cjs,mjs,json} files, including config-driven watch
settings and readiness-aware reload fields, so existing PM2 setups move over without being
rewritten on day one. oxmgr convert turns an ecosystem file into an oxfile when you are ready.
| Guide | Content |
|---|---|
| Oxfile vs PM2 Ecosystem | Field mapping and why to switch |
| Oxfile Specification | The native format |
| Runtime Mode | oxmgr runtime as a pm2-runtime replacement |
SDKs and integrations
| Integration | Use it for |
|---|---|
oxmgr-sdk (Rust crate) |
Typed async client: every command, the live event stream, the HTTP API |
oxmgr-sdk (npm package) |
The same for Node.js and TypeScript |
oxmgr events --json |
Line-delimited JSON events for scripts |
GET /metrics |
Prometheus scraping, see docs/PULL_WEBHOOK.md |
POST /pull/<name> |
Git deploy webhooks with a per-process secret |
| AI skill reference (experimental) | Drop into a project so an AI assistant (Claude, Cursor, Codex, ...) knows how to configure and use Oxmgr |
Since 0.7.0 the IPC port only accepts clients that prove the installation key, so scripts must use the CLI or an SDK instead of writing to the port directly.
Configuration
Oxmgr is configured through environment variables read by the CLI and the daemon. Process
definitions live in oxfiles or ecosystem files, notification channels in
<OXMGR_HOME>/notify.toml (see docs/NOTIFICATIONS.md).
| Variable | Default | Description |
|---|---|---|
OXMGR_HOME |
~/.local/share/oxmgr (Linux), ~/Library/Application Support/oxmgr (macOS), %LOCALAPPDATA%\oxmgr (Windows) |
State, logs, IPC key, event socket, history |
OXMGR_DAEMON_ADDR |
127.0.0.1:<port derived from the user id> |
IPC address |
OXMGR_API_ADDR |
127.0.0.1:<daemon port + 1000> |
HTTP API: metrics, webhooks, dashboard |
OXMGR_LOG_MAX_SIZE_MB |
20 |
Rotate a log file above this size |
OXMGR_LOG_MAX_FILES |
5 |
Rotated files kept per log |
OXMGR_LOG_MAX_DAYS |
14 |
Maximum age of rotated files |
OXMGR_DASHBOARD |
off | 1, true, yes or on enables the web dashboard |
OXMGR_DASHBOARD_USER / OXMGR_DASHBOARD_PASS |
none | Dashboard sign-in; required on non-loopback addresses |
OXMGR_DASHBOARD_INTERVAL_MS |
2000 |
Dashboard refresh interval (200 to 10000) |
OXMGR_DASHBOARD_LABEL / OXMGR_DASHBOARD_LABEL_COLOR |
none | Environment label shown in the dashboard |
Variables oxmgr sets for managed processes: OXMGR_PROCESS (the process name) and, for port reuse
and cluster mode, OXMGR_REUSEPORT and OXMGR_CLUSTER_INSTANCES.
Files in OXMGR_HOME:
| File | Content |
|---|---|
daemon.key |
IPC key (mode 0600); never share or commit it |
state.json |
Persisted process definitions |
logs/ |
Per-process logs and the daemon log |
history.jsonl |
Lifecycle history used by the dashboard |
events.sock |
Event bus socket (Unix) |
notify.toml |
Notification channels (optional) |
Building from source
Prerequisites
| Requirement | Notes |
|---|---|
| Rust stable | rustup toolchain install stable |
| Git | |
| Node.js | Only to rebuild the web dashboard in web/ |
git clone https://github.com/Vladimir-Urik/OxMgr.git
cd OxMgr
cargo build --release
./target/release/oxmgr --help
| Task | Description |
|---|---|
cargo build --release |
Optimised binary in target/release/oxmgr |
cargo fmt --all -- --check |
Formatting |
cargo clippy --all-targets --all-features -- -D warnings |
Lints |
cargo test --all-targets |
Unit and integration tests |
cargo test --test e2e_cli -- --ignored |
End-to-end CLI tests |
nix develop |
Development shell from the flake |
Project structure
.
├── src/
│ ├── main.rs, cli.rs # Entry point and argument parsing
│ ├── commands/ # One module per CLI command, terminal UI
│ ├── daemon.rs, daemon/ # Daemon loop, HTTP API, web dashboard backend
│ ├── ipc.rs # Authenticated IPC protocol
│ ├── process_manager.rs # Lifecycle engine (plus process_manager/)
│ ├── process.rs # Domain model
│ ├── events.rs, history.rs # Event bus and persisted history
│ ├── notify.rs # Notification channels
│ └── oxfile.rs, ecosystem.rs, bundle.rs # Config and bundle formats
├── web/ # Web dashboard (React, TypeScript, Vite)
├── tests/e2e_cli.rs # End-to-end CLI tests
├── docs/ # User guides, CLI reference, examples, screenshots
├── packaging/ # npm, AUR and Chocolatey packaging
├── scripts/ # Release, packaging and benchmark helpers
├── bench/ # Benchmark fixtures and results
├── schemas/ # JSON schema for oxfile.toml (editor completion)
└── flake.nix # Nix package and development shell
Development guidelines
- Stay portable. Oxmgr ships for Linux, macOS and Windows; platform-specific code goes behind
cfgattributes with an equivalent on the other platforms or a clear "not supported" path. - One coherent change per pull request, with tests for behaviour changes and docs updated when flags, commands, config formats or workflows change.
- The IPC protocol, event format and process records are a contract for the CLI, the dashboard
and the SDKs. A change there needs a CHANGELOG entry and matching updates in
oxmgr-sdk-rsandoxmgr-sdk-js. - Never leak secrets. Process records leaving the daemon go through
redacted_for_transport; keep it that way for new fields that can hold secrets.
The full workflow is in CONTRIBUTING.md.
Testing
cargo test --all-targets
cargo test --test e2e_cli -- --ignored --nocapture
Unit tests live next to the code; tests/e2e_cli.rs drives the real binary and is marked
#[ignore], so a plain cargo test reports it as ignored. CI (.github/workflows/ci.yml) runs
formatting, cargo check, clippy with -D warnings and all tests on Linux, macOS and Windows for
every push and pull request, plus the end-to-end suite on all three platforms and packaging smoke
checks on Linux.
Documentation
| Resource | Content |
|---|---|
| Documentation index | Entry point to all guides |
| User Guide | Day-to-day operation |
| CLI Reference | Every command and flag |
| Installation Guide | Channels and platform notes |
| Terminal UI Guide | oxmgr ui and the web dashboard |
| Runtime Mode | Foreground mode for containers |
| Notifications Guide | Slack, Discord, Telegram, ntfy, webhooks |
| Pull, Webhook and Metrics Guide | Git deploys and Prometheus |
| Deployment Guide | oxmgr deploy |
| Service Bundles | .oxpkg import and export |
| Oxfile Specification / Examples | Declarative configuration |
| Architecture Overview | Internals |
| Benchmark Guide / Latest results | Methodology and numbers |
| AI Skill Reference | Experimental assistant guidance |
| Release Automation | How releases are built and published |
Release and distribution
Releases follow Semantic Versioning (pre-1.0: a minor version may break, see the CHANGELOG).
Pushing a tag v* runs .github/workflows/release.yml:
| Job | Result |
|---|---|
| Build | Binaries for the seven targets in Supported platforms and .deb packages |
| Publish GitHub Release | Assets, SHA256SUMS and signatures |
| Publish npm package | oxmgr on npm through trusted publishing (OIDC) |
| Update Homebrew Tap | empellio/homebrew-tap formula |
| Update Scoop bucket | empellio/scoop-bucket manifest |
| Update AUR package | oxmgr-bin |
| Publish APT repository | Signed repository on GitHub Pages |
Details are in docs/RELEASE.md.
Security
- Authenticated IPC. The daemon port is reachable by every local user, so the CLI and the
daemon prove knowledge of
<OXMGR_HOME>/daemon.key(mode0600) with HMAC-SHA256 and fresh nonces before anything is exchanged; the CLI sends a request only after the daemon proved the key. A key file other users can access is refused. - Bounded input. IPC requests are capped at 1 MiB and the handshake at 1 KiB, with time limits and a cap on concurrent handshakes.
- Dashboard. Off by default, loopback only without credentials, constant-time credential
checks, throttled sign-in,
HttpOnlysession cookie, CSRF and cross-site WebSocket protection. - No secrets in transit. Process records sent to the CLI, the dashboard and the SDKs never contain environment variables or pull webhook secrets.
- Signed releases. Release assets ship with
SHA256SUMSand signatures; the APT repository is signed.
Report suspected vulnerabilities privately as described in SECURITY.md, not in a public issue.
Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
| "the address is held by another process that does not answer as an oxmgr daemon" after upgrading to 0.7 | A daemon from an older release is still running; run oxmgr daemon stop once, the next command starts the new one |
| "refusing IPC key ... other users can access it" | chmod 600 <OXMGR_HOME>/daemon.key |
| "wrong key proof" | daemon.key was replaced while the daemon ran; restart the daemon |
A process ends up errored |
It crashed --crash-restart-limit times in a row; check oxmgr status <name> and oxmgr logs <name> |
cron_restart never fires |
Invalid or no longer accepted cron pattern (croner 5 rules); oxmgr validate names the app and the reason |
| Dashboard answers 404 "the web dashboard is disabled" | Start the daemon with OXMGR_DASHBOARD=1 |
| Dashboard answers 403 on a non-loopback address | Set OXMGR_DASHBOARD_USER and OXMGR_DASHBOARD_PASS |
| Anything else | oxmgr doctor checks the installation and environment |
Related repositories
| Repository | Relationship |
|---|---|
Vladimir-Urik/oxmgr-sdk-rs |
Rust SDK for the daemon |
Vladimir-Urik/oxmgr-sdk-js |
TypeScript / Node.js SDK for the daemon |
empellio/homebrew-tap |
Homebrew formula, updated on every release |
empellio/scoop-bucket |
Scoop manifest, updated on every release |
Maintainers
Created and maintained by Vladimír Urík (@Vladimir-Urik). Issues, pull requests and documentation improvements are welcome; start with CONTRIBUTING.md, and see SECURITY.md for how to report a vulnerability.
Ownership and support
| Author | @Vladimir-Urik |
| Patronage | Developed under the open-source patronage of Empellio |
| Repository | Vladimir-Urik/OxMgr |
| Issues | GitHub issues |
| Funding | See .github/FUNDING.yml |
Star history
License
Released under the MIT License. Copyright © Vladimír Urík.
Explore related projects
Loading…