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. 👷
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:
or
Add our Home Assistant BETA add-ons repository to your Home Assistant instance:
For local development setup, follow the instructions below for back-end and frontend development.
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.
- Open HACS in Home Assistant.
- Go to Integrations → three-dot menu → Custom repositories.
- Add
https://github.com/dianlight/sratas an Integration. - Search for "SRAT" and install it.
- Restart Home Assistant.
- Download
srat.zipfrom the latest release. - Extract the contents into
config/custom_components/srat/. - Restart Home Assistant.
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.
- Settings Documentation - Complete reference for all SRAT settings
- SMB over QUIC - Enhanced performance and security with QUIC transport protocol
- Telemetry Configuration - Configure error reporting and monitoring
- Home Assistant Integration - Integration with Home Assistant
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)"
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.
We use a helper script to streamline releases; see the release documentation for details:
