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:
| File | Contents |
|---|---|
config/app.php | Default values shipped with the application. Do not edit it: updates replace it. |
storage/config.php | Values 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
| Key | Description |
|---|---|
name | Application name. |
env | Environment. Use production. |
debug | Show detailed errors. false in production. |
base_url | Base URL. Usually empty: the system's internal links are relative, so it works on any IP or port. |
locale | Default language: es (Spanish), en (English) or zh (Chinese). Users can switch from the top bar. |
timezone | Application time zone. The system works with Panama time (America/Panama). |
typesense | Optional search service connection. See Typesense search. |
db
| Key | Description |
|---|---|
driver | mysql (MariaDB or MySQL). |
socket | Unix socket path. If not empty, it takes precedence over host and port. |
host | Database server. 127.0.0.1 on the same server, or the database server IP in a split installation. |
port | 3306. |
database | Database name (hwd_pos by default). |
username | Database user (hwdpos_manager when created by the installer). |
password | Database user password. |
charset | utf8mb4. 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-infoLegacy .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.