Is it possible to have a repo accessed by both restic and restic-server?

I am new to restic. I have set up a local repository that I can use fine. I also have a working repository on B2, also works fine. I am now trying to get restic-server running against the local repository. Is that at all possible? When I try to access it via REST, I get:

Fatal: unable to open config file: <config/> does not exist
Is there a repository at the following location?

The actual repository has a config, but it’s a file, not a directory:

drwx------   7 root root 4096 Jan  6 12:30 .
drwxr-xr-x   3 root root 4096 Jan  6 12:30 ..
-rw-------   1 root root   68 Jan  6 12:11 .htpasswd
-r--------   1 root root  155 Jan  5 10:07 config
drwx------ 258 root root 4096 Jan  5 10:07 data
drwx------   2 root root 4096 Jan  6 12:32 index
drwx------   2 root root 4096 Jan  5 10:07 keys
drwx------   2 root root 4096 Jan  6 12:32 locks
drwx------   2 root root 4096 Jan  6 12:32 snapshots

So, I am starting to wonder if I can actually use the same repository.

The logs (I am using docker) on the rest-server say:

# docker compose logs
rna-restic-rest-server  | Data directory: /data
rna-restic-rest-server  | Authentication enabled
rna-restic-rest-server  | Loaded htpasswd file /data/.htpasswd
rna-restic-rest-server  | Private repositories disabled
rna-restic-rest-server  | start server on :8000
rna-restic-rest-server  | TLS enabled, private key /etc/restic/, pubkey /etc/restic/
rna-restic-rest-server  | HEAD /data/config

So, TLS is working, authentication is working. But it can’t read config?

My bad. I used rest:https://user:password@host:8000/data instead of rest:https://user:password@host:8000/. This one hinted me to what I was doing wrong: 404 on file "config", yet it is there · Issue #115 · restic/rest-server · GitHub

1 Like