recorder icon indicating copy to clipboard operation
recorder copied to clipboard

ocat --load=keys NOT loading , not working

Open sivom opened this issue 2 months ago • 3 comments

I am running docker container owntracks recorder. client phones are using encryption. I am trying to load the same encryption key using ocat in the container. it does nothing. when i read back with ocat --dump=keys just empty

Appreciate any comments and help.

Image

sivom avatar Oct 21 '25 15:10 sivom

The are several (meanwhile closed) issues here and in our docker-recorder repo describing similar problems.

In brief: you'd have to stop the ot-recorder from having the database open in order to load the keys, but I don't know how to do that and do not recall anybody actually managing to do so, though I may err.

jpmens avatar Oct 21 '25 16:10 jpmens

I did few things to manually stop ot-recorder but the container failed. I also tried entry_point script to load the keys and friends , that didn't work either. Stopping and starting ot-recorder is the key I believe this is the basic functionality that needs to work. i also tried temporary container to load the keys, no luck.

To Developer is it possible to make it work to briefly stop recorder update the db and start again. This piece is missing in the recorder image

another missing piece is if you load a key, check the key against the login users , if it matches use it, if it doesn't reject the user. instead of loading same key for 100 users.

my entrypoint script

#!/bin/sh

set -x
# Stop the running recorder process so we can access the database
# The container's default CMD will start the process, so we must stop it first.
pkill ot-recorder

# Load friends.txt, if it exists
if [ -f "/config/friends.txt" ]; then
    echo "Loading friends from /config/friends.txt..."
    ocat -S /store --load=friends < /config/friends.txt
fi

# Load keys.txt, if it exists
if [ -f "/config/keys.txt" ]; then
    echo "Loading keys from /config/keys.txt..."
    while read line; do
        printf "$line" | ocat -S /store --load=keys
    done < "/config/keys.txt"
fi

# Restart the recorder with the original command and arguments
echo "Restarting ot-recorder..."
/usr/sbin/ot-recorder

sivom avatar Oct 22 '25 15:10 sivom

Not sure I understand: did that entrypoint script work for you?

jpmens avatar Oct 23 '25 15:10 jpmens