E-commerce Azure

Lakasir POS on Ubuntu 24.04 on Azure User Guide

| Product: Lakasir POS on Ubuntu 24.04 LTS on Azure

Overview

Lakasir is a free and open source Point of Sale system for small and independent retailers. It pairs a touch friendly cashier screen with a full back office: products and categories with per unit pricing, suppliers and purchase orders, stock opname for inventory audits, members and vouchers, configurable payment methods, receivables tracking, simple accounting and a real time sales dashboard. Barcode scanning is supported across the cashier, purchasing and stock opname screens, and receipts can be sent straight to a USB thermal printer from the browser. The cloudimg image delivers Lakasir fully installed and configured on Ubuntu 24.04 as a Laravel 11 and FilamentPHP 3 application on PHP 8.4 with OPcache, served by nginx over HTTPS with php-fpm, backed by MariaDB. The database schema, the roles and permissions, and the compiled front end assets are already in place, so you land directly on the sign in page with no setup wizard to complete. Backed by 24/7 cloudimg support.

What is included:

  • Lakasir 1.1.11 (GPL-3.0 licensed), a Laravel 11 and FilamentPHP 3 point of sale, served from /var/www/lakasir/public
  • nginx (TLS on :443, with :80 redirected to HTTPS) plus PHP 8.4 (php8.4-fpm with OPcache) and MariaDB
  • A per VM self signed TLS certificate generated on first boot, so the POS loads over a secure context
  • The POS panel at /member, with the full permission catalogue generated and the Cash payment method ready to take a sale
  • Per VM administrator email and password, MariaDB password and Laravel APP_KEY, all generated at first boot and written to a root only file
  • No demo inventory and no default account: the upstream superadmin@admin.com seed account is never created by this image
  • nginx.service, php8.4-fpm.service and mariadb.service as systemd units, enabled and active
  • 24/7 cloudimg support

The Lakasir sign in page served over HTTPS

Prerequisites

An active Azure subscription, an SSH key pair, and a VNet plus subnet in the target region. Standard_B2s (2 vCPU / 4 GiB RAM) is a good starting point for a single till; scale up for more concurrent cashiers or a larger catalogue. NSG inbound: allow 22/tcp from your management network, and 443/tcp (HTTPS) plus 80/tcp (which redirects to HTTPS) from your shop network.

Step 1 — Deploy from the Azure Marketplace

Find Lakasir POS on Ubuntu 24.04 LTS by cloudimg in the Azure Marketplace and choose Get It Now, then Create. Pick your resource group, region, and VM size (Standard_B2s or larger), provide your SSH public key, and allow inbound 443/tcp and 80/tcp in the networking step. Review and create.

Step 2 — Or deploy with the Azure CLI

az vm create \
  --resource-group <your-rg> \
  --name lakasir \
  --image <marketplace-image-urn> \
  --size Standard_B2s \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard

az vm open-port --resource-group <your-rg> --name lakasir --port 443 --priority 1010

Step 3 — Connect to your VM

ssh azureuser@<vm-public-ip>

Step 4 — Confirm the services are running

The three services that back Lakasir should all report active, the sign in page answers HTTP 200 over HTTPS, and the plain HTTP port redirects to HTTPS:

systemctl is-active nginx php8.4-fpm mariadb
curl -ks -o /dev/null -w 'member login  -> %{http_code}\n' https://127.0.0.1/member/login
curl -s  -o /dev/null -w 'http redirect -> %{http_code}\n' http://127.0.0.1/

Expected: three lines of active, then member login -> 200 and http redirect -> 301.

Service status, the HTTPS POS panel and the listening ports

Step 5 — Retrieve your administrator credentials

On the first boot of every VM, a one shot service (lakasir-firstboot.service) generates credentials that are unique to that VM: a fresh Laravel application key, a fresh MariaDB password, and a fresh administrator email and password. It also generates a per VM self signed TLS certificate and sets the VM's own address as the application URL.

No shared or default credentials ship in the image. Lakasir's upstream database seeder creates a well known superadmin@admin.com account with the password password; this image deliberately never runs that seeder, so the account does not exist at all, in any window.

sudo cat /root/lakasir-credentials.txt

The file (mode 0600, root only) contains the administrator email (lakasir.admin.user), the administrator password (lakasir.admin.pass), the panel URL, and the database credentials. Lakasir signs in by email at /member/login.

