Docs
GuidesInstallation

Network install

Install HWD POS with a single command that downloads and configures everything.

The network install is the recommended way to install HWD POS. It always fetches the latest version of the installation scripts and of the system, and a single command does all the work: it installs the web server, PHP, the database, printing, the two background services, the firewall rules and the hwdpanel server panel.

Time10–20 minutes on a clean server with a good connection
You needA clean server, root (or sudo) access, internet access and your activation key
ResultThe system is running and opens in the browser from any computer on the network

Before you start, check the requirements.

The command

Run this on the server, over SSH or at its console:

curl -fsSL https://3r.com.pa/hwdpos_inst/bootstrap.sh | sudo bash

That is all. The script:

Detects the system family (apt → Ubuntu/Debian, dnf → AlmaLinux/Rocky/RHEL) and downloads the matching installer.

Asks what it needs to know (next section) before installing anything.

Downloads and installs the system and all its dependencies.

Shows a ✓ / ✗ summary and the address where you finish the setup in the browser.

The system package (.zip) does not include the installation scripts. The installer downloads its helpers (install-workers.sh, hwdpanel.sh and check.sh) from https://3r.com.pa/hwdpos_inst/ and leaves them, together with itself, in /var/www/HWDPOS/deploy/. That folder belongs to root so the web server cannot modify it, and it is where hwdpanel and later repairs look for them.

The installer's questions

All questions are asked at the start, on purpose, so you are not interrupted in the middle of a download. In a normal installation you just accept the three defaults.

1. Installation mode

Modo de instalación:
   1) Todo en uno  — servidor web + base de datos en ESTE servidor  (predeterminado)
   2) Solo web     — servidor web + PHP; la base de datos está en OTRO servidor
   3) Solo base de datos — únicamente MariaDB abierto a la red (sin web ni PHP)
Opción [1/2/3]:
OptionWhen to use it
1) All in oneThe normal choice. One server for the store. It is the default: press Enter.
2) Web onlyThe database already lives on another machine (or you want to separate them for performance). You will be asked for the database server's IP.
3) Database onlyYou are preparing the database machine. You will be asked which IP to authorize for the web server.

Modes 2 and 3 are covered in Separate database server.

2. Website port

Puerto [80]:

Press Enter for port 80. See Site port if you need a different one.

3. Server time zone

Asked only if the server is not already on Panama time:

Zona horaria del servidor: UTC. El sistema trabaja con la hora de Panamá (America/Panama).
¿Poner la zona horaria del servidor en America/Panama? [S/n]:

Press Enter to accept. With a different time zone, the server clock, the log timestamps and the database time do not match the system's time. On a separate database server you should accept it too.

4. Nothing else

The installer generates the database password itself and saves it in deploy/DB-CREDENTIALS.txt (readable only by root). If the server already had one (for example, when you run the installer again), it keeps it. See Upgrade and reinstall.

Unattended runs

Without an interactive terminal (cron, cloud-init, ssh server 'command') nothing is asked: the mode is "all in one", the port is 80, the time zone is not changed (the summary marks it ✗ and shows the command to change it) and everything else is set with variables. If a terminal exists but cannot be opened, it is treated as if there were none.

The final summary

When it finishes, you see something like this (on AlmaLinux three SELinux lines are added):

==================== RESUMEN DE INSTALACIÓN (all) ====================
  ✓ Apache (activo)
  ✓ PHP 8.3-FPM (activo)
  ✓ PHP: pdo_mysql
  ✓ PHP: mbstring
  ✓ PHP: curl
  ✓ PHP: zip
  ✓ PHP: gd
  ✓ PHP: opcache
  ✓ PHP: sodium (recomendado; hay polyfill)
  ✓ CUPS (impresión A4/IP)
  ✓ Chrome/Chromium (PDF de documentos A4; se probó ejecutándolo)
  ✓ Worker de impresión (hwpos-print)
  ✓ Worker de impresión (arranque auto)
  ✓ Worker de plugins (hwpos-plugins)
  ✓ Worker de plugins (arranque auto)
  ✓ Zona horaria del servidor: America/Panama
  ✓ MariaDB (activo)
  ✓ Base de datos 'hwd_pos' creada
  ✓ Código del sistema en /var/www/HWDPOS
  ✓ Panel de administración (hwdpanel)
  ✓ Puerto 80 escuchando

  IP interna (LAN):  192.168.1.50
  IP externa (WAN):  203.0.113.10
