I put some of my apps containers on a dataset ‘apps_configs’ and point to it from a custom config I make from the Truenas apps discover → Install by yaml. This way the app still gets to be seen in the Truenas apps tab, can be start/stopped/restart from there and notes accessed directly from their, and they can be easily backed up and restored using tools available in Truenas. Since the files are all accessible they should be able to be put on a different Truenas server or on a different machine.
The compose files, and any other files the app needs are where I can control them, see them, edit them, and not hidden or partially hidden. I use watchtower to update the apps. I did not mapp the dataset to SMB or anything, but I use code server in a container to edit and Portainer can slao access the containers
The custom config I make just has an include and the path to where the app resides which nice. Starting with TrueNAS 25.10, you will need to add a services key to your custom yaml for new stacks and when updating your existing stacks. Everything else is the same.
This was explained in a forum thread and also outlined in a youtube video that puts together what the forum thread discussed. There may be a similar way now of doing the same in a more recent version of Truenas CE, but the method works well.