Sign inSign up

tuitentuan/nfs-manager-v3

By tuitentuan

Updated 3 months ago

Web control plane for Linux NFS: manage exports, monitor throughput, and audit changes.

Image
Networking
Integration & delivery
Operating systems
0

2.5K

tuitentuan/nfs-manager-v3 repository overview

Docker — NFS Manager v3

Canonical Docker documentation for the production image. Source: github.com/TuiTenTuan/nfs-manager-v3.


Paste into Docker Hub

Copy everything between the lines below into the Docker Hub repository Overview (Full description) for tuitentuan/nfs-manager-v3.

NFS Manager v3 — manage Linux NFS exports from a web UI. Self-hosted control plane: Go API, Next.js dashboard, PostgreSQL, validate-before-apply workflow, live monitoring, and RBAC.

Source: GitHub — TuiTenTuan/nfs-manager-v3 · Release: v20260620 · License: MIT

Supported tags
TagDescription
latestNewest stable release
v20260620Pinned v20260620 release

Semver tags (v20260611, v20260619, …) are immutable. latest tracks the most recent stable tag push.

Quick pull
docker pull tuitentuan/nfs-manager-v3:latest
docker pull tuitentuan/nfs-manager-v3:v20260620
What is in the image

Single container with:

  • Go REST API (port 8080 by default)
  • Next.js UI (port 3000 by default)
  • In-container NFS server (nfs-utils, requires --privileged)

PostgreSQL is not included. Use Docker Compose from the GitHub repo or run a separate Postgres container.

From a clone of the repo:

git clone https://github.com/TuiTenTuan/nfs-manager-v3.git
cd nfs-manager-v3
cp deploy/.env.example deploy/.env   # edit secrets
make docker-up

Default URLs (see deploy/.env.example): UI http://localhost:3001/login, API http://localhost:8081/api/v3/health.

Quick start — docker run + external Postgres
docker network create nfs-manager-net

docker run -d \
  --name nfs-manager-postgres \
  --network nfs-manager-net \
  -e POSTGRES_USER=nfsmanager \
  -e POSTGRES_PASSWORD=change-me \
  -e POSTGRES_DB=nfsmanager_v3 \
  -v nfs-manager-pgdata:/var/lib/postgresql \
  postgres:18-alpine

docker run -d \
  --name nfs-manager-app \
  --network nfs-manager-net \
  --privileged \
  -p 3000:3000 -p 8080:8080 -p 2049:2049 -p 111:111 \
  -v nfs-share:/srv \
  -e DATABASE_HOST=nfs-manager-postgres \
  -e DATABASE_PASSWORD=change-me \
  -e JWT_ACCESS_SECRET=change-me-access-secret-min-32-chars \
  -e JWT_REFRESH_SECRET=change-me-refresh-secret-min-32-chars \
  -e NEXT_PUBLIC_API_BASE=http://localhost:8080/api/v3 \
  -e CORS_ORIGIN=http://localhost:3000 \
  tuitentuan/nfs-manager-v3:latest

Replace every change-me value. DATABASE_PASSWORD must match POSTGRES_PASSWORD. Check docker logs nfs-manager-app for the one-time admin password.

Required environment variables
VariableRequiredNotes
DATABASE_PASSWORDYesMust match Postgres password
JWT_ACCESS_SECRETYesLong random string
JWT_REFRESH_SECRETYesLong random string
NEXT_PUBLIC_API_BASERecommendedBrowser API URL; written to public/env.js at startup
CORS_ORIGINRecommendedComma-separated browser origins

Full reference: README — Docker environment variables.

Volumes
MountPurpose
/srvNFS export paths (bind-mount or named volume)
Postgres data volumeRequired when running external Postgres

Compose bind-mounts ./deploy/srv/srv for local testing.

Security notes
  • Container runs --privileged so the kernel NFS daemon can start inside the image.
  • Change all default passwords and JWT secrets before production use.
  • Restrict UI and API ports with firewall or reverse proxy; use strong admin passwords after first login.
  • NFS export paths are validated against NFS_ROOT_ALLOWLIST (default includes /srv, /data, /export, /mnt).
