Self-hosted instance installation feedback (and questions)


#1

Hi,

I managed to install Cozy on a Debian Stretch (and like the result very much BTW).

I encountered the issue about not having a cozy-admin-passphrase file in /etc/cozy/ and created it. I also ran cozy-stack config passwd /etc/cozy/cozy-admin-passphrase to fill it and if I cat it get something along the lines of:

scrypt$123123123123123123123123.....123123123

However everytime I run a cozy-stack command, like cozy-stack apps ls --domain cozy.mydomain.org, it prompts me for a password. I guess this is why I can’t use cozy-coclyco, as it hangs forever on the ‘Password :’ prompt.

I edited the tool source code (thanks god it is in Python) and replaced calls to cozy-stack with their output but I would like to get a more future-proof state.

Also, it seems permissions on the directory don’t match what I found in forum messages, mine are:

# ls -ld /etc/cozy
drwxr-xr-x 2 root root 4096 Mar  4 15:42 /etc/cozy

#2

Hello @raphael,

Welcome aboard!

Have you exported the COZY_ADMIN_PASSWORD environment variable? ( see https://github.com/cozy/cozy-stack/blob/2ae446d85b60c89fb56cad1f7ed469cddca94494/docs/config.md#user-content-administration-secret ) It prevents cozy-stack from asking a password every time it is called. I guess that, due to the regression you mentioned, it is not set to the right value…


#3

Hi, no I did not.

Just tried though and it works, thanks !

If you’ve got the time, could you please tell me if these are the same (values)?

  • The COZY_ADMIN_PASSWORD environment variable.
  • The passphrase required when invoking cozy-stack config passwd /etc/cozy/cozy-admin-passphrase.
  • The debconf question cozy-stack/cozy/password, which is asked for when installing the Debian package.

#4

Yes, this is the same.
cozy-stack/cozy/password is used to generate /etc/cozy/cozy-admin-passphrase at install time.
Then COZY_ADMIN_PASSWORD is used at runtime and checked against /etc/cozy/cozy-admin-passphrase to authenticate administrators.