Self-Hosted Data Server
Quick Summary: Host participant data on your own infrastructure for GDPR compliance and data sovereignty while using PEBL Hub's study management platform.
Overview
The Self-Hosted Data Server allows you to collect participant data on your own server while still using PEBL Hub's platform for study configuration, test delivery, and participant management.
Key Benefit: Data never leaves your infrastructure - perfect for EU institutions, hospitals, and organizations with strict data governance requirements.
Architecture: Simple file-based storage (no database required) - files are organized in directories by study and participant.
---
Who Needs This?
✅ You Should Use Self-Hosted Data Server If:
- EU-based researchers needing GDPR compliance
- Healthcare institutions with patient data restrictions
- Organizations requiring data to stay within specific geographic regions
- Institutions with strict data sovereignty policies
- Research teams that cannot use US-hosted cloud services
⚠️ You May NOT Need This If:
- You're comfortable with standard cloud data storage
- You don't have geographic data restrictions
- You want the simplest setup possible
- You're using PEBL Hub's default data storage
---
Account Requirements
Tier Required: Research+ with Hosted Server
The self-hosted data server feature is available only to users with the Research+ with Hosted Server tier, which includes:
- ✅ All Research+ benefits (unlimited studies, participants, tests)
- ✅ Self-hosted data server capability
- ✅ Priority support for server setup
Not on this tier? Upgrade to Research+ with Hosted Server
---
How It Works
Traditional Setup (Default)
Participant → PEBL Hub Platform → PEBL Hub Database
↓
Your Data Export
Self-Hosted Setup
Participant → PEBL Hub Platform → YOUR Server
(study interface) (file storage)
↓
uploads/
├── studyabc/
│ ├── P001/
│ │ └── data.csv
│ └── P002/
└── studydef/
Important: PEBL Hub never sees or stores your participant data. It goes directly from the participant's browser to your server via a secure CORS-enabled connection.
Data Storage: All data is stored as files in an organized directory structure - no database required!
---
Getting Started
Step 1: Download the Server Package
- Log in to PEBL Hub
- Visit the Downloads page
- Download the latest PEBL Hosted Data Server package
- File:
pebl-hosted-data-server-v{VERSION}.zip - Size: ~40 KB
Note: The downloads page shows available versions - choose the most recent.
Step 2: Server Requirements
Your server must have:
Required:
- ✅ PHP 5.5 or higher (PHP 7.4+ recommended for security)
- ✅ HTTPS (SSL certificate) - strongly recommended
- ✅ Web server (Apache with .htaccess, or Nginx)
- ✅ Writable directory permissions
Recommended:
- 📊 1 GB+ disk space (depending on study size)
- 🌐 Stable internet connection
- 🔒 Firewall configured to allow HTTP/HTTPS
NOT Required:
- ❌ Database (MySQL, PostgreSQL, SQLite, etc.)
- ❌ Special PHP extensions (beyond standard installation)
Step 3: Upload and Install
Option A: cPanel (Easiest)
- Upload ZIP file:
- Go to cPanel → File Manager
- Navigate to
public_htmlor desired directory - Upload
pebl-hosted-data-server-v*.zip - Extract the ZIP file
- Run installer:
- Visit:
https://yourserver.com/pebl-data/install.php - Follow the 4-step installation wizard
- Delete installer:
- After setup completes, delete
install.phpfor security
Option B: FTP/SFTP
- Upload files - Extract locally then upload via SFTP:
# Extract locally unzip pebl-hosted-data-server-v.zip
# Upload via SFTP sftp user@yourserver.com put -r pebl-data-server /var/www/html/pebl-data
- Set permissions:
chmod 755 /var/www/html/pebl-data chmod 775 /var/www/html/pebl-data/uploads chmod 775 /var/www/html/pebl-data/data
- Run installer:
- Visit:
https://yourserver.com/pebl-data/install.php
Option C: SSH/Command Line
- Upload and extract:
cd /var/www/html wget https://yourserver.com/path/to/pebl-hosted-data-server-v.zip unzip pebl-hosted-data-server-v.zip mv pebl-data-server pebl-data cd pebl-data
- Set permissions:
chmod 755 . chmod 775 uploads data
- Run installer:
- Visit:
https://yourserver.com/pebl-data/install.php
Step 4: Installation Wizard
The installer has 4 steps:
Step 1: Requirements Check
- ✅ PHP version (5.5+)
- ✅ Directory permissions
- ✅ Write access
- ⚠️ HTTPS recommendation
Step 2: Configuration
- Admin Username: Username for admin panel access
- Admin Password: Choose a strong password (12+ characters)
- Main Server URL:
https://peblhub.online(for CORS) - Upload Limits: Max file size (default 10MB)
Step 3: Installation
- Creates
config.phpwith your settings - Creates
uploads/directory for data storage - Creates
data/directory for token management - Sets up admin authentication
Step 4: Complete
- ✅ Server URL:
https://yourserver.com/pebl-data - ✅ Admin Panel:
https://yourserver.com/pebl-data/admin/ - ⚠️ DELETE install.php for security
Save these URLs! You'll need them to configure studies.
---
Configuring Studies
Step 1: Register Your Server (Optional)
- Go to PEBL Hub → Hosted Servers
- Click Add Server
- Enter:
- Server Name: e.g., "EU Hospital Server"
- Server URL:
https://yourserver.com/pebl-data
- Click Save
Step 2: Enable Hosted Storage for a Study
- Go to Studies → Select your study → Settings
- Find Data Storage section
- Check ☑ Use Self-Hosted Data Server
- Enter:
- Server URL:
https://yourserver.com/pebl-data - Study Token: Generate a unique token for this study
- Click Save Study Settings
Step 3: Approve the Study Token
- Log into your hosted server admin panel:
https://yourserver.com/pebl-data/admin/ - Navigate to Tokens section
- Add your study token to the approved list
- Save changes
Important: Only studies with approved tokens can upload data to your server.
Step 4: Test the Setup
- Open your study URL
- Complete a test run
- Check your hosted server admin panel
- Verify data appears in the uploads section
---
Accessing Your Data
Admin Panel
URL: https://yourserver.com/pebl-data/admin/
Features:
- 📊 View uploaded files by study and participant
- 🔑 Manage approved study tokens
- 📁 Browse directory structure
- 📈 View upload statistics
Direct File Access
Via FTP/SFTP
Connect to your server and navigate to:
/var/www/html/pebl-data/uploads/
Directory structure:
uploads/
├── studyabc123/
│ ├── P001/
│ │ ├── test1data.csv
│ │ └── test2data.json
│ └── P002/
│ └── test1data.csv
└── studydef456/
└── P001/
└── questionnaire.csv
Via cPanel File Manager
Navigate to: public_html/pebl-data/uploads/
You can:
- Browse files
- Download individual files
- Compress and download entire directories
- View file contents
Via SSH
cd /var/www/html/pebl-data/uploads/ ls -R # List all files recursively
# Find all CSV files find . -name ".csv"
# View a specific file cat studyabc123/P001/data.csv
Downloading All Data
Create Backup Archive
cd /var/www/html/pebl-data tar -czf data-backup-$(date +%Y%m%d).tar.gz uploads/
This creates a compressed archive of all your data files.
Via cPanel
- Navigate to
uploads/directory - Right-click → Compress
- Choose tar.gz format
- Download the archive
---
Security Best Practices
1. Use HTTPS
Critical: Always use HTTPS for your hosted server.
- ✅ Prevents data interception
- ✅ Required for CORS to work properly
- ✅ Meets GDPR encryption requirements
Get free SSL: Use Let's Encrypt or your hosting provider's SSL
2. Strong Admin Password
- Use 16+ characters
- Include uppercase, lowercase, numbers, symbols
- Don't reuse passwords from other services
- Store in a password manager
Generate secure password:
php generatepassword.php YourNewPassword123!
3. Token-Based Study Authentication
Each study should have a unique token:
- Generate random tokens (20+ characters)
- Only approve tokens for legitimate studies
- Revoke tokens when studies complete
- Monitor token usage via admin panel
4. Regular Backups
Backup the uploads directory regularly:
# Manual backup tar -czf backups/pebl-data-$(date +%Y%m%d).tar.gz uploads/
# Automated backup (cron) 0 2 tar -czf /backups/pebl-data-$(date +\%Y\%m\%d).tar.gz /var/www/html/pebl-data/uploads/
5. File Permissions
Recommended permissions:
chmod 755 /var/www/html/pebl-data # Directory readable chmod 775 /var/www/html/pebl-data/uploads # Uploads writable chmod 775 /var/www/html/pebl-data/data # Data writable chmod 644 /var/www/html/pebl-data/.php # PHP files readable chmod 600 /var/www/html/pebl-data/config.php # Config private
6. Monitor Server Health
The package includes a health check endpoint:
curl https://yourserver.com/pebl-data/health.php
Expected response:
{ "status": "ok", "version": "1.0", "phpversion": "7.4.33", "uploaddirwritable": true }
7. Delete install.php
After installation, delete install.php:
rm /var/www/html/pebl-data/install.php
Or via cPanel: Navigate to the file and delete it.
---
Troubleshooting
Problem: "CORS Error" in Browser Console
Symptoms: Data not uploading, browser shows CORS-related errors
Solutions:
- Check HTTPS: Both PEBL Hub and your server must use HTTPS
- Verify Main Server URL in
config.phpmatches exactly:
define('MAINSERVERURL', 'https://peblhub.online');
- Check CORS headers in
upload.php- should include proper Access-Control-Allow-Origin headers
Problem: "Study token not approved"
Symptoms: 403 error when trying to upload data
Solutions:
- Log into admin panel:
https://yourserver.com/pebl-data/admin/ - Navigate to Tokens section
- Add your study token to the approved list
- Verify token matches exactly in study settings
Problem: "Failed to create upload directories"
Symptoms: 500 error during upload, directory creation fails
Solutions:
- Check permissions:
chmod 775 uploads/ chown www-data:www-data uploads/
- Verify uploads directory exists:
ls -la uploads/
- Check disk space:
df -h
- Check parent directory permissions - ensure web server can create subdirectories
Problem: "Cannot Access Admin Panel"
Symptoms: 404 or 403 error when accessing admin panel
Solutions:
- Check URL: Must end with
/admin/(trailing slash) - Verify files exist:
admin/index.phpshould be present - Check .htaccess: Ensure modrewrite is enabled (Apache)
- Try direct access:
admin/index.phpexplicitly
Problem: "Authentication Failed"
Symptoms: Cannot log in to admin panel
Solutions:
- Reset password via SSH:
cd /var/www/html/pebl-data php generatepassword.php newpassword # Copy the hash
- Update config.php:
define('ADMINPASSWORDHASH', 'paste-hash-here');
- Verify username matches what you're entering
Problem: "Data Not Appearing in Admin Panel"
Symptoms: Study runs but no data shows up
Solutions:
- Check study configuration: Verify server URL in study settings
- Test connection: Use "Test Connection" button in study settings
- Verify token approved: Check admin panel → Tokens
- Check uploads directory: Via FTP/SSH, verify files are being created
- Review PHP error logs: Check for upload failures
Problem: "File Upload Size Exceeded"
Symptoms: Large files fail to upload
Solutions:
- Edit config.php:
define('MAXFILESIZE', 52428800); // 50MB
- Check PHP limits in php.ini:
uploadmaxfilesize = 50M postmaxsize = 50M
- Restart web server after changes
Problem: "Permission Denied" Errors
Symptoms: Cannot write files, permission errors in logs
Solutions:
- Check ownership:
chown -R www-data:www-data /var/www/html/pebl-data/uploads
- Check SELinux (if on CentOS/RHEL):
chcon -R -t httpdsysrwcontentt uploads/
---
Frequently Asked Questions
Can I use this with existing studies?
Yes! Enable hosted server in study settings at any time. Future uploads will go to your server. Existing data remains on PEBL Hub unless you manually migrate it.
What happens if my server goes down?
Participants will see an error message during data upload. Consider setting up monitoring and redundancy for production use.
Can I use multiple hosted servers?
Currently, you can configure one server URL per study. Contact support for multi-server setups.
Is the hosted server package open source?
The package is proprietary but designed for transparency. The PHP code is readable and can be audited for security compliance.
Can I customize the file storage structure?
Yes! Edit upload.php to modify the directory structure. Default is uploads/study_token/participant_id/filename.
How much data can the server handle?
File-based storage capacity:
- Typical usage: 100-10,000 files work perfectly
- Heavy usage: 10,000-100,000 files - ensure adequate disk space
- Very heavy: Consider organizing data or archiving old studies
Monitor disk usage regularly:
df -h /var/www/html/pebl-data/uploads
Does this work with custom tests?
Yes! Hosted servers work with both standard battery tests and custom uploaded tests. Any PEBL experiment can upload to your hosted server.
Can collaborators access the hosted server?
No. Only you (the server owner) have admin panel access. Collaborators can still manage studies on PEBL Hub, but data access is controlled by your server.
What file formats are supported?
Default allowed extensions: txt, csv, tsv, dat, log, json
Modify in config.php:
define('ALLOWEDEXTENSIONS', ['txt', 'csv', 'tsv', 'dat', 'log', 'json', 'xml']);
---
Advanced Configuration
Custom Upload Directory
Edit config.php:
define('UPLOADDIR', DIR . '/my-custom-data-dir/');
Study Token Validation
For additional security, require token validation:
- In config.php:
define('REQUIRESTUDYTOKEN', true);
- In PEBL Hub study settings:
- Set unique Study Token for each study
- In admin panel:
- Approve tokens for legitimate studies only
Logging Configuration
Enable detailed logging in config.php:
define('DEBUGMODE', true);
View PHP error logs (location varies by server):
# Common locations /var/log/apache2/error.log /var/log/nginx/error.log tail -f /var/log/apache2/error.log
IP Restrictions
Add IP restrictions to .htaccess:
Nginx Configuration
If using Nginx instead of Apache, add to server block:
location ~ /(config\.php|.*\.md|data/)$ { deny all; }
location /pebl-data/uploads/ { location ~ \.php$ { deny all; } }
---
Compliance Documentation
GDPR Compliance
Using a self-hosted data server helps achieve GDPR compliance:
✅ Data Minimization: Only collect necessary data ✅ Storage Limitation: You control retention periods ✅ Confidentiality: Data stays on your infrastructure ✅ Integrity: HTTPS encryption prevents tampering ✅ Availability: You control backups and redundancy
Documentation for audits:
- Server location: Document physical server location
- Encryption: HTTPS in transit, encrypted backups at rest
- Access control: Admin password authentication + token validation
- Data retention: Configure automatic deletion/archiving as needed
Data Processing Agreement
If required, contact PEBL Hub support for a Data Processing Agreement (DPA) template covering:
- Roles and responsibilities
- Data controller vs. processor definitions
- Security obligations
- Breach notification procedures
---
Support and Resources
Documentation
- Managing Data - General data management guide
- Study Snapshots - Version control for studies
- Security & Privacy - Platform security details
Getting Help
For installation issues:
- Check this troubleshooting guide first
- Review server requirements section
- Check PHP error logs for specific errors
For technical support:
- Email: support@peblhub.online
- Include: Server URL, PHP version, error messages
- Attach: Relevant log files (sanitized of sensitive data)
For billing/tier questions:
- Contact: billing@peblhub.online
- Mention: Hosted server tier inquiry
---
Technical Specifications
Package Contents:
upload.php- Data collection endpointhealth.php- Health check endpointinstall.php- Installation wizard (delete after setup)config.php- Generated configuration (created by installer)admin/- Admin panel fileslib/- Utility librariesdata/- Token management (approvedtokens.csv)uploads/- Data storage directory
File Storage Structure:
uploads/
├── {studytoken}/
│ ├── {participantid}/
│ │ ├── {test1}data.csv
│ │ └── {test2}data.json
│ └── {participantid}/
└── {studytoken}/
API Endpoints:
POST /upload.php- Data collectionGET /health.php- Server statusGET /admin/- Admin dashboardGET /admin/manage_tokens.php- Token management
---
Next Steps
- Download the package from PEBL Hub downloads
- Review server requirements and prepare your hosting
- Follow installation wizard step-by-step
- Configure a test study to verify setup
- Run a test session and check that files appear
- Set up regular backups of your uploads directory
- Document your setup for compliance records
- Delete install.php for security
Questions? Contact support@peblhub.online
---
Last Updated: February 7, 2026 Document Version: 2.0 Tier Requirement: Research+ with Hosted Server Download: Available on the Downloads page