NovaPharma runs on one shared SQL Server database with any number of POS counters connecting over your local network. This guide covers the network layout, the SQL Server setup, and how each counter connects.
1. How NovaPharma is networked
There is one database, hosted by SQL Server on a single computer (the “server”). Every POS counter runs the NovaPharma app and connects to that one database over the LAN, so stock, sales and reports are shared live across all counters.
SERVER PC
SQL Server + NovaPharma database
LAN switch / router
POS-01
NovaPharma client
POS-02
NovaPharma client
POS-03
NovaPharma client
Standalone (1 counter)
SQL Server and NovaPharma run on the same PC. No network configuration needed — the app uses the local instance automatically.
Networked (2+ counters)
SQL Server runs on one server PC; the other counters connect to it over the LAN. This is the main scenario this guide covers.
2. Network requirements
Item
Requirement
Server IP address
Give the server PC a static (fixed) IP or a DHCP reservation — e.g. 192.168.1.10. Clients connect by this address (or the PC name), so it must not change.
Same network
All counters and the server must be on the same LAN / subnet (same router/switch).
Connection
Wired Ethernet is recommended for the server and busy counters; Wi-Fi works but is less reliable.
SQL Server port
TCP 1433 open on the server's firewall for the local subnet (the setup script does this).
Network profile
The server's network should be set to Private (not Public), so LAN sharing is allowed.
3. Set up the SERVER (SQL Server)
Do this once, on the PC that will hold the database.
Option A — Automated (recommended)
NovaPharma ships with Install-NovaPharmaSqlServer.ps1. Run it in an elevated PowerShell (Run as administrator) on the server. It installs SQL Server Express, enables TCP/IP on port 1433, turns on Mixed-Mode authentication, creates the app login, creates the NovaPharma database, and opens the firewall for the local subnet.
# On the SERVER PC, in an elevated PowerShell window:
cd "C:\Program Files\NovaByte Technology\NovaPharma\database"
.\Install-NovaPharmaSqlServer.ps1 -StoreCurrentUserConnection
It will prompt for a strong password (16+ chars) for the SQL login novapharma_app. Useful switches:
Switch
Effect
-StoreCurrentUserConnection
Also saves NOVAPHARMA_CONNECTION and NOVAPHARMA_TERMINAL (POS-01) for this user, so the server PC can double as a counter.
-TcpPort 1433
SQL Server TCP port (default 1433).
-SqlLogin novapharma_app
Name of the SQL login the clients use.
-TrustedNetworkName "Shop LAN"
Switches that network to the Private profile automatically.
Write these down — every counter needs them: the server name or IP, the port (1433), the login (novapharma_app) and its password.
Option B — Manual
If you prefer to do it by hand, or already run SQL Server:
Install SQL Server Express (Basic install), instance name SQLEXPRESS.
Open SQL Server Configuration Manager → SQL Server Network Configuration → Protocols for SQLEXPRESS → enable TCP/IP.
In TCP/IP properties → IP Addresses → IPAll: clear TCP Dynamic Ports and set TCP Port to 1433.
Set the instance to SQL Server and Windows Authentication (Mixed Mode), then restart the SQL Server service.
Create a SQL login (e.g. novapharma_app) with a strong password; in the NovaPharma database add it as a user with db_datareader + db_datawriter (the app creates the database automatically on first run).
Windows Firewall → add an inbound rule allowing TCP 1433, scoped to LocalSubnet on the Private profile.
If you use a named instance with dynamic ports instead of a fixed port, also start the SQL Server Browser service and allow UDP 1434.
Database: you do not need to create tables by hand. On first successful connection NovaPharma builds the NovaPharma database schema automatically (the setup script also seeds it from schema.sql).
4. Set up each POS counter (client)
Repeat on every counter that will connect to the server.
Install the .NET 8 Desktop Runtime (x64) — download (the installer also prompts if it's missing).
Run NovaPharma-Setup.exe and accept the licence agreement.
Point the counter at the server by setting its connection string and a unique counter ID (see below).
Launch NovaPharma, enter your licence key to activate, and sign in.
Connection settings
NovaPharma reads two environment variables. Set them per Windows user with setx (open a new Command Prompt afterwards so they take effect):
:: Replace SERVER-PC with the server's name or static IP (e.g. 192.168.1.10),:: and use the novapharma_app password from the server setup.
setx NOVAPHARMA_CONNECTION "Data Source=tcp:SERVER-PC,1433;Initial Catalog=NovaPharma;User ID=novapharma_app;Password=YOUR_PASSWORD;Encrypt=True;TrustServerCertificate=True"
:: Give THIS counter a unique ID (POS-01, POS-02, POS-03 ...). It prints on receipts and drives the Cash report.
setx NOVAPHARMA_TERMINAL "POS-02"
Tip: the counter ID (NOVAPHARMA_TERMINAL) is what the Cash report and invoice numbers use to tell counters apart — give each one a different value.
On the server PC itself, if you ran the script with -StoreCurrentUserConnection, these are already set (pointing at the local instance as POS-01). A standalone single-PC install needs no connection string at all — NovaPharma uses the local SQLEXPRESS instance by default.
5. Connection string reference
Scenario
NOVAPHARMA_CONNECTION
Networked counter → server (SQL login)
Data Source=tcp:192.168.1.10,1433;Initial Catalog=NovaPharma;User ID=novapharma_app;Password=•••;Encrypt=True;TrustServerCertificate=True
Same workgroup, Windows auth
Data Source=tcp:SERVER-PC,1433;Initial Catalog=NovaPharma;Integrated Security=SSPI;Encrypt=True;TrustServerCertificate=True
Standalone (single PC)
Not needed — defaults to localhost\SQLEXPRESS with Windows authentication.
Use the server's static IP or computer name in Data Source. If the server's IP changes, every counter must be updated — which is why a fixed IP (or a DHCP reservation) matters.
6. Networking troubleshooting
A counter can't connect to the server
Check, in order:
Can the counter ping the server? ping 192.168.1.10
Is TCP 1433 reachable? Test-NetConnection 192.168.1.10 -Port 1433 (PowerShell) should say TcpTestSucceeded: True.
On the server: TCP/IP enabled, port 1433 set, service restarted, and the firewall rule present.
Connection string uses the right IP/name, login and password.
"SQL Server not found" on a counter
That message appears only when NOVAPHARMA_CONNECTION is not set and no local SQL Server exists. Set the connection string (Section 4) and reopen a new session so it loads.
Login failed for 'novapharma_app'
The server must be in Mixed-Mode auth and the login enabled with the correct password and db_datareader/db_datawriter on the NovaPharma database. Re-run the setup script to fix it.
It worked, then stopped after a reboot
Usually the server's IP changed. Give the server a static IP / DHCP reservation, or connect by computer name instead of IP.
7. Security notes
Keep the SQL firewall rule limited to LocalSubnet / Private — never expose port 1433 to the internet.
Use a long, unique password for novapharma_app; the connection string stores it per user.
NovaPharma passwords are hashed (BCrypt) and the app is tamper-protected; the licence re-verifies online periodically.
Back up the NovaPharma database on the server regularly.
Want us to set it up for you?
We can configure the server, the network and every counter remotely. Apply and our team will handle the rollout.