Skip to content

Deploying Open Source POS

Introduction

Open Source Point of Sale (OSPOS) is a web-based point of sale application designed for small to medium-sized retail businesses. Built with CodeIgniter and PHP, OSPOS provides a complete solution for managing sales, inventory, customers, and employees without the recurring costs of proprietary POS systems.

OSPOS has been actively developed since 2010 and is used by thousands of businesses worldwide. The application supports various hardware configurations including barcode scanners, receipt printers, and cash drawers, making it a practical choice for brick-and-mortar retail operations.

Key features of Open Source POS include:

  • Sales Processing: Quick and efficient checkout with barcode scanning support
  • Inventory Management: Track stock levels, set reorder points, and manage suppliers
  • Customer Database: Maintain customer records with purchase history and loyalty points
  • Employee Management: User accounts with role-based permissions
  • Gift Cards: Issue and redeem gift cards for customer loyalty
  • Multiple Payment Types: Cash, credit card, gift card, and split payments
  • Receipt Printing: Support for thermal receipt printers
  • Reporting: Sales reports, inventory reports, and employee performance tracking
  • Multi-Language: Available in over 50 languages
  • Tax Configuration: Flexible tax rate configurations by item or category

This guide walks through deploying Open Source POS on Klutch.sh using Docker.

Why Deploy Open Source POS on Klutch.sh

Deploying OSPOS on Klutch.sh provides businesses with accessible point of sale infrastructure:

Cloud-Based Access: Access your POS system from any device with a web browser, enabling flexibility in your retail operations.

Persistent Storage: Store transaction data, inventory records, and customer information with persistent volumes.

HTTPS by Default: Secure all transactions and customer data with automatic SSL certificates.

Reliable Uptime: Klutch.sh provides consistent availability for your business-critical POS system.

Cost Effective: Avoid expensive proprietary POS subscriptions with open-source software.

Prerequisites

Before deploying Open Source POS on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your deployment
  • A MySQL or MariaDB database instance
  • Basic familiarity with Docker and PHP applications

Deploying Open Source POS on Klutch.sh

    Set Up Your Database

    Deploy a MySQL or MariaDB database on Klutch.sh or use an external database service. Create a database for OSPOS.

    Create Your Dockerfile

    Create a Dockerfile in your repository:

    FROM php:8.1-apache
    # Install PHP extensions and dependencies
    RUN apt-get update && apt-get install -y \
    libpng-dev \
    libjpeg-dev \
    libfreetype6-dev \
    libicu-dev \
    libzip-dev \
    unzip \
    git \
    && docker-php-ext-configure gd --with-freetype --with-jpeg \
    && docker-php-ext-install gd mysqli pdo pdo_mysql intl bcmath zip
    # Enable Apache modules
    RUN a2enmod rewrite headers
    # Download OSPOS
    WORKDIR /var/www/html
    RUN git clone https://github.com/opensourcepos/opensourcepos.git .
    # Install Composer dependencies
    COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
    RUN composer install --no-dev --optimize-autoloader
    # Set permissions
    RUN chown -R www-data:www-data /var/www/html \
    && chmod -R 755 /var/www/html
    # Configure Apache
    RUN echo '<Directory /var/www/html>\n\
    AllowOverride All\n\
    </Directory>' > /etc/apache2/conf-available/ospos.conf \
    && a2enconf ospos
    EXPOSE 80
    CMD ["apache2-foreground"]

    Configure Database Connection

    Create application/config/database.php with your database settings, or use environment variables to configure the connection.

    Push to GitHub

    Commit and push your Dockerfile to your GitHub repository.

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project.

    Create and Configure the App

    Create a new app and connect it to your GitHub repository.

    Configure HTTP Traffic

    Set the traffic type to HTTP with an internal port of 80.

    Set Environment Variables

    Configure database connection:

    VariableDescription
    DB_HOSTNAMEDatabase host
    DB_USERNAMEDatabase user
    DB_PASSWORDDatabase password
    DB_DATABASEDatabase name

    Attach Persistent Volumes

    Add persistent storage:

    Mount PathRecommended SizePurpose
    /var/www/html/public/uploads5 GBUploaded images

    Deploy Your Application

    Click Deploy to build and launch your OSPOS instance.

    Complete Installation

    Access your deployment and complete the installation wizard. The default admin credentials are admin/pointofsale (change immediately after login).

Additional Resources