This is a web-based password manager that can be self-hosted. All stored accounts are encrypted on the client-side. Neither the key for encryption nor the plain passwords (or other account data) are ever transmitted to the server.
The backend is based on php using the symfony framework.
The frontend is based on react-typescript.
For login you can use WebAuthN using platform authenticators. That means logging in using your fingerprint sensor or something similar is possible. Setup is located in the Settings in the web interface.
There also is a Browser Extension (chrome web store).
For quick testing you can use the docker image provided through ghcr:
docker run -p 443:443 ghcr.io/benjaminhae/modern-password-manager:latest
- All data is encrypted before it is sent to the server
- Custom fields for accounts
- Browser Extension (chrome web store)
- Extensions can be implemented in a simple way
- Login using biometrics
- Stable API, so other clients (such as cli) can be implemented
Importing accounts from a csv file:
You need a webspace with PHP 7.4.
- Extract the ZIP file for the release to your server. Point apache to the folder
public
- Copy the configuration file
.env
to.env.local
and adjust the contents to your needs. You need to at least setup the database connection:Also update the APP_SECRET variable to a new random value (32 hex characters).DATABASE_URL=mysql://user:[email protected]:3306/database_name?serverVersion=mariadb-10.3.23
- Afterwards run the script bin/console like that:
bin/console doctrine:schema:update --force
- Clean up. You may remove the following files/folders:
Dockerfile
docker-compose.yml
bin
(if you still need the symfony console, leave this folder)
The password manager only works when you access it through https or on localhost, otherwise current browsers do not accept it as secure origin and do not offer the cryptography APIs.
With this variant a docker container is started that uses a sqlite database.
- run
docker build -t mpm .
in the extracted release (or in the repository itself). - start the container:
docker run --name mpm -p 443:443 mpm
- Visit https://localhost
- If you have used the database in a previous version, you need to upgrade the database (while the container is running).
- This can be done automatically which is a bit dangerous:
docker exec mpm /bin/sh -c "/app/bin/console doctrine:schema:update --force"
- Or you can view the necessary sql statements and do them yourself:
docker exec mpm /bin/sh -c "/app/bin/console doctrine:schema:update --dump-sql"
- This can be done automatically which is a bit dangerous:
Data is stored within the container in /data
and not persisted between container runs by default!
With this variant a docker container for the application and a database service that persists the data is created:
- Change every occurence of
CHANGEME
indocker-compose.yml
to some secret password, this is the password for the database. - Change the value of the environment variable
APP_SECRET
for the servicempm
to a new random value (32 hex characters). - run
docker-compose --env-file /dev/null up -d
within the path of your local copy of this repository. - run
docker-compose --env-file /dev/null exec mpm /bin/sh -c "/app/bin/console doctrine:schema:update --force"
to upgrade the database - visit your password-manager on
https://localhost
- Do everything in
reactClient/my-app/
- Use Node 12.x
- run
npm install
- run
npm link OpenAPIReactClient/
- run
npm run build
-
Copy the whole repository to your server
-
Go to the
Symfony-API/
directory -
Run
composer install --no-dev --no-suggest --optimize-autoloader --classmap-authoritative
. -
Copy the results of the react-build to
Symfony-API/public/
. Also copy the fileindex.html
toSymfony-API/templates/
(creating a symlink also works). -
Copy the
.env
file to.env.local
and fill in your database information in the variableDATABASE_URL
. Also regenerateAPP_SECRET
to a random hex-string that has 32 characters (16 byte). Example database strings:- Mariadb:
mysql://user:[email protected]:3306/database_name?serverVersion=mariadb-10.3.23
- Sqlite:
sqlite:////data/pwman.sqlite
- Mariadb:
-
Prepare the database by running the SQL generated by
php bin/console doctrine:schema:update --dump-sql
in it. -
Configure your webserver with
Symfony-API/public/
as root-directory. -
Make sure to use HTTPS, otherwise nothing will work.
(This is a restriction by the browsers, the JavaScript APIs in use are only available in a secure context:https://*
orlocalhost
) -
Visit your webpage using
https
The following files/directories are not needed at runtime:
- OpenAPIDescription.yaml
- OpenAPIReactClient/
- README.md
- dockerBuild/
- reactClient/
- Symfony-API/bin/