Skip to content

SlashGordon/nas-manager

Repository files navigation

NAS Manager

CI Release Go Report Card Latest Release

A CLI tool for managing scripts and tasks on your NAS system.

Features

  • DDNS Management: Update Cloudflare DNS records with current public IP
  • ACME Certificates: Issue/renew Let's Encrypt certificates via Cloudflare DNS

Installation

Quick Install

curl -fsSL https://raw.githubusercontent.com/SlashGordon/scripts/main/install.sh | sh

Manual Install

Download the appropriate binary for your system from the releases page.

Configuration

Configuration is loaded in this priority order:

  1. NAS_CONFIG environment variable (custom path)
  2. .nasrc in working directory
  3. .nasrc in home directory
  4. Environment variables

Copy .nasrc.example to .nasrc and set your credentials:

cp .nasrc.example .nasrc
# Edit .nasrc with your actual values

Or use a custom config path:

NAS_CONFIG=/path/to/config nas-manager ddns update

Required environment variables:

  • CF_API_TOKEN - Cloudflare API token (used for both DDNS and ACME)
  • CF_ZONE_ID - Cloudflare zone ID (for DDNS)
  • CF_RECORD_NAME - DNS record name to update
  • ACME_DOMAIN - Domain for certificate
  • ACME_EMAIL - Email for Let's Encrypt registration

Usage

# Show help
nas-manager --help

# DDNS commands
nas-manager ddns update

# ACME certificate management
nas-manager acme issue

Building

# Build for current platform
make build

# Build for all platforms
make build-all

# Clean build artifacts
make clean

Release

Binaries are automatically built for:

  • Linux (amd64, arm64)
  • macOS (amd64, arm64)

About

Scripts for my NAS

Resources

License

Stars

Watchers

Forks

Packages

No packages published