PasswordLab Configuration File

Overview

The PasswordLab configuration system uses a JSON-based configuration file (passwordlab.json) that defines all essential settings for the application. This document provides comprehensive details about each configuration section, its purpose, and how to properly configure them.

Configuration File Location

The location of the passwordlab.json configuration file depends on how the application was installed:

Non-Root User Installation

When installed by a non-root user, the configuration file is located beside the software binary:

              
/path/to/passwordlab/binary/passwordlab.json
              
            

Root User Installation

When installed by root user, the configuration file is located in the system configuration directory:

              
/etc/passwordlab/passwordlab.json
              
            

Determining Installation Type

The application automatically detects the appropriate configuration path based on:

Configuration Structure

The configuration is organized into six main sections:

  1. Database Configuration
  2. Email Configuration
  3. Internal Settings
  4. License Configuration
  5. Login Configuration
  6. Server Configuration

Database Configuration

The db section configures the database connection settings.

Structure

              
{
    "db": {
        "driver": "string",
        "location": "string",
        "dbname": "string",
        "username": "string",
        "password": "string",
        "port": "string"
    }
}
              
            

Parameters

Parameter Type Required Description Example
driver string Yes Database driver type (currently supports MySQL) "mysql"
location string Yes Database server hostname or IP address "127.0.0.1", "localhost", "db.example.com"
dbname string Yes Name of the database to connect to "passwordlab_prod", "demo"
username string Yes Database username for authentication "root", "passwordlab_user"
password string Yes Database password for authentication "secure_password123"
port string Yes Database server port number "3306" (MySQL default)

Example Configuration

              
{
    "db": {
        "driver": "mysql",
        "location": "127.0.0.1",
        "dbname": "passwordlab_production",
        "username": "passwordlab_user",
        "password": "your_secure_password",
        "port": "3306"
    }
}
              
            

Email Configuration

The email section configures SMTP settings for sending emails (notifications, password resets, etc.).

Structure

              
{
    "email": {
        "host": "string",
        "port": "string",
        "username": "string",
        "password": "string",
        "from": "string",
        "encryption": "string"
    }
}
              
            

Parameters

Parameter Type Required Description Example
host string Yes SMTP server hostname "smtp.gmail.com", "smtppro.zoho.in"
port string Yes SMTP server port number "587" (STARTTLS), "465" (SSL/TLS)
username string Yes SMTP authentication username (usually email) "hello@passwordlab.io"
password string Yes SMTP authentication password or app password "app_specific_password"
from string Yes Default "From" email address for outgoing emails "noreply@passwordlab.io"
encryption string Yes Encryption method for SMTP connection "ssl/tls", "starttls", "none"

Internal Settings

The internal section contains system-generated settings used for application integrity and licensing.

Structure

              
{
    "internal": {
        "checksum": "string",
        "machineid": "string",
        "stamp": "string"
    }
}
              
            

Parameters

Parameter Type Required Description
checksum string Yes System-generated checksum for configuration integrity
machineid string Yes Unique machine identifier for licensing and security
stamp string Yes Unix timestamp of configuration creation/modification

Important Notes


License Configuration

The license section contains licensing information for the PasswordLab application.

Structure

              
{
    "license": {
        "id": "string",
        "certificate": "string"
    }
}
              
            

Parameters

Parameter Type Required Description
id string Yes Unique license identifier
certificate string Yes Encrypted license certificate data

Important Notes


Login Configuration

The login section configures user authentication and session management.

Structure

              
{
    "login": {
        "timeout": 60
    }
}
              
            

Parameters

Parameter Type Required Default Description
timeout integer No 60 Session timeout in minutes before automatic logout

Security Considerations


Server Configuration

The server section configures the web server settings.

Structure

              
{
    "server": {
        "domain": "string",
        "port": 3000,
        "debug": false
    }
}
              
            

Parameters

Parameter Type Required Default Description
domain string No - Server domain name (for production deployments)
port integer No 3000 Port number for the web server
debug boolean No false Enable/disable debug mode

Important Notes


Troubleshooting

Common Issues

Application Won't Start

Email Not Working

License Issues

Database Connection Errors

Remember to keep your configuration secure and backed up, and never share sensitive credentials or license information.