Docs
GuidesConfiguration

Application configuration

How HWD POS combines config/app.php and storage/config.php, and how to edit the per-installation settings.

HWD POS is a native PHP application. Its effective configuration is built from two files:

FileContents
config/app.phpDefault values shipped with the application. Do not edit it: updates replace it.
storage/config.phpValues specific to this installation: database connection, base URL, language, time zone and optional services.

The browser setup wizard creates storage/config.php automatically. It may contain passwords, so keep it private: it lives outside the web root (public/) and is never served by the web server.

Editing storage/config.php

To change a value manually, edit /var/www/HWDPOS/storage/config.php. Its structure is:

<?php

return [
    'app' => [
        'name' => 'HWD POS',
        'env' => 'production',
        'debug' => false,
        'base_url' => '',
        'locale' => 'es',
        'timezone' => 'America/Panama',
    ],
    'db' => [
        'driver' => 'mysql',
        'socket' => '',
        'host' => '127.0.0.1',
        'port' => '3306',
        'database' => 'hwd_pos',
        'username' => 'hwdpos_manager',
        'password' => 'YOUR_DB_PASSWORD',
        'charset' => 'utf8mb4',
    ],
];

After changing the file, reload the application in the browser.

Keep debug set to false in production. Detailed error messages can reveal internal information.

Options

app

KeyDescription
nameApplication name.
envEnvironment. Use production.
debugShow detailed errors. false in production.
base_urlBase URL. Usually empty: the system's internal links are relative, so it works on any IP or port.
localeDefault language: es (Spanish), en (English) or zh (Chinese). Users can switch from the top bar.
timezoneApplication time zone. The system works with Panama time (America/Panama).
typesenseOptional search service connection. See Typesense search.

db

KeyDescription
drivermysql (MariaDB or MySQL).
socketUnix socket path. If not empty, it takes precedence over host and port.
hostDatabase server. 127.0.0.1 on the same server, or the database server IP in a split installation.
port3306.
databaseDatabase name (hwd_pos by default).
usernameDatabase user (hwdpos_manager when created by the installer).
passwordDatabase user password.
charsetutf8mb4. Do not change it.

Socket or TCP

On Linux servers and on Windows, leave socket empty to connect over TCP to host and port. This is what the installers configure.

A socket is only for special local setups. For example, with XAMPP on macOS the socket is usually /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock.

Use 127.0.0.1 rather than localhost for host. With localhost, the MySQL driver tries to use a socket, which can fail with "No such file or directory".

Database password

If you change the database user's password in MariaDB, update password here too. The installer keeps both in sync when it is re-run: it reads the password from storage/config.php and applies it to the database user. You can view the current credentials with hwdpanel (option 8) or:

php /var/www/HWDPOS/scripts/hwd-admin.php db-info

Legacy .env file

Older versions used a .env file. It is no longer needed; keep it only temporarily while migrating from an older version. The web server blocks access to .env files in any case.

On this page