Open Source POS (OSPOS) is a web-based applicaton that runs on top of the LAMP stack. That means you have to install the LAMP stack as well as OSPOS.

LAMP stands for Linux, Apache, MySQL, and PHP. Linux is the operating system; Apache is the web server; MySQL is the relational database management system (RDBMS); and PHP Is the programming language. Note: you don't have to know how all these systems work to run OSPOS. You just need them installed to run OSPOS.

You can run LAMP locally. Install Linux first, and then install Apache, MySQL, and PHP. You also install Apache, MySQL, and PHP on Windows and Mac, though OSPOS is meant to be run on Linux.

The easiest way to run a LAMP stack is to sign up for an account with DigitalOcean. This will give you access to a LAMP virtual private server (VPS) that you can install OSPOS on. If you sign up through our link, you'll get a $10 credit. We're going to assume for the rest of this tutorial that you've signed up for an account with DigitalOcean.

Create a Server

Once you're logged into DigitalOcean, click the Create Droplet button in the top right hand corner.

Create Droplet button

Then click the One click apps link.

One click apps link

Finally, click the LAMP on 14.04 app.

LAMP on Ubuntu 14.04

Scroll down, and choose a size. We recommend at least 1 GB, but 512 MB may work if your store is small enough.

Size - 1 GB

Then scroll down to Choose a datacenter region. Select the region closest to you.

Datacenter region

Finally, you can choose a hostname.


Now click the Create button to create your droplet.

Create button

When your droplet has been created, you'll receive an email from DigitalOcean.

DigitalOcean email

Log in to Your Server

You now have the information needed to log in to your server. If you have Mac or Linux, you can use the built-in terminal program.  If you have Windows, you'll want to install an SSH client, such as Putty.

If you're using Terminal, type:

ssh root@

Note: replace with your IP address.

It'll probably tell you that the authenticity of your host can't be established. Type yes to continue connecting anyway.

You'll probably be disconnected. Try to connect again:

ssh root@

It'll now ask you for your password. Enter your password from the email.

Then you'll have to change your password. Enter your current password, and then enter your new password twice.

You're now logged in to your server as root.

Install Needed Software

This guide shows you the easiest way to get OSPOS up and running on your server. DigitalOcean has many guides about Linux administration that can help you learn more.

First we want to make sure all your software is up to date. Type:

apt-get update
apt-get dist-upgrade

Click Y when it asks if you want to continue.

Next we want to enable and/or install some modules.

First we want to enable the mod-rewrite module. Type:

a2enmod rewrite

Then we want to restart the Apache web server. Type:

service apache2 restart

Now we want to install some PHP modules. Type:

apt-get install php5-intl php5-mcrypt

Download OSPOS

You're now ready to download OSPOS. Start by changing to the var/www directory. Type:

cd /var/www

Now we want to download the latest released version of OSPOS (3.0.2). Type:


To extract it, type:

tar xf 3.0.2.tar.gz

Now we want to delete the current html directory. Type:

rm -rf html

Then we want to rename the extracted directory. Type:

mv opensourcepos-3.0.2 html

Finally, we want to change the document root. Type:

cd /etc/apache2/sites-available

We want to edit the 000-default.conf file using Nano. Type:

nano 000-default.conf

Change the DocumentRoot from /var/www/html to /var/www/html/public. Press Ctrl-x to exit. Make sure you save your changes.

Now we want to restart the Apache web server. Type:

service apache2 restart

Configure OSPOS

We need to know our MySQL root password. DigitalOcean has stored it for us in the file system. Type:

cat /root/digitalocean_password

Copy and paste what's between the quotation marks. Now we want to log in to MySQL. Type:

mysql -u root -p

Paste or enter your password when you're prompted. You'll want to enter the following SQL commands. (Note: ospos1 is your password. Feel to create a more secure password if you want.) Type:

CREATE USER 'ospos'@'localhost' IDENTIFIED BY 'ospos1';
GRANT ALL PRIVILEGES ON ospos.* TO 'ospos'@'localhost';

Now we want to import the OSPOS database.sql file. Type:

cd /var/www/html/database
mysql -u ospos -p ospos < database.sql

Enter your password when you're prompted.

Now you want to edit your configuration files. Type:

cd ../application/config
mv database.php.tmpl database.php
nano database.php

Scroll down, and update the database connection. Look for some code that says $db['default']. Add your username, password, and database. Press Ctrl-x to exit. Make sure you save your changes.

Now you want to add your encryption key. You can generate a CodeIgniter encryptioin key automatically using the Random Key Generator website. Type:

nano config.php

Find the code that says $config['encryption_key'] and add your key. Then press Ctrl-x to exit, making sure you save your changes.

Now you can visit your IP address in your browser. When you do, you'll see a login form.

Login Form

Login using these credentials:

Username: admin
Password: pointofsale