Back to POSR
Ahmed Ali

Installation

Install POSR on your own infrastructure using Docker Compose.

Docker setup

Clone the POSR repository and start the stack:

git clone https://github.com/ahmedali5530/react-posr
cd react-posr
bun install
docker compose up -d

Docker Compose starts the database, backend, and web application. Wait for all services to become healthy before opening the POS in your browser.

Environment

Open the environment file and adjust settings for your deployment (host URLs, database credentials, and optional payment gateway keys):

adjust or copy .env to .env.local
# Edit .env or .env.local with your values

After changing environment variables, restart the stack with docker compose up -d.

Database import

After Docker Compose is running, import the POSR schema and optional demo data into SurrealDB using Surrealist.

Video walkthrough: connecting to SurrealDB and importing the POSR schema.

1. Create a connection

  1. Open app.surrealdb.com and click Create connection.
  2. Enter any name for the connection (for example, POSR Local).
  3. Under remote address, choose ws from the dropdown and enter localhost:8000 in the next input.
  4. Select Root authentication and use root for both username and password.
  5. A green dot appears in the host field when the connection succeeds. Click Create connection.

2. Select namespace and database

  1. Once connected, the connection appears at the top of Surrealist. Hover over the main dropdown.
  2. Enter posr for both namespace and database.

3. Import schema and data

  1. Go to the Explore page and click Import database.
  2. Download and import latest.surql — this creates the full POSR schema (tables, indexes, and permissions).
  3. For demo users and sample data, import a second file: demo-data.surql.

That completes the database import. You can now sign in to the web POS using the demo pins from the imported data.

First login

Open the web POS in your browser. On first launch, sign in with your staff PIN or admin credentials configured during setup.

On the hosted demo, use pins 1234, 0000, or 5555. Go to settings and press the reload cache button to fetch fresh data from the server.

Next: Creating first sale