Call Us: +923135419942

Whataspp Live Chat

Software Linkers For Parents — Windows Server Setup

Use this guide to run the Local School API on the school’s Windows server and connect the mobile app. The school database stays on its SQL Server. For access outside the school network, Caddy forwards requests from a public HTTPS address to the local API.

1. Install the Windows Connector

  1. On the school’s 64-bit Windows server, extract the entire Local School API ZIP to a permanent folder such as C:\SL\LocalSchoolAPI. Keep SoftwareLinkersLocalApi.exe and the payload folder together.
  2. Open SoftwareLinkersLocalApi.exe. The ZIP includes the API and Node.js. Git is optional.
  3. Reserve the API computer’s LAN IPv4 address on the router. This guide uses 192.168.1.200 as the pilot address. Use the actual LAN IP and assigned hostname for each school.

2. Connect to SQL Server and start the API

  1. In SQL Connection, select the SQL Express instance, such as SQLEXPRESS or SQLEXPRESS2012. If SQL Server is on the same PC, leave Remote SQL IPv4 blank.
  2. Enter the school’s SQL username and password. Click Load databases and select the correct School database. If the login cannot list databases, enter the exact database name.
  3. In Server Setup, select the LAN IPv4 address of the active Ethernet or Wi-Fi adapter. Use API port 3000.
  4. Click Start API. Check that API running shows the correct school name. Use Copy address to copy the LAN address. The API continues running in the background when you close the window.
  5. On the server, run this PowerShell command. The expected response is {"ok":true}.
curl.exe http://192.168.1.200:3000/health

If SQL Server is on a different LAN computer

  • On the SQL Server PC, run Server Setup → Configure SQL TCP 1433 as a Windows administrator. The wizard enables TCP/IP and mixed authentication, sets a fixed TCP port of 1433, restarts the selected SQL instance, and creates a firewall rule for the local subnet. Schedule the restart during a maintenance window.
  • On the Connector PC, enter the SQL Server’s private address under Remote SQL IPv4. Select Trust the remote SQL server certificate only for a known, trusted self-signed certificate on the private network.
  • If you use SQL Password → Change SQL password, update every desktop application and Connector profile that uses that login, including the auto-start profile. Keep SQL port 1433 private.

Microsoft SQL Server fixed TCP port settings

3. Start the API automatically after a Windows restart

  1. Verify the SQL settings and LAN address, then click Stop API if you started it manually.
  2. Open Server Setup → Auto-start settings, approve the Windows administrator prompt, and enter ENABLE. Enter the SQL password if prompted.
  3. The Windows Scheduled Task starts the API before sign-in. During a maintenance window, restart Windows and check /health again.
  4. If the SQL credentials, API port, or LAN IP change, disable auto-start, update the settings, and enable it again.

4. Set up Caddy HTTPS for access outside the school

  1. Create a DNS A record for localapi.softwarelinkers.net pointing to the public IPv4 address that reaches Caddy. If Caddy is behind a router, forward TCP ports 80 and 443 to the Caddy PC and allow those ports in its firewall.
  2. Back up the active C:\Caddy\Caddyfile. Keep the existing site blocks and define each hostname only once. Add or update the pilot block below. Use the Connector’s actual LAN IP and port as the reverse proxy destination.
localapi.softwarelinkers.net {
    reverse_proxy 192.168.1.200:3000
    encode gzip
}
  1. Open PowerShell as an administrator. Run the validation command first. If it reports Valid configuration, reload the running Caddy service.
& "C:\Caddy\caddy.exe" validate --config "C:\Caddy\Caddyfile" --adapter caddyfile
& "C:\Caddy\caddy.exe" reload --config "C:\Caddy\Caddyfile" --adapter caddyfile
  1. If Caddy runs on a separate LAN computer, limit inbound access to TCP port 3000 on the Connector PC to Caddy’s private IP. Keep the API port off the internet-facing router’s port forwarding list.
  2. Turn off Wi-Fi on a phone and open https://localapi.softwarelinkers.net/health using mobile data. If it returns {"ok":true}, the public HTTPS endpoint is reachable.

Caddy Automatic HTTPS · Running Caddy as a Windows service

5. Connect and test the mobile app

  1. Open Software Linkers For Parents, choose Use API address, enter https://localapi.softwarelinkers.net, and tap Connect. Enter only the base URL in the app. Use /health for browser checks.
  2. Use School Code if the app build has a school-code domain configured and the school’s code resolves to its HTTPS hostname. The direct HTTPS address also works.
  3. Sign in with a staff test account that has attendance access. Scan a student ID barcode and confirm the attendance was recorded. Use a parent test account to check the correct student’s attendance.
  4. If the school uses Send to Parent App, send a test receipt and open the PDF in the parent app. The latest local ZIP includes the Crystal assemblies and receipt templates in payload\api\crystal. Install the 32-bit SAP Crystal Reports runtime on the API PC and give the Windows account running the API write access to C:\SL\PDF. SAP Crystal Reports runtime reference

Troubleshooting

SymptomWhat to check
Load databases failsCheck the SQL instance, SQL service status, credentials, and login permissions.
Browser shows Route not foundAdd /health to the URL in the browser. Use the base URL in the app.
dnsNotFoundRun Resolve-DnsName localapi.softwarelinkers.net. Confirm that the DNS record points to Caddy’s public IPv4 address.
Caddy Error 1067 or ambiguous site definitionRun the Caddy validation command. If it reports a duplicate hostname, merge the duplicate site blocks and validate again.
502 Bad GatewayFrom the Caddy PC, run curl.exe http://192.168.1.200:3000/health. Check the Connector status, reverse proxy destination, and LAN firewall.
Mobile data works, but school Wi-Fi failsCheck whether the router supports NAT loopback. If needed, configure school DNS to resolve the same HTTPS hostname to Caddy’s LAN address.
Crystal receipt files are missingExtract the entire latest ZIP and confirm that payload\api\crystal is present. Check the 32-bit runtime and PDF folder permissions as well.