Troubleshooting
  1. API cannot connect to database — Ensure DATABASE_HOST resolves on the Docker network and DATABASE_PASSWORD matches POSTGRES_PASSWORD.
  2. UI shows API errors — Set NEXT_PUBLIC_API_BASE to a URL reachable from the browser (not an internal Docker hostname).
  3. NFS mount fails from host — Container must be --privileged; on Docker Desktop, use a Linux or WSL2 NFS client.
  4. No admin password in logs — Admin is only seeded on first empty database; reset DB volume or create user via API if needed.
  5. CORS blocked — Set CORS_ORIGIN to your UI origin (e.g. http://localhost:3000).

Overview

The production image is built from deploy/Dockerfile at the repository root. It packages:

  • Go API — REST /api/v3, JWT auth, PostgreSQL persistence
  • Next.js UI — App Router dashboard
  • NFS integration — Linux provider writes managed exports and reloads via exportfs

PostgreSQL (TimescaleDB in compose) runs as a separate service. See deploy/docker-compose.yml and deploy/.env.example.

Image: tuitentuan/nfs-manager-v3 on Docker Hub.

Supported tags

TagWhen to use
v1.0.0Pin to the v1.0.0 release
latestAlways pull the newest stable build (updated on each v*.*.* tag push via CI)

Future releases use semver tags (v1.1.0, …). Pin production deployments to a specific version tag.

Quick start — Docker Compose

From the repo root:

cp deploy/.env.example deploy/.env
# Edit DATABASE_PASSWORD, POSTGRES_PASSWORD, JWT_* secrets
make docker-up

Stop: make docker-down.

On first startup: docker compose -f deploy/docker-compose.yml logs app for the one-time admin password.

Quick start — docker run

Pull the image:

docker pull tuitentuan/nfs-manager-v3:v1.0.0

Minimal two-container setup (Postgres + app) — see README — Run with docker run for the full command block with ports and env vars.

Build locally instead:

docker build -f deploy/Dockerfile -t nfs-manager-v3:latest \
  --build-arg NEXT_PUBLIC_APP_NAME="NFS Manager v3" .

Configuration

Runtime configuration comes from environment variables and (in compose) deploy/.env.

Build-time: NEXT_PUBLIC_APP_NAME (baked into the Next.js bundle during docker build).

Runtime (required): DATABASE_PASSWORD, JWT_ACCESS_SECRET, JWT_REFRESH_SECRET. In compose, also set POSTGRES_PASSWORD to the same value as DATABASE_PASSWORD.

Runtime (common): NEXT_PUBLIC_API_BASE, CORS_ORIGIN, NFS_ROOT_ALLOWLIST, MANAGED_EXPORTS_PATH, APP_PORT, API_PORT.

Condensed tables and defaults: README — Docker environment variables.

Volumes

PathRole
/srvExport paths served over NFS
/etc/exports.d/nfs-manager.exportsManaged exports file (inside container)
Postgres volumeUser/database data (compose service postgres_data)

Compose maps deploy/srv/ to /srv for test exports.

Security notes

  • privileged: true (or docker run --privileged) is required for in-container kernel NFS.
  • Do not commit deploy/.env or use placeholder secrets in production.
  • The UI seeds an admin user on first run; change the password under Settings.
  • Limit network exposure; prefer reverse proxy with TLS for remote access.

Troubleshooting

SymptomLikely causeFix
set POSTGRES_PASSWORD in deploy/.envMissing compose secretsCopy and edit deploy/.env.example
Browser cannot reach APIWrong NEXT_PUBLIC_API_BASEUse host-reachable URL (e.g. http://localhost:8081/api/v3 for compose defaults)
NFS export warnings on DesktopBind-mount + non-Linux hostAPI/UI still work; test NFS mounts from Linux/WSL2
Migration errors on startupPostgres not readyCompose depends_on healthcheck; wait for pg_isready
Stale latest tagOld local cachedocker pull tuitentuan/nfs-manager-v3:latest

Tag summary

Content type

Image

Digest

sha256:2efaeab55

Size

67.8 MB

Last updated

3 months ago

docker pull tuitentuan/nfs-manager-v3