You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

Password management is very critical when dealing with online services. It is important to be able to remember the passwords but most importantly to ensure that the password are properly secured. Many people get tempted to use simple passwords repeatedly so that they can easily remember but this comes with the risks of being hacked.

With the use of password management tools we can keep strong passwords safe and to be in a place that can easily be retrieved Password managers ensure that the passwords are encrypted such that outsider can easily get hold of them. Among the most common password management tools is Keepass.

Advantages Of Using Password Managers

  • Use of password manager takes away the burden of having to remember so many passwords
  • It makes it possible to use strong passwords without the worry of having to remember them
  • Password managers make it possible to manage shared accounts
  • They have password auto-generation functionality that makes it easy to get strong passwords.

Keeweb is a Linux password manager. It can store passwords both offline and online and syncs with online storage tools such as Owncloud, OneDrive, GoogleDrive and Gropbox. This guide is about how to install Keeweb password manager on Ubuntu 20.04 with dcker

Install KeeWeb on Ubuntu 20.04 with Docker

First, ensure that you have Docker CE installed in your Ubuntu 20.04. Follow the next steps to install Docker CE on Ubuntu 20.04.

Step 1: Install Docker CE on Ubuntu 20.04

Install docker dependency packages on Ubuntu 20.04 with the below command

sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common

Next add docker GPG key and docker repository to your Ubuntu server as below:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"

Now update packages and install Docker CE on Ubuntu 20.04

sudo apt-get update
sudo apt install docker-ce

Once installed, Docker daemon should be automatically started. You can confirm status as below:

$ sudo systemctl status docker
● docker.service - Docker Application Container Engine 
    Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) 
    Active: active (running) since Sat 2020-10-17 16:28:08 EAT; 57s ago 
TriggeredBy: ● docker.socket 
      Docs: https://docs.docker.com 
  Main PID: 2807 (dockerd) 

You can add your user to Docker group so that you don’t have to write sudo when running Docker commands.

sudo usermod -aG docker ${USER}

Step 2: Installing KeeWeb on Ubuntu 20.04 with Docker

We are going to build Keeweb from source with the below commands:

git clone https://github.com/SvenC56/docker-keeweb.git
cd docker-keeweb
docker build -t svenc56/keeweb .

Now run keeweb image and expose on port 80 as shown below:

$ sudo docker run -d -p 80:80 keeweb         
626d3872ddfdb33988818b1d24b545dc473ebdcab64d143b3474e730a0ecb5f9

Access KeeWeb from the browser with https://<your-host-ip>. This is the page you should see:

Click on the + sign to start adding a new password file. This is the page you get:

Click on ‘new’ at the bottom left and you will get a page as below. Provide master password, name, backup if you need and other settings you may require.

Once done, click on ‘Save to’. Here, you will choose to save to a file or integrate with cloud storage such as Dropbox, OneDrive and Google drive. I am going to be saving to Google Drive

Once added, your new password file should appear on the left side of KeeWeb application.

To start adding entries, click on the + then select entry. You can also choose to add a group or a template.

Add the entries you require as below. You can add more fields as you need

Step 3: Customize KeeWeb

KeeWeb comes with a lot of options to customize it as you like. It supports shortcuts and keyboard completion, plugins and interaction with usb. Some shortcuts are as shown

Step 4: Installing KeeWeb Plugins

Click on Plugins→load plugin gallery.

Select a plugin and click Install

Step 5: KeeWeb Integration with Google Drive

To integrate your KeeWeb with Google drive, click on your new keepass, click Save to and select Google Drive. You are likely to get an error as below:

This means the provided URL for KeeWeb does not match the authorized ones for OAuth client. To update the authorized redirect URIs, visit Go to Google Developer Console at https://console.developers.google.com/. Add a new project

Click on Credentials-> Create Credentials-> OAuth Client ID

Under application type, select web application

Next, provide your domain and site urls as below and click create.

Once you click CREATE, you should receive your client client ID and your client secret. Keep them save. Follow the below remaining steps to finish up your configuration

  • Set Client ID and Secret in KeeWeb in gdriveClientId and gdriveClientSecret fields of your config
  • You will need to either verify your domain, or add yourself to Risky Access Permissions By Unreviewed Apps Google Group (more about Google Drive in this issue).
  • Enable Drive API for your project

Conclusion

The importance of password management is something we cannot ignore as it relieves the pain of having to remember so many passwords and also enables to as strong passwords as we can which can easily be retrieved from the password manager. In this guide we have looked at how to install KeeWeb password manager using docker. KeeWeb is both online and offline tool for password management. I hope this has been useful.

You can support us by downloading this article as PDF from the Link below. Download the guide as PDF