I tried deteting the database but was still getting permissioning errors. It seem Teslamate-db has root permissions. I chaged duplicati to root permission with
environment:
- PUID=0
- PGID=0
in the stack and that seems to fix it.
I am aware that it is bad protocol to hand out root permissions but only solution I found.