Export passwork vaults to keepass. The need was to create a daily cron job that makes a local backup of my vaults.
- Self hostet passwork instance (https://passwork.pro/)
- git (optional)
- node >= 12
- yarn or npm
git clone https://github.com/nepodev/pass2keep
cd pass2keep
yarn
Configuration must be passed through environment variables. You can also use an .env
file.
PASSWORK_URL
URL to the Passwork instancePASSWORK_TOKEN
Personal API KeyPASSWORK_MASTERPASS
(optional) If you are using a client side encryption.PASSWORK_VAULTS
(optional) Vaults to Export. If no vaults are given, all vaults will be exported.KEEPASS_PASSWORD
Password for keepass databaseKEEPASS_FILE
Full filepath to the new kdbx-file.
## export all my vaults
PASSWORK_URL=https://passwork.example.com/api/v4 \
PASSWORK_TOKEN="MyPersonalToken" \
KEEPASS_PASSWORD=MyVerySecretSecret \
KEEPASS_FILE="/path/to/my/export.kdbx" \
node /opt/pass2keep/index.js
## export only two vaults named MyVault and GroupVault
PASSWORK_URL=https://passwork.example.com/api/v4 \
PASSWORK_TOKEN="MyPersonalToken" \
PASSWORK_VAULTS=["MyVault", "GroupVault"] \
KEEPASS_PASSWORD=MyVerySecretSecret \
KEEPASS_FILE="/path/to/my/export.kdbx" \
node /opt/pass2keep/index.js