Skip to content

dianlight/srat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3,724 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

SambaNAS Rest Administration Tool SRAT

GitHub release (latest by date including pre-releases) GitHub last commit GitHub issues GitHub pull requests GitHub codecov HACS DeepWiki CodeFactor

SRAT (SambaNAS REST Administration Tool) is a new system designed to provide a simplified user interface for configuring SAMBA. It has been developed to work within Home Assistant, specifically for this addon, but can also be used in other contexts.

Currently under development and in an alpha state, SRAT is set to become the preferred system for configuring and using this addon, eventually "retiring" the YAML configuration.

👷 This is a part for new SambaNas2 Home Assistant Addon. 👷

Installation

The installation of this add-on is straightforward and similar to any other Home Assistant add-on.

Add our Home Assistant add-ons repository to your Home Assistant instance:

Add-on repository badge

or

Add our Home Assistant BETA add-ons repository to your Home Assistant instance:

Beta repository badge

Local Development

For local development setup, follow the instructions below for back-end and frontend development.

Home Assistant Custom Component

SRAT includes a HACS-compatible Home Assistant custom component at custom_components/srat/. It communicates with the SRAT back-end exclusively via WebSocket, supporting Supervisor autodiscovery and a UI configuration wizard.

For full details, see Home Assistant Integration.

Install via HACS (recommended)

  1. Open HACS in Home Assistant.
  2. Go to Integrations → three-dot menu → Custom repositories.
  3. Add https://github.com/dianlight/srat as an Integration.
  4. Search for "SRAT" and install it.
  5. Restart Home Assistant.

Manual Install

  1. Download srat.zip from the latest release.
  2. Extract the contents into config/custom_components/srat/.
  3. Restart Home Assistant.

Usage

SRAT can be used to manage Samba shares, users, and configurations via a modern web UI or REST API. For detailed feature usage, see the documentation in the docs/ folder or access the API docs at /docs when running the back-end server.

Feature Documentation

Database

SRAT uses SQLite for persistence via the GORM ORM. The back-end initializes the database with resilience-focused defaults:

  • journal_mode=WAL for safe readers during writes
  • busy_timeout=5000 ms to reduce transient SQLITE_BUSY
  • synchronous=NORMAL tuned for WAL
  • foreign_keys=ON
  • cache=shared
  • connection pool limited to 1 open/idle connection (embedded DB best practice)

You can set the database path via the --db flag when running the server or CLI. For example:

  • File on disk (recommended for production): --db /data/srat.db
  • In-memory for tests/dev: --db "file::memory:?cache=shared&_pragma=foreign_keys(1)"

Sponsor

Github Sponsor Buy Me a Coffee

Contribute

You can use this section to highlight how people can contribute to your project.

You can add information on how they can open issues or how they can sponsor the project.

Release process

We use a helper script to streamline releases; see the release documentation for details:

License

Apache 2.0 license

About

SRAT (SambaNAS REST Administration Tool) is a new system designed to provide a simplified user interface for configuring SAMBA. It has been developed to work within Home Assistant.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors