restic/rest-server

--no-auth and DISABLE_AUTHENTICATION does not work on restic/rest-server:latest

arkanoid87 opened this issue · 2 comments

rest-server 0.10.0 compiled with go1.15.2 on linux/amd64


How did you run rest-server exactly?

$ docker-compose up

tried with

version: '3'

services:
  rest-server:
     image: "restic/rest-server:latest"
     restart: unless-stopped
     environment:
       - OPTIONS="--no-auth"
     ports:
       - 8000:8000
     volumes:
       - /mnt/disk/restic:/data

and

version: '3'

services:
  rest-server:
     image: "restic/rest-server:latest"
     restart: unless-stopped
     environment:
       - DISABLE_AUTHENTICATION=1
     ports:
       - 8000:8000
     volumes:
       - /mnt/disk/restic:/data

Expected behavior

$ docker-compose up
Recreating rest-server_rest-server_1 ... done
Attaching to rest-server_rest-server_1
rest-server_1  | 
rest-server_1  | **WARNING** No user exists, please 'docker exec -it $CONTAINER_ID create_user'
rest-server_1  | 
rest-server_1  | Data directory: /data
rest-server_1  | Authentication disabled
rest-server_1  | Private repositories disabled
rest-server_1  | Starting server on :8000

Actual behavior

$ docker-compose up
Recreating rest-server_rest-server_1 ... done
Attaching to rest-server_rest-server_1
rest-server_1  | 
rest-server_1  | **WARNING** No user exists, please 'docker exec -it $CONTAINER_ID create_user'
rest-server_1  | 
rest-server_1  | Data directory: /data
rest-server_1  | Authentication enabled
rest-server_1  | Private repositories disabled
rest-server_1  | Starting server on :8000

Did rest-server help you today? Did it make you happy in any way?

I've spent quite some time understanding why borg was so much faster than restic, then I've read about sftp, client/server architecture and the possibility to drop a server on the other side for restic too. This should be explained better in my opinion, as newcomers may just skip it

rest-server_1 | WARNING No user exists, please 'docker exec -it $CONTAINER_ID create_user'

This line shouldn't be printed if the environment variable DISABLE_AUTHENTICATION is properly set. The same applies to the variant passing --no-auth. According to #119 the latter should work.

Closing as this seems to be an issue with calling the container and there hasn't been any feedback.