=======================================================================

Termine la instalación en el navegador (desde cualquier equipo de la red):
   http://192.168.1.50/install

Read it before you continue. Every ✗ is explained in Common problems.

  • A ✗ on sodium, on Chrome/Chromium or on the time zone does not prevent you from continuing.
  • A ✗ on pdo_mysql, MariaDB or the port does.
  • The Chrome/Chromium line does not just check that the command exists: it runs it as the web server user, because a Snap chromium-browser without snapd exists but does not work.
  • The last line only offers hwdpanel if it was really installed; otherwise it says which file was missing.

Then open the address shown and continue with the setup wizard.

Command variants

All variants run the same way; only the variables at the start change:

# Different port, without asking
curl -fsSL https://3r.com.pa/hwdpos_inst/bootstrap.sh | sudo WEB_PORT=8080 bash

# No printing (a server that does not print)
curl -fsSL https://3r.com.pa/hwdpos_inst/bootstrap.sh | sudo WITH_PRINTING=no bash

# With your own domain name
curl -fsSL https://3r.com.pa/hwdpos_inst/bootstrap.sh | sudo DOMAIN=pos.mystore.com bash

# Only the ENVIRONMENT (dependencies and services), without the system code
curl -fsSL https://3r.com.pa/hwdpos_inst/bootstrap.sh | sudo ENV_ONLY=1 bash

# From a specific package already on the server
curl -fsSL https://3r.com.pa/hwdpos_inst/bootstrap.sh | sudo HWPOS_ZIP=/root/HWDPOS-v1.5.0.zip bash

# No questions (cron, cloud-init, ssh server 'command'), changing the time zone
curl -fsSL https://3r.com.pa/hwdpos_inst/bootstrap.sh | sudo HWPOS_ZIP=/root/HWDPOS-v1.5.0.zip SET_TIMEZONE=yes bash

HWPOS_ZIP accepts a local path on the server or a URL. The package is extracted to /var/www/HWDPOS, and the installer for your system family is downloaded from the distribution server (the .zip does not include it). The .zip must have HWDPOS/ as its root folder, as the official packages do.

On a system that is already installed, HWPOS_ZIP refuses to run: to update, use System → Updates (Sistema → Actualizaciones). To really replace the installation, add HWPOS_REPLACE=1; the previous folder is kept as HWDPOS.anterior-DATE instead of being deleted.

Any failure or cancellation ends with a non-zero exit code, so an automation can never mistake a failed installation for a successful one.

The full list of variables is in Installer variables.

Interactive menu

Run without a pipe, the same script asks before doing anything and lets you choose between installing only the environment or everything from a .zip:

sudo bash /root/hwdpos-inst/bootstrap.sh

Without a terminal there is no menu: pass HWPOS_ZIP=… or ENV_ONLY=1 (or MODE=db), otherwise it exits with an error.

Site port

The installer asks for the port and uses 80 if you do not choose another one.

PortHow you open itWhen to use it
80 (default)http://192.168.1.50/Whenever the server is dedicated to HWD POS. You do not need to type the port.
Another (e.g. 8080)http://192.168.1.50:8080/When the server already hosts another site on port 80.

Ports the system already uses are rejected up front: 22 (SSH), 3306 (MariaDB) and 8108 (search engine). That is better than leaving the web server unable to start.

When you choose a port, the installer changes the four things that go together: the VirtualHost (or Nginx listen), the server's Listen directive (the one people forget when doing it by hand, which leaves the site not listening), the firewall and the addresses in the final summary.

To change the port after installing, the simplest way is to run the installer again with WEB_PORT=. It is safe to run again and does not delete data. Manual steps are described in Web server.

Terminals and tablets must point to the address including the port. The system itself needs no adjustment: its internal links are relative.

Installing without internet on the server

If the server cannot download from the internet, you can install from the .zip package copied over USB or SCP. See Ubuntu and Debian (the same procedure applies to AlmaLinux with its own installer).

Activation always needs internet, even when the code comes from a .zip. The server must be able to reach https://3r.com.pa during the last step of the setup wizard.

On this page