LANPASS MANUAL

TEAM PASSWORD MANAGER FOR GROUPS

This is recommended guide to set up Lanpass.
You can skip or do your own setup if you know what to do.

 

Lanpass structure

Lanpass consists of two separate applications – server application and client application.
The server application is written in PHP language and uses MySQL database.
The client application is written in HTML and JavaScript.

 

Importing MySQL database

1.  Create new database in your MySQL server (utf8_unicode_ci). You can create new MySQL user with own database.

2.  Import file lanpass_import_blank.sql to the database.

 

Installing server and client applications on the same Apache server

1.    Copy folder “server” to your web root folder.

2.    Copy folder “client” to your web root folder.

3.    Create file named “.htaccess” in your web root folder.

4.    Write following lines to the .htaccess file and save changes:

# – BEGIN OF .htaccess FILE – #
RewriteEngine on
# client routing
RewriteCond %{REQUEST_URI} !/server/public/
RewriteCond %{REQUEST_URI} !/client/
RewriteRule (.*) /client/$1 [L]
# server routing
RewriteCond %{REQUEST_URI} /api/
RewriteRule (.*) /server/public/$1 [L]
# – END OF .htaccess FILE – #

5.    Run Unix command shell or Windows cmd.exe

6.    Navigate to the copied folder “client” via command “cd <path>” (without quotes).

7.    Type “php lanpass setup” (without quotes) and press ENTER.

8.    Lanpass setup should appear – example:
#####################################################################
#                                                                   #
# Welcome to Lanpass setup.                                         #
# This setup will help you to configure your server application.    #
#                                                                   #
#####################################################################

Choose number [1 – 3] to run setup: [Exit]:
[0] Exit
[1] Database setup
[2] Application setup
[3] Security setup
[4] Re-cache (manually edited) .env file
[5] Backup .env and config.php
>

8.1.  Type 1 and press ENTER to start Database setup.

8.2.  Type database host of your database. Press ENTER.

8.3.  Type database port of your database. Press ENTER.

8.4.  Type database name of your database. Press ENTER.

8.5.  Type database user name which should be used by Lanpass. Press ENTER.

8.6.  Type database password which should be used by Lanpass. Press ENTER.

8.7.  Type 2 and press ENTER to start Application setup.

8.8.  Type application URL (or domain), ex. https://mycompany.com or https://localhost and press ENTER.

8.9.  Type 0 to disable registration of new users or type 1 to enable registration of new users. Press ENTER.

8.10. Type 0 to skip administration rights reset – you do not have any registered users yet. Press ENTER.

8.11. Type 3 and press ENTER to start Security setup.

8.12. Type 0 to autodetect optimal cost for BCRYPT algorithm. Press ENTER.

8.13. Type 0 to set RSA key bit size to 4096 bits. Press ENTER.

8.14. Type ‘yes’ (without quotes) to generate new JWT encryption key. Press ENTER.

8.15. Type ‘yes’ (without quotes) to generate new JWT signing key. Press ENTER.

8.16. Type 8 or higher number to set min password length for new users. Press ENTER.

8.17. Type 50 or lower number to set max password length for new users. Press ENTER.

8.18. Type 0 and press ENTER to exit Lanpass setup.

9.    Locate and open config.js file in the “client” folder.

10.   Modify api_url – ex. https://mycompany.com/api/v1 or https://localhost/api/v1

11.   Modify app_url – ex. https://mycompany.com or https://localhost

12.   Modify registration_url – ex. https://mycompany.com/registration or https://localhost/registration

13.   Save changes to the file config.js.

14.   Open the URL of your server application in your browser – https://mycompany.com or https://localhost

15.   Click Registration link.

16.   Register new user – later you will give this user admin rights.

17.   Run “php lanpass setup” (without quotes) in Unix command shell or cmd.exe.

18.   Type 2 and press ENTER to start Application setup.

19.   Press ENTER two times to skip first two options.

20.   Type number coresponding to newly created user and press ENTER.