Contents
- Overview & platform options
- Technical requirements
- Data protection & GDPR
- Synology NAS — step by step
- Shared web hosting
- Windows (XAMPP)
- Apple Mac (MAMP)
- Raspberry Pi
- Running the installer
- Database setup
- File permissions
- Troubleshooting
What to ask for: "I need PHP, MySQL and a web server installed on this Mac / PC / NAS / Raspberry Pi and a local folder set up as a website."
1. Overview & Platform Options
CrystalSolutions runs on any server that supports PHP 8.0+ and MySQL/MariaDB. You don't need a dedicated server — it runs happily on a Synology NAS, an old Mac or PC, a Raspberry Pi, or shared web hosting.
| Platform | Best for | Approximate cost |
|---|---|---|
| Synology NAS | Practices already using a NAS — always on, silent, low power | Already owned / £150–400 |
| Raspberry Pi 4 | Lowest cost dedicated server — silent, uses 3W, runs 24/7 | £55–80 new |
| Old Mac or PC | Repurpose existing hardware | £0 if already owned |
| Shared web hosting | Multi-site or internet-accessible practice | £3–10/month |
| Windows PC (XAMPP) | Testing or single-room practice | £0 (free software) |
2. Technical Requirements
| Component | Minimum | Recommended |
|---|---|---|
| PHP | PHP 8.0+ | PHP 8.2 or 8.3 |
| Database | MySQL 5.7+ or MariaDB 10.4+ | MySQL 8.0+ or MariaDB 10.6+ |
| Web server | Apache 2.4 | Apache 2.4 |
| PHP extensions | pdo_mysql, mysqli, gd | Same — mbstring and fileinfo are built in |
| Storage | 500MB for application + database | 2GB+ for attachments and images |
| SSL certificate | Required for any live internet use | Let's Encrypt (free) |
pdo, mbstring and fileinfo may not appear in the extensions list — that's fine, they are built into Synology's PHP. Enable pdo_mysql, mysqli and gd only.3. Data Protection & GDPR
CrystalSolutions handles sensitive personal health information. You have legal obligations under UK GDPR and the Data Protection Act 2018 before going live with real patients.
Testing vs live use
You may test CrystalSolutions with dummy records on any server. However, once you begin entering real patient data, the system must be on a secure, private server.
Internet vs intranet
An intranet installation runs only on your practice network — patient data never leaves your building. This is the recommended approach. An internet installation is accessible from anywhere — convenient for multi-site practices, but requires stronger security measures.
- A valid SSL certificate (https://)
- Strong unique passwords for all user accounts
- Completed a Data Protection Impact Assessment (DPIA)
- Registered with the ICO as a data controller
- A written data processing policy
What CrystalSolutions does and doesn't do
- Patient data is stored only on your own hardware — it never leaves your server
- No data is sent to CrystalSolutions, SoulTrade, or any third party
- There is no cloud backup — you are responsible for your own backups
- Access is controlled by user accounts with tiered permissions
4. Synology NAS — Step by Step
Most modern Synology NAS devices (DSM 7.x, 2018 onwards) support PHP and MariaDB through Package Center. Minimum 1GB RAM, 2GB recommended.
1 Install Web Station
Package Center → search Web Station → Install.
2 Install PHP 8.2
Package Center → search PHP 8.2 → Install. Then in Web Station → Script Language Settings → click your PHP 8.2 user defined profile (not the package based profile) → Extensions tab → enable pdo_mysql, mysqli, gd. (pdo, mbstring and fileinfo are built in — they won't appear in the list and that's fine.)
3 Install MariaDB 10
Package Center → search MariaDB 10 → Install. Set a strong root password when prompted — write it down carefully. You'll need it for phpMyAdmin.
4 Install phpMyAdmin
Package Center → search phpMyAdmin → Install. To log in: username root, password is your MariaDB root password set above.
5 Enable TCP/IP in MariaDB
In Package Center → MariaDB 10 → Settings → tick Enable TCP/IP connection and note the port (default 3306). This is required for PHP to connect to the database.
6 Create the database
Open phpMyAdmin → log in as root → click New in the left panel → name the database crystalsolutions → select collation utf8mb4_unicode_ci (scroll to the bottom of the collation dropdown — it's near the end) → click Create.
7 Create a web folder
In File Station → navigate to the web folder → create a new folder called cspractice. Full path: /volume1/web/cspractice.
8 Configure Web Station
Web Station → Web Service Portal → edit the Default Server (port 80) → set the backend to your PHP 8.2 service. If it's not already set up: Web Station → Web Service → Create → name it PHP82 → select Apache → PHP 8.2 → Save. Then assign it to the Default Server portal.
9 Upload CrystalSolutions files
Mount the NAS volume on your Mac/PC (or use File Station) and copy all CrystalSolutions files into /volume1/web/cspractice/. Make sure the attachments/ folder is included.
10 Run the installer
Open a browser on your network and go to http://[nas-ip]/cspractice/cs_install.php. Fill in the form — use 127.0.0.1 as the database host. Delete the installer file after use.
Entry-level Synology NAS (e.g. DS223): £150–250 · 4TB hard drive: £80–100 · Ongoing: £0/month.
Many practices already own a NAS for file storage — if so, the additional cost is zero. CrystalSolutions adds very little load and runs quietly alongside your existing NAS tasks.
6. Windows PC — XAMPP
- Download XAMPP from
apachefriends.org— choose PHP 8.x version - Run installer, accept defaults. Open XAMPP Control Panel → Start Apache and MySQL
- Copy all CrystalSolutions files to
C:\xampp\htdocs\cspractice\ - Open phpMyAdmin at
http://localhost/phpmyadmin→ create databasecrystalsolutionswith collationutf8mb4_unicode_ci - Visit
http://localhost/cspractice/cs_install.php— uselocalhostas database host,rootas username, leave password blank (XAMPP default) - Delete
cs_install.phpafter installation
http://192.168.1.50/cspractice). Find it in Settings → Network → WiFi → Properties.7. Apple Mac — MAMP
- Download MAMP (free version) from
mamp.info→ install and open - Click Start — Apache and MySQL indicators should turn green
- Copy all CrystalSolutions files to
/Applications/MAMP/htdocs/cspractice/ - Open phpMyAdmin at
http://localhost:8888/phpmyadmin(or via MAMP's Start Page) → create databasecrystalsolutionswith collationutf8mb4_unicode_ci - Visit
http://localhost:8888/cspractice/cs_install.php— uselocalhostas host,rootas username,rootas password (MAMP default) - Delete
cs_install.phpafter installation
Used 2018 Mac Mini: £200–280 · External backup drive: £40–60 · Software: free · Ongoing: £0/month (no hosting fees, no subscription).
An old Mac makes an excellent always-on practice server — silent, reliable, low power.
8. Raspberry Pi
A Raspberry Pi 4 (2GB RAM, ~£55) makes an ideal always-on practice server — silent, uses 3W, and fits in a pocket.
- Install Raspberry Pi OS Lite (64-bit) using Raspberry Pi Imager. Enable SSH in the imager settings.
- Connect to your Pi via SSH:
ssh pi@[pi-ip-address] - Install the required software:
sudo apt update && sudo apt upgrade -y sudo apt install -y apache2 php8.2 php8.2-mysql php8.2-gd \ php8.2-mbstring php8.2-xml mariadb-server libapache2-mod-php8.2
- Secure MariaDB:
sudo mysql_secure_installation— set a root password - Create the database:
sudo mysql -u root -p CREATE DATABASE crystalsolutions CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; EXIT;
- Copy CrystalSolutions files to
/var/www/html/cspractice/ - Set permissions:
sudo chown -R www-data:www-data /var/www/html/cspractice - Visit
http://[pi-ip]/cspractice/cs_install.php— uselocalhostas database host,rootas username - Delete
cs_install.phpafter installation
Raspberry Pi 4 (2GB): £55–80 · SD card: £10 · Case and power supply: £15–20 · Ongoing: £0/month.
The Pi runs silently 24/7 using only 3W — less than a phone charger. Pocket-sized and tucked away in a drawer.
9. Running the Installer
CrystalSolutions includes two installation options:
Option A — cs_install.php (recommended)
A single-page installer — fill in your database details, practice name and admin credentials on one form and click Install. No sessions, no multi-step — works reliably on all platforms including Synology NAS. Full installation log shown. Delete after use.
Option B — setup_wizard.php
A 7-step guided wizard. Better for less technical users once everything is set up. Walks through licence key, pre-flight checks, database, practice details, admin account and installation in sequence.
cs_install.php or setup_wizard.php on the server is a security risk.
Database host — what to enter
- Synology NAS — use
127.0.0.1(not localhost) - Shared hosting — use the full MySQL hostname from your hosting panel (e.g.
mysql-200-xxx.mysql.host.net) - XAMPP / MAMP / Raspberry Pi — use
localhost
After installation
Log in with your admin credentials. Go to Setup → Practice to configure your practice details. The system is in trial mode — limited to 10 patients. When ready, purchase a licence and activate it in Setup → Licence.
10. Database Setup
Before running the installer you need an empty MySQL/MariaDB database.
Via phpMyAdmin (easiest)
- Open phpMyAdmin and log in (root user + MariaDB root password on NAS/local; hosting credentials on shared hosting)
- Click New in the left panel
- Enter database name:
crystalsolutions - Select collation:
utf8mb4_unicode_ci— this is near the bottom of the dropdown, scroll past all the latin/ascii entries - Click Create
Creating a database user (optional — not needed for root)
For production use, create a dedicated user rather than using root:
phpMyAdmin → User accounts → Add user account → enter username and password → set Host to localhost → scroll down to Global privileges → click Check all → Go.
Via command line
mysql -u root -p CREATE DATABASE crystalsolutions CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER 'csuser'@'localhost' IDENTIFIED BY 'your-password'; GRANT ALL PRIVILEGES ON crystalsolutions.* TO 'csuser'@'localhost'; FLUSH PRIVILEGES; EXIT;
11. File Permissions
The attachments/ folder must be writable by the web server. It's included in the zip but may need its permissions set after uploading.
Synology NAS
File Station → right-click attachments folder → Properties → Permission → ensure the http user has Read/Write. Or via SSH:
chmod 755 /volume1/web/cspractice/attachments chown http:http /volume1/web/cspractice/attachments
Linux / Raspberry Pi
chmod 755 /var/www/html/cspractice/attachments chown www-data:www-data /var/www/html/cspractice/attachments
Windows (XAMPP)
No action usually needed — XAMPP runs as your Windows user which has full access.
chmod 777 for testing. Tighten to 755 once everything is working.12. Troubleshooting
500 Internal Server Error on all PHP pages
- PHP is not being served — check Web Station is using your PHP profile, not "Static website only"
- On Synology: restart Web Station after changing PHP settings
- Check the
.htaccessfile — on Synology it may cause issues; try removing it if pages won't load
Database connection refused
- On Synology: make sure TCP/IP connection is enabled in MariaDB settings
- Try
127.0.0.1instead oflocalhost - On shared hosting: use the full MySQL hostname from your hosting panel
- Check the database user has privileges on the
crystalsolutionsdatabase
Access denied for user
- Check the username and password are correct
- On shared hosting: the database user may need to be assigned to the database in your hosting control panel — look for "Add user to database"
Installation completes but tables aren't created
- Use
cs_install.phprather than the wizard — it handles SQL parsing more robustly - Check the database is empty before running the installer (drop and recreate if needed)
Can't connect from other devices on the network
- Confirm both devices are on the same WiFi network
- Use the server's local IP address (e.g.
192.168.1.x) notlocalhost - Assign a static IP to the server in your router so it doesn't change
- On Synology: check DSM Firewall allows port 80 from LAN
File uploads not working
- Check
attachments/folder exists and is writable (see File Permissions above) - Check PHP
upload_max_filesizeandpost_max_sizeinphp.ini— set to at least20M
utf8mb4_unicode_ci not found in dropdown
It's at the very bottom of the collation list in phpMyAdmin — scroll past all the latin/ascii entries. Alternatively use the SQL command: CREATE DATABASE crystalsolutions CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;