Skip to main content

nanio-orchestrator

Nginx configuration manager and gateway orchestrator for a distributed nanio S3-compatible storage cluster.

It is a control plane tool only — traffic never flows through it. If the orchestrator is stopped or crashes, nginx keeps serving traffic exactly as configured.

What it is for

nanio is a minimal S3 server: one process, one data directory, no clustering. To grow beyond one machine you put nginx in front of several nanio instances. nanio-orchestrator manages that nginx for you:

  • Sharding: keep most buckets on a default pool and route individual buckets to other machines, behind a single hostname.
  • Replicas: tell it which machines are replicas and it writes them into the upstream as backups. Keeping a replica in sync (rsync, lsyncd, a replicated filesystem) stays where it belongs, in the operating system.
  • Live migration: move a bucket from one pool to another with rclone while clients keep reading and writing it.
  • Safety net: every change is validated with nginx -t and rolled back if nginx rejects it; the database can be rebuilt from the files on disk and the files from the database.
CLIENT (S3 SDK / aws-cli / rclone)
│ HTTPS
▼
NGINX (gateway machine) ─────────────── config written by ──┐
│ proxy_pass only                                            │
├─► upstream pool-default  →  nanio instances                │
├─► upstream pool-2026     →  nanio instances        ORCHESTRATOR (:8080, internal)
└─► upstream pool-cdn      →  nginx instances          Web UI · REST API · CLI
                              (+ replicas as backup)   SQLite + files under /etc/nginx/nanio

Concepts

Concept nginx Meaning
Pool upstream Machines holding the same data. Type nanio (S3) or http (read-only file serving, with replicas).
Member server One machine of a pool
Vhost server {} A hostname, with TLS, IP rules and a default pool
Route location /bucket/ Sends one bucket, or one folder of a bucket (/bucket/folder/), to a specific pool

Quick start

Two ways to run it. Both end with the panel on port 8080.

On the gateway host

Requirements: Linux with systemd, Python 3.9+, nginx. rclone only if you will migrate buckets.

curl -fsSL https://raw.githubusercontent.com/nunokisc/nanio-orchestrator/main/install.sh | sudo bash

That installs the program, creates the settings (API key and encryption secret), hooks the managed config into nginx, starts the service and prints the panel address and the API key. Run it again to upgrade. sudo nanio-orchestrator doctor checks an installation and prints the fix for anything that is wrong.

With Docker

The image ghcr.io/nunokisc/nanio-orchestrator holds nginx, the orchestrator and rclone. It runs as two containers: gateway (nginx, serving traffic) and orchestrator (the control plane). They are separate so that nginx keeps serving when the orchestrator stops, and the same image so that the nginx validating the config is the nginx serving it.

curl -fsSLO https://raw.githubusercontent.com/nunokisc/nanio-orchestrator/main/compose.yaml

echo "NANIO_ORCHESTRATOR_API_KEY=$(openssl rand -base64 32)" > .env
echo "NANIO_ORCHESTRATOR_SECRET=$(docker run --rm ghcr.io/nunokisc/nanio-orchestrator config generate-secret)" >> .env

docker compose up -d

The panel is on http://127.0.0.1:8080; log in with the API key from .env. In compose.yaml, publish on the gateway service every port your vhosts listen on, and mount your TLS certificates at the same path in both services. Keep a copy of NANIO_ORCHESTRATOR_SECRET: it encrypts the stored pool credentials.

Details, upgrades and what the two containers share: docs/installation.md.

First steps

Then, in the web panel (the Overview screen walks you through the same steps):

  1. Pools → create a pool, add your nanio machines as members, store its S3 credentials.
  2. Vhosts → create a vhost with that pool as default.
  3. Reload nginx. Changes are validated when you make them and applied only when you reload; while something is waiting, a bar at the top of every screen says so and has the button.
  4. Buckets → Route to a pool when you want to move a bucket to other machines.
  5. Explorer → look inside a bucket and see which pool really holds what (read-only).

The same steps with curl are in docs/operations.md.

