Navidrome, myMPD… how to upload music library to system user

Navidrome, myMTP etc configure users so that the are system users, hence I can’t ssh to them nor can I use sftp. So how am I supposed to populate the library folder? Am I supposed to turn them back to normal user, or is there a cleaner way to keep them as system users? (if it helps on the long term I want this folder to be synced with nextcloud, e.g. via external local storage)

You can set their resource folders to a directory owned by a group all the services and users that need to access it are part of, and mark that shared directory with 770 (or 750, assuming neither navidrome nor mymtp need to write to it) permissions.

That’s also how you’d hook it up to a nextcloud folder.

Don’t make these services run by non-system users; you should never ssh into a service user’s account, that’s the point of service users. If you feel the need to, you’re doing something wrong.

1 Like

Thanks a lot. I ended up doing basically what you suggest (creating a new user with home to some folder in /var/lib/mymusic lib and group and adding nextcloud, myMpd, navidrome etc to this extra group, and configured them to point the library to this folder) except that I also added the setgid bit on the folder so that files get the right group when written by softwares with write access like nextcloud etc. I use external storage for nextcloud to write to this folder.