1Password Connect Server now working with Docker Compose

Options
vascogomes
vascogomes
Community Member

Hi, I have made extensive testing with 1Password Connect Server with Docker Compose and it don't work properly: https://developer.1password.com/docs/connect/get-started#step-2-deploy-1password-connect-server

I have the 1password-credentials.json and the docker-compose.yaml in the same folder. Here is the docker-compose.yaml:

version: "3.4"

services:
  op-connect-api:
    image: 1password/connect-api:latest
    ports:
      - "8080:8080"
    volumes:
      - "./1password-credentials.json:/home/opuser/.op/1password-credentials.json"
      - "data:/home/opuser/.op/data"
  op-connect-sync:
    image: 1password/connect-sync:latest
    ports:
      - "8081:8080"
    volumes:
      - "./1password-credentials.json:/home/opuser/.op/1password-credentials.json"
      - "data:/home/opuser/.op/data"

volumes:
  data:

This Docker Compose is the same as published on 1password Github: https://github.com/1Password/connect/tree/main/examples/docker/compose

I have made testing on a Apple Mac M1 and it worked immediately. But when I switch to AWS EC2 Linux machine (tested multiple SO like Ubuntu or Amazon Linux) it doesn't work.
I have exactly the same setup like the Apple MAC installation. Both 1password-credentials.json and the docker-compose.yaml inside the same folder and run:

docker-compose up -d
export OP_API_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxx"
curl \
-H "Accept: application/json" \
-H "Authorization: Bearer $OP_API_TOKEN" \
http://localhost:8080/v1/vaults

What I get is:

{"status":500,"message":"failed to initiate, review service logs for details"}
{"log_message":"(I) ### syncer credentials bootstrap ### ","timestamp":"2023-05-22T19:04:08.964309466Z","level":3}
{"log_message":"(E) Server: (unable to get credentials and initialize API, retrying in 2s), Wrapped: (failed to FindCredentialsUniqueKey), failed to loadCredentialsFile: Server: (LoadLocalAuthV2 failed to credentialsDataFromDisk), open /home/opuser/.op/1password-credentials.json: no such file or directory","timestamp":"2023-05-22T19:04:08.964412956Z","level":1}

Can you please advise how to fix this and make it work as intended?

I also have searched on the support community and I see a lot of complaints on this over time and no clear solution. Some examples: https://1password.community/search?adv=1&search=credentialsDataFromDisk&title=&author=&cat=74&subcats=1&tags=&discussion_discussion=1&comment_comment=1&within=1+day&date=

Greetings

Comments

  • Jillian_1P
    edited May 2023
    Options

    Hi there! Sorry to hear you are running into this issue. Based on the information you provided we are having difficulty reproducing the exact error you are getting. Could you please double check that you received the provided error when using the published docker compose with no changes? It is possible that some errors may look like the one you shared but will have different information at the end; in this case the error being a file not found error.

    One thing you can try in the meantime is making sure that the permissions of the credentials file are set correctly. Try running the following command:

    chmod 644 ./1password-credentials.json

This discussion has been closed.