Keep the panel internal: bind it to a management address and firewall port 8080. It holds the credentials of every pool and can change what nginx serves.

Documentation

Installation Install, upgrade, check (doctor), uninstall
Configuration Every setting, file layout, securing the panel
Operations manual Pools, vhosts, sharding, replicas, drift, CLI
Migrations How a bucket is moved without losing writes, and how to finish an interrupted move
For applications What an S3 client must know: settings, limits and what to do instead
Disaster recovery What to back up and how to recover each kind of loss
Troubleshooting Symptoms, causes, fixes
API reference Every endpoint
Architecture How it works inside
Contributing Development workflow

Design rules

  • Control plane only. Nothing the orchestrator does sits in the request path.
  • nginx decides. A change that nginx -t rejects is rolled back; it never reaches a reload.
  • Nothing is deleted for you. Moving a bucket leaves the old copy in place and tracks it; removing it is an explicit operator action.
  • Two copies of the truth. The SQLite database and the files next to the nginx config describe the same state; either can be rebuilt from the other.

Development

A whole cluster in Docker

The quickest way to see it work, and the environment the end-to-end test runs in: the gateway, the orchestrator and two nanio storage servers, on one machine.

git clone https://github.com/nunokisc/nanio-orchestrator
cd nanio-orchestrator
make stack             # builds the image and starts everything
Panel http://localhost:8080, API key dev-key
Gateway http://localhost:8081 (create a vhost that listens on 8081)
Storage servers nanio-a:9000 and nanio-b:9000, access key AKDEV, secret devsecretdevsecret

nginx, nanio and rclone are real here, so routing, reloads and migrations behave as in production. The orchestrator runs the code of your checkout and restarts when you edit it.

make e2e               # end-to-end test: pools, routes, bucket and folder migrations, explorer
make stack-down        # stop and delete the cluster's data

Without make: docker compose -f compose.dev.yaml up -d --build --wait. The panel is a React application; make stack builds it when Node.js is installed, otherwise run make ui on a machine that has it.

Without Docker

make install-dev       # creates .venv and installs dependencies
make ui                # builds the web panel (needs Node.js); once, and after changing ui/
make run               # dev server at http://localhost:8080, API key "dev"
make test              # pytest
make test-cov          # with coverage; fails below 100%
make lint              # ruff

In this mode the database and generated config live under ./dev-data/ and nginx commands are printed instead of executed: good for working on the API and the panel, not for anything that depends on what nginx or nanio really do.

The panel is in ui/; its build is shipped inside the Python package, so only a source checkout needs Node.js. See docs/contributing.md.

License

MIT

Metadata

Release files for nanio-orchestrator 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nanio-orchestrator 0.6.0
File Size Uploaded Provenance Actions
nanio_orchestrator-0.6.0.tar.gz 412.5 kB With provenance Details for nanio_orchestrator-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nanio-orchestrator 0.6.0
File Interpreter ABI Platform Actions
nanio_orchestrator-0.6.0-py3-none-any.whl Python 3 none any Details for nanio_orchestrator-0.6.0-py3-none-any.whl

Total release size: 674.8 kB

Release files / nanio_orchestrator-0.6.0.tar.gz

Download URL nanio_orchestrator-0.6.0.tar.gz
Size 412.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5db4a411ffac301452c599078c1c1272cfa96da6f8fe567bc9d978cfa7237eb9
BLAKE2b-256 checksum
How to use checksums
93030039dd821e63178d722088a55489f943e248e3d5ee3ddb6bd79279a5221b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / nanio_orchestrator-0.6.0-py3-none-any.whl

Download URL nanio_orchestrator-0.6.0-py3-none-any.whl
Size 262.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f398a18614e11c8e29249684f3fa0f514587f6b31abac9210c5b3a24d8713270
BLAKE2b-256 checksum
How to use checksums
491901e61725488f16be395eeee4c8bfe05e7733892e8fdd5f05cd383105db2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for nanio-orchestrator 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nanio_orchestrator-0.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page