You can confirm the file's permissions, see which keys it holds, and prove that no upstream default account ships, without printing any secret:

sudo stat -c '%a %U:%G %n' /root/lakasir-credentials.txt
sudo grep -o '^lakasir\.[a-z.]*=' /root/lakasir-credentials.txt
sudo mariadb -N -B lakasir -e "SELECT COUNT(*) FROM users WHERE email IN ('superadmin@admin.com','admin@example.com');"

Expected: 600 root:root, the seven credential keys, and a final 0 confirming no upstream default account exists.

Per VM credentials file and the no default account proof

You can prove the credential round trip from the VM's own shell. This reads the per VM administrator credentials and confirms the rotated password verifies against the stored bcrypt hash on the users row, which is exactly what Lakasir's authentication guard checks:

ADMIN_USER=$(sudo grep '^lakasir.admin.user=' /root/lakasir-credentials.txt | cut -d= -f2-)
ADMIN_PASS=$(sudo grep '^lakasir.admin.pass=' /root/lakasir-credentials.txt | cut -d= -f2-)
HASH=$(sudo mariadb -N -B lakasir -e "SELECT password FROM users WHERE email='$ADMIN_USER';")
HH="$HASH" PP="$ADMIN_PASS" php -r 'echo password_verify(getenv("PP"),getenv("HH")) ? "admin password verifies -> OK\n" : "verify failed\n";'

Expected: admin password verifies -> OK.

Step 6 — Sign in to the POS

Browse to https://<vm-public-ip>/member and sign in with the administrator email and password from the credentials file. Because the image ships a per VM self signed certificate, your browser shows a one time certificate warning on first visit. Click through it, or install your own domain certificate into /etc/nginx/ssl/.

The Lakasir sign in page

After signing in you land on the dashboard, which shows today's revenue, sales and discount totals alongside expiring stock and the best selling products. A brand new instance shows zeros, because the image ships with no demo inventory or sales history.

The Lakasir dashboard after signing in

Step 7 — Add a category and your first product

Lakasir requires every product to belong to a category, so create the category first. In the left hand navigation choose Category, then New Category, give it a name such as Beverages, and save.

Now choose Product, then New Product. Fill in the name, the category you just created, the stock quantity, the unit (for example pcs), the initial and selling prices, and the product Type. The SKU can be left blank and Lakasir will generate one. Save, and the product appears in the catalogue.

The Products list showing a newly created product

Step 8 — Take your first sale

Choose POS in the navigation to open the cashier screen. Your products appear as tiles, filterable by category and searchable by name or SKU, and the orange button on the right of the screen opens the barcode scanner for a USB or camera scanner.

Tap the + on a product tile, set the quantity, and choose Add to Cart. The tile is marked as Added, and the cart bar along the bottom of the screen shows the running item count and total.

The POS cashier screen with an item added to the cart and a running total

Tap the cart bar to review the sale. The cart shows each line with quantity controls, then the subtotal, any discount, the member (if you attach one), the tax, and the payable total. Continue Payment takes you to the payment step, where you choose one of the payment methods, for example the Cash method the image ships with, and complete the sale.

The cart showing subtotal, tax and the payable total, ready for payment

Completed sales appear under Selling History, and feed the dashboard and the reports under Report.

Step 9 — Confirm the version and the stack

sudo -u www-data php /var/www/lakasir/artisan --version
cat /var/www/lakasir/version.txt
php -v | head -1
mariadb --version

Expected: Laravel Framework 11.51.0, the Lakasir release 1.1.11, PHP 8.4, and the MariaDB version. You can also confirm that the permission catalogue was generated and that a payment method is ready to take a sale:

sudo mariadb -N -B lakasir -e "SELECT CONCAT('roles=',(SELECT COUNT(*) FROM roles),'  permissions=',(SELECT COUNT(*) FROM permissions),'  payment_methods=',(SELECT COUNT(*) FROM payment_methods));"

Expected: a line reporting the role, permission and payment method counts, for example roles=1 permissions=155 payment_methods=1.

Lakasir, Laravel, PHP, MariaDB and nginx versions

First boot service and security model

A one shot lakasir-firstboot.service runs After=mariadb.service and Before=nginx.service, so the per VM credentials and TLS certificate are in place before the first page is ever served. It writes the credentials file at mode 0600 (root only) and drops a sentinel so it runs exactly once.

