feat: add managed SMB library sharing - #3964
Conversation
Add an optional Samba sidecar for sharing the RomM library over the local network. Provide SMB user management, per-platform read and write permissions, credential rotation, service status, connection details, and limited logs through the administration interface. Keep SMB credentials separate from RomM accounts and communicate with the sidecar through a restricted Unix socket.
|
Hi, I am not a maintainer but as a avid user of Romm that uses SMB. Why does Romm need to concern about files over SMB when the operating system could do that? I think this project should be filesystem agnostic and let the users decide how they expose the information to the container. In my case, I am using read only readonly docker volumes - can provide more references if you need further support. It is up for the maintainer to decide, but I think that, to some extent, we need some level of restraint to avoid excessive complexity. |
|
Thanks for the feedback. I think you make a good point. Perhaps this does not need to be part of RomM core. Another option could be to keep it as a separate companion service or community integration, and add documentation explaining how to use it with RomM. I would be happy to maintain the SMB service myself. It has been very useful in my setup because I can access the same ROM library from my PS2 and Steam Deck without copying the games to each device or filling their internal storage. Would a separate integration, plugin-style approach, or documentation page be more appropriate for the project? |
|
@Danilop95 i think both of you have the right idea, leave this as-is and i'll riff on it after 5.1 is released. |
|
Sounds good. I’d be happy to help with it after 5.1, so just let me know. Thanks a lot! |
|
tldr i think a good chunk of this can be extracted into a micro-app that interfaces with romm transparently, and we update the API where necessary to allow this to be seamless. |
|
Sounds good. I’ll keep looking into it and do my best to approach it properly. I’ll keep you posted! |
Description
This PR adds optional SMB support to RomM so users can access their ROM library from other devices on the local network without keeping a separate copy of every game on each device.
The main use case is connecting systems such as Windows PCs, Linux machines, Steam Deck, Batocera, RetroBat, homebrew consoles, and other emulation devices directly to the library managed by RomM.
Samba runs in a separate sidecar container instead of being installed inside the main RomM container. RomM communicates with the SMB controller through a restricted Unix socket, without exposing the Docker socket to the application.
The new SMB administration page is available from the
SYSTEMsection and provides:The implementation also includes:
The Samba container is configured with restricted capabilities, guest access disabled, encrypted SMB connections, protected system accounts, limited logs, and persistent internal state.
SMB is intended for trusted local networks or VPN access. It should not be exposed directly to the Internet.
Current limitations and follow-up work
There are still some usability improvements that I would like to add in a follow-up:
These improvements are not required for the current implementation to work, but they would make the feature easier to configure for different libraries and devices.
Checklist
Screenshots
SMB access page and service status
SMB user creation and permissions
User credentials and management
AI assistance disclosure
AI-assisted development tools were used during repository analysis, implementation, testing, and code review. The final changes were manually reviewed and tested before submission.