PHPackages                             reun/nanomanager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. reun/nanomanager

ActiveLibrary[File &amp; Storage](/categories/file-storage)

reun/nanomanager
================

Modern and minimalist PHP file manager

0.11.0(6mo ago)01MITPHPPHP ^8.2

Since Oct 16Pushed 6mo agoCompare

[ Source](https://github.com/ReunMedia/nanomanager)[ Packagist](https://packagist.org/packages/reun/nanomanager)[ RSS](/packages/reun-nanomanager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (12)Used By (0)

Nano File Manager
=================

[](#nano-file-manager)

[![Supported PHP Version](https://camo.githubusercontent.com/25ab23bbd58d64ddc73823afc48a6c12cd6060a3e05b22d82a7708589346e5c1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f7265756e2f6e616e6f6d616e616765722f5048503f6c6f676f3d504850266c6f676f436f6c6f723d37373742423326636f6c6f723d373737424233)](https://www.php.net/supported-versions.php)[![Packagist Version](https://camo.githubusercontent.com/1932ca946ea081eed49ff7ce1adfee2cac6bbea0be9a75ddabe5dec3bdad1e5c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7265756e2f6e616e6f6d616e61676572)](https://packagist.org/packages/reun/nanomanager)

Nano File Manager (or Nanomanager for short) is a minimalist PHP file manager that can be used to quickly add simple uploads and file management to any PHP powered website.

> ❗ **Caution**
>
> Nanomanager doesn't include any authentication! Therefore it is very important to manually secure access to it.

Features
--------

[](#features)

- List, upload, rename and delete files in a specific folder
- Quickly copy links to files
- Lightweight and performant

Installation
------------

[](#installation)

### Requirements

[](#requirements)

- [PHP 8.2+](https://www.php.net/supported-versions.php)

### With Composer

[](#with-composer)

```
composer require reun/nanomanager
```

### PHAR (single file install)

[](#phar-single-file-install)

If you're not using Composer or simply want Nanomanager in a single self-contained file, you can download the latest PHAR from [releases](https://github.com/ReunMedia/nanomanager/releases) and put it anywhere outside your public folder. Then just require it whenever you want to use it.

```
require_once "path/to/Nanomanager.phar";
```

Usage
-----

[](#usage)

To use Nanomanager, create a new instance by passing configuration to constructor and call `run()` which returns a string that can be outputted to browser.

```
use Reun\Nanomanager\Nanomanager;

// require_once "path/to/Nanomanager.phar"; // If using PHAR installation

$nanomanager = new Nanomanager(
  "public/uploads", // Path to directory where Nanomanager stores files
  "https://example.com/uploads", // Public URL of the directory
  "https://example.com/admin/nanomanager" // URL to access Nanomanager
);

echo $nanomanager->run();
```

### Framework integration

[](#framework-integration)

You can manually pass request method and body to `run()` as optional arguments to integrate Nanomanager with any existing PHP framework.

```
$app->any("/admin/nanomanager", function($request, $response) {
  $nanomanager = new Nanomanager\Nanomanager(...);

  $response->getBody()->write($nanomanager->run(
      $request->getMethod(),
      (string) $request->getBody(),
  ));

  return $response;
});
```

> 💡 **Tip**
>
> Check out `tests/integration` directory for additional usage examples.

Configuration
-------------

[](#configuration)

### PHP API configuration

[](#php-api-configuration)

PHP API is configured with constructor parameters. Check out [`Nanomanager.php`](packages/php/src/Nanomanager/Nanomanager.php) for full list of options.

```
new Nanomanager(..., createMissingDirectory: false);
```

### Frontend configuration

[](#frontend-configuration)

Frontend is configured with HTML attributes. Check out `Props` interface in [`NanoFileManager.svelte`](packages/frontend/src/NanoFileManager.svelte) for full list of options.

If you're not [embedding frontend](#embedding-nanomanager-frontend-to-existing-page) yourself, you can customize frontend with `frontendAttributes` parameter.

```
new Nanomanager(..., frontendAttributes: 'theme="dark"');
```

Embedding Nanomanager frontend to existing page
-----------------------------------------------

[](#embedding-nanomanager-frontend-to-existing-page)

Nanomanager frontend can easily be embedded to any existing HTML page or JS framework as a custom element.

```

```

The custom element is loaded from `nanomanager.js` file, which can be found in `vendor/reun/nanomanager/packages/frontend/dist/nanomanager.js` if you installed Nanomanager with Composer. For PHAR installation, you can copy the file from [releases](https://github.com/ReunMedia/nanomanager/releases).

### Using `` tag in HTML file

[](#using-script-tag-in-html-file)

To embed Nanomanager into any HTML page, you need to copy `nanomanager.js`into publicly accessible asset directory and include it as a script tag. It is recommended to rename the file to include version number to avoid caching issues.

```

  ...

  ...

```

> 💡 **Tip**
>
> Check out `tests/integration/framework-test` for a complete example.

### Using `import` in JS

[](#using-import-in-js)

You can `import` Nanomanager in JS to load the custom element. We're using Vue as an example, but it works with any JS framework or even without one.

```

// Load `nanomanager.js` from Composer package
import "../vendor/reun/nanomanager/packages/frontend/dist/nanomanager.js";

// Using dynamic hostname for easy access in both development and production
const apiUrl = window.location.origin + "/admin/nanomanager";

```

Frontend customization and theming with CSS
-------------------------------------------

[](#frontend-customization-and-theming-with-css)

`` exposes its root element as [`part`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/part)attribute with the name `body`. You can target this element with `nano-file-manager::part(body)` CSS selector to set theme variables or use custom CSS. See [`NanoFileManager.svelte`](packages/frontend/src/NanoFileManager.svelte) for a full list of available theme variables and [`index.html`](tests/integration/framework-test/public/index.html) in framework integration test as an example.

```
nano-file-manager::part(body) {
  --rounded: 2em;
  --bg: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
  /* You can set different values for dark / light theme */
  --bg-modal: var(--dark, #0d1b2a) var(--light, #e5edf7);
}
```

Additional tips
---------------

[](#additional-tips)

### Setting URL dynamically

[](#setting-url-dynamically)

You can utilize `$_SERVER` to set URL dynamically when configuring Nanomanager. This is useful for development and testing.

> ℹ️ **Important**
>
> It is recommended to set URL manually in production instead of relying on `$_SERVER` global. This is also illustrated in the example below.

```
$proto = ($_SERVER['HTTPS'] ?? false) ? 'https' : 'http';
$host = is_string($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
$urlBase = "{$proto}://{$host}";

// Override dynamic URL in production
if($isProduction) {
  $urlBase = "https://example.com";
}

$nanomanager = new Nanomanager(
    "path/to/uploads",
    "{$urlBase}/uploads",
    "{$urlBase}/admin/nanomanager",
);
```

Development
-----------

[](#development)

See [`docs/development`](docs/development/README.md) for development documentation.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance66

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

11

Last Release

208d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bb53e463857ab3f210876fa35ffca0c019850ad77851c8963ccacb0264ef1d5a?d=identicon)[Cryszon](/maintainers/Cryszon)

---

Top Contributors

[![Cryszon](https://avatars.githubusercontent.com/u/5220970?v=4)](https://github.com/Cryszon "Cryszon (144 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/reun-nanomanager/health.svg)

```
[![Health](https://phpackages.com/badges/reun-nanomanager/health.svg)](https://phpackages.com/packages/reun-nanomanager)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15161.6M2.6k](/packages/illuminate-filesystem)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)[madnest/madzipper

Easier zip file handling for Laravel applications.

1382.3M6](/packages/madnest-madzipper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
