# Open Source Point of Sale: PHP POS for Self-Hosted Retail Operations

> Open Source Point of Sale (OSPOS) is a PHP web application built on CodeIgniter 4 and backed by MySQL or MariaDB, designed for retailers and restaurants that want a self-hosted point of sale without a cloud subscription. Version 3.4 is a complete rewrite of the original codebase, adding Docker support, a revised configuration model, and improved security.

**opensourcepos/opensourcepos** — Open Source Point of Sale is a web based point of sale application written in PHP using CodeIgniter framework. It uses MySQL as the data back end and has a Bootstrap 3 based user interface. If you like this project, please give it a star! Doing so helps maintain Popular OSS status for the project.

- Repository: https://github.com/opensourcepos/opensourcepos
- Website: http://www.opensourcepos.org
- Stars: 4,409 · Forks: 2,626
- Language: PHP
- License: NOASSERTION
- Published: 2026-09-23 · Updated: 2026-09-23 · Language: en
- Canonical page: https://hysenlabs.com/projects/opensourcepos-opensourcepos

## Who OSPOS Is For and the Problem It Addresses

A retailer who wants to run their own point of sale system faces a specific trade-off. Commercial SaaS products charge monthly fees and store transaction data on external servers. OSPOS is the self-hosted alternative: a PHP web application you install on a server you control, with all transaction records staying in your own MySQL or MariaDB database.

The intended user is a small shop, restaurant, or general retailer running one or a few checkout terminals. Because OSPOS runs in a browser, the checkout terminals need no specific operating system. Any device with a modern browser on the same local network can serve as a checkout point.

The system is not built for large retail chains. Its architecture is single-database, and the README does not document multi-branch stock consolidation or real-time synchronisation across separate locations. If you need those capabilities, OSPOS is the wrong choice from the start.

## The CodeIgniter 4 and MySQL Foundation

Version 3.4 was described in the README as a complete overhaul of the original software, migrating to CodeIgniter 4. That migration brought a revised request and response pipeline, a new configuration layer using .env files, and the spark CLI tool for provisioning tasks.

The data backend is MySQL or MariaDB, accessed through CodeIgniter 4's query builder. The default table prefix is ospos_, as shown in the .env.example entry database.default.DBPrefix='ospos_'. The Dockerfile shows the runtime is PHP 8.2 on Apache. The PHP extensions installed are mysqli, bcmath, intl, and gd. The gd extension handles barcode image generation and receipt printing.

The user interface uses Bootstrap 3 with Bootswatch themes, allowing operators to choose a colour scheme from the settings without modifying any code. The README states the application is also based on Bootstrap 3 using Bootswatch themes, along with improved functionality and security compared to the previous version.

## Installing OSPOS with Docker Compose

The Docker Compose path is the most reproducible way to run OSPOS. The repository's docker-compose.yml defines two services: a MySQL container and the ospos container based on the image jekkos/opensourcepos:master.

Before starting, create a .env file at the project root. The .env.example file shows the required fields:

```bash
CI_ENVIRONMENT=production
app.allowedHostnames=''
database.default.database='ospos'
database.default.username='admin'
database.default.password='pointofsale'
database.default.DBDriver='MySQLi'
```

The app.allowedHostnames field must list the hostname where you will reach the application. Leaving it empty causes startup to fail in production mode. For a local install, set it to localhost. Once the .env file is in place, bring up the stack:

```bash
docker-compose up
```

The ospos container binds to port 80. Navigate to http://localhost after the containers start. The spark env:provision command runs automatically inside the container to generate encryption and throttle keys.

If you run OSPOS behind an SSL-terminating proxy, set the environment variable FORCE_HTTPS=1 on the ospos service so that URLs generated by the application use HTTPS. The docker-compose.yml sets FORCE_HTTPS=false by default.

## Feature Scope: What the 3.4 Series Covers

The README lists the features included in the current version. Stock management covers items and kits with an extensible attribute list. The sale register logs every transaction and supports quotations and invoices in addition to standard sales. A separate expense log records costs that are not sales transactions. The cash-up function lets operators close a till at the end of a shift and record the closing balance.