systemctl status lakasir-firstboot.service --no-pager | head -5
sudo openssl x509 -noout -subject -dates -in /etc/nginx/ssl/lakasir.crt
systemctl is-enabled nginx php8.4-fpm mariadb lakasir-firstboot

Expected: the unit reports active (exited) with status=0/SUCCESS, the certificate subject is your VM's own address, and all four units report enabled.

First boot service, the per VM certificate and the enabled units

Server components

Component Version Purpose
Lakasir 1.1.11 Point of sale application (Laravel 11 + FilamentPHP 3)
PHP 8.4 Application runtime, php8.4-fpm with OPcache
nginx 1.24 HTTPS front end on :443, :80 redirects to HTTPS
MariaDB 10.11 Application database

Filesystem layout

Path Purpose
/var/www/lakasir Application tree (code, .env, storage, docroot at public/)
/var/www/lakasir/public nginx document root
/var/lib/mysql MariaDB data directory
/etc/nginx/ssl Per VM self signed TLS certificate and key
/root/lakasir-credentials.txt Per VM credentials, mode 0600 root only
/usr/local/sbin/lakasir-firstboot.sh First boot credential and certificate rotation
/var/lib/cloudimg First boot sentinel directory

Administration from the CLI

Admin tasks use Laravel's artisan as the www-data user, for example to list the available commands:

sudo -u www-data php /var/www/lakasir/artisan list | head -20

Common operations include php artisan cache:clear, php artisan optimize (cache config and routes for production), php artisan optimize:clear to clear those caches, and php artisan app:create-user to add another standalone user account.

Enabling HTTPS with your own domain

The image already serves HTTPS with a per VM self signed certificate. For production, point a real domain at the VM's public IP, open 443/tcp in the NSG, then replace the self signed certificate with a trusted one using Let's Encrypt (replace the domain):

sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.com

After the certificate is issued, set the new address as the application URL in /var/www/lakasir/.env (APP_URL=https://your-domain.com), then run sudo -u www-data php /var/www/lakasir/artisan optimize:clear. The image's trusted host list already accepts your VM's own addresses and its Azure assigned cloudapp.azure.com name, and picks up your own domain from APP_URL.

Backup and maintenance

The database lives at /var/lib/mysql and the application tree, including code, docroot and uploaded product images, at /var/www/lakasir. Snapshot the OS disk in Azure for a point in time backup, or dump the database with (the database password is in the credentials file):

sudo mariadb-dump lakasir > lakasir-backup.sql

Keep the OS patched with sudo apt update && sudo apt upgrade (unattended security upgrades are enabled by default). The stack restarts cleanly with sudo systemctl restart nginx php8.4-fpm mariadb.

Troubleshooting

Symptom Diagnosis Fix
Browser shows a certificate warning The image ships a per VM self signed certificate Click through it, or install a domain certificate as described above
member login -> 400 from a new hostname The host is not in Laravel's trusted host list Set APP_URL in /var/www/lakasir/.env to the address you are using, then run sudo -u www-data php /var/www/lakasir/artisan optimize:clear
Sign in is rejected The credentials file was read before first boot completed Check systemctl status lakasir-firstboot.service, then re read /root/lakasir-credentials.txt
POS shows no products A brand new instance ships with no inventory Create a category, then a product, as described in Step 7
A page returns HTTP 500 Application error Check sudo tail -50 /var/www/lakasir/storage/logs/laravel.log and sudo journalctl -u php8.4-fpm -n 50

Security recommendations

  • Restrict 22/tcp in the NSG to your management network, and expose 443/tcp only to the networks that need the till.
  • Replace the per VM self signed certificate with a certificate for your own domain before taking real payments.
  • Rotate the administrator password from User in the panel once you have signed in, and create a separate non owner account for each cashier under User and Role.
  • Keep the OS patched; unattended security upgrades are enabled by default.
  • Back up /var/lib/mysql and /var/www/lakasir regularly, and keep the credentials file safe.

Support

This image is backed by 24/7 cloudimg support. Contact us by email and chat for help with Lakasir deployment, upgrades, product and inventory setup, payment methods, barcode scanning and thermal printer configuration, roles and permissions, reporting, API integration, performance tuning and database administration.

All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.