Barcode generation and printing use the gd extension. Receipts, invoices, and quotations can be sent to a printer or emailed directly from the application. The customer and supplier database stores contact records and ties them to transactions. Multiuser access includes permission control, so different staff roles can be restricted to specific parts of the system.

Reporting covers sales, orders, expenses, and inventory status. The system also includes gift cards, a customer rewards scheme, restaurant table tracking, and SMS messaging support. MailChimp integration allows customer email list management. The login page supports Google reCAPTCHA to reduce brute-force attempts. Multilanguage support is community-driven through a Weblate instance at translate.opensourcepos.org.

## Known Limitations and Configuration Edge Cases

Installing OSPOS under a web server subdirectory rather than at the domain root requires a manual edit of public/.htaccess. The README FAQ states you need to uncomment the correct section and replace the path placeholder with your path. The installer does not handle this automatically.

Sessions can drop when OSPOS runs behind a reverse proxy. The fix is to whitelist the proxy IP address using the proxyIPs array in app/Config/App.php. The .env.example does not expose this setting, so it requires editing the PHP config file directly rather than the environment file.

The writable/ directory and its subdirectories must be owned by the correct web server user and set to permission 750. The README FAQ notes that if these permissions are wrong, avatar images and item pictures will fail to display or error on save. The Dockerfile sets these permissions during a source build, but if you mount the writable directory from the host, you need to set ownership on the host side.

OSPOS does not document support for MySQL replication or MariaDB Galera cluster. There is no built-in mechanism for multiple stores to share a single inventory view across locations.

## How OSPOS Compares to Odoo

Odoo is a Python-based open source ERP suite that includes a point of sale module. It is web-based like OSPOS but covers accounting, purchasing, inventory, HR, and manufacturing in a single platform. That broader scope requires a larger server footprint and significantly more initial configuration work.

OSPOS is narrowly focused on checkout and inventory functions. A single docker-compose up gives you a working POS without configuring accounting modules or a chart of accounts. That focus is its practical advantage for small retailers who need only a checkout system.

The trade-off is that OSPOS offers no built-in upgrade path to wider business functions. If your needs eventually extend beyond a point of sale into full ERP territory, you would need to migrate to a different system rather than extending OSPOS.

## Maintenance Status and Licence

The last push to the repository was on 2026-09-27. Recent numbered releases include version 3.4.1 from 2025-06-05 and 3.4.0 from 2025-03-23. The unstable build publishes a rolling release from the master branch. The package.json file records the licence as MIT.

Contributors submit changes through GitHub pull requests. Bug reports should include the full output of the System Info tab found under the configuration section of the running application. Security issues go through the SECURITY.md file rather than the public issue tracker, as the README notes.

The build pipeline checks the sanity of each commit. If the pipeline shows a failure on the master branch, the README advises checking the status page at status.opensourcepos.org before assuming the application itself is broken.

## Conclusion

Small retailers, restaurants, and shops running a single location or a small cluster of terminals will get the most from OSPOS. The Docker install reduces setup friction, and the MIT licence means no per-seat fees. Operators who need multi-branch inventory consolidation, integrated accounting, or a commercially supported product will find OSPOS falls short of those requirements. Before going live, set app.allowedHostnames in the .env file and confirm the writable/ directory is owned by the correct user with permission 750.

## FAQ

### How do I install Open Source Point of Sale?

The supported install path is Docker Compose. Create a .env file from .env.example, set app.allowedHostnames to your hostname, then run docker-compose up. The application starts on port 80.

### Does Open Source Point of Sale support restaurant table management?

Yes. The README lists restaurant tables as one of the included features in the current 3.4 release.

### What licence does Open Source Point of Sale use?

The package.json file records the licence as MIT. The source code is available on GitHub under that licence.

## Sources

- [Issues](https://github.com/opensourcepos/opensourcepos/issues)
- [opensourcepos/opensourcepos on GitHub](https://github.com/opensourcepos/opensourcepos)
- [Project website](http://www.opensourcepos.org)
- [README](https://github.com/opensourcepos/opensourcepos/blob/master/README.md)
- [Releases](https://github.com/opensourcepos/opensourcepos/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/opensourcepos-opensourcepos
