Skip to main content

Overview

This guide covers installing OpenEyes for production use. For development environments, see the Quick Start Guide.
Important Safety NoticeOpenEyes is provided under AGPL v3.0 license with NO WARRANTY. Any user deploying OpenEyes in a clinical environment must:
  • Undertake a comprehensive safety assessment
  • Ensure deployment matches local clinical safety requirements
  • Comply with relevant data protection regulations (GDPR, HIPAA, etc.)
  • Implement proper backup and disaster recovery procedures
  • Obtain appropriate support contracts for clinical use

System Requirements

Server Requirements

  • Recommended: Ubuntu 20.04 LTS or 22.04 LTS
  • RHEL/CentOS 7/8 (with adjustments)
  • Debian 10/11

Software Requirements

Based on composer.json specifications:
Required PHP Extensions:
  • php-json
  • php-dom
  • php-xml / php-libxml
  • php-openssl
  • php-soap
  • php-mysql or php-mysqli
  • php-gd
  • php-curl
  • php-mbstring
Database:
  • MySQL 5.7+ or MariaDB 10.3+
  • InnoDB storage engine
  • 128MB+ innodb_log_file_size
  • 128MB+ max_allowed_packet
Web Server:
  • Apache 2.4+ with mod_rewrite
  • OR Nginx 1.18+

Installation Steps

1

Install System Dependencies

Update system and install required packages:
Verify PHP version:
2

Configure MySQL Database

Create the OpenEyes database and user:
Execute the following SQL:
Configure MySQL for OpenEyes by editing /etc/mysql/mysql.conf.d/mysqld.cnf:
Restart MySQL:
Replace STRONG_PASSWORD_HERE with a secure password. Store it securely for later configuration.
3

Clone OpenEyes Repository

Clone to the web server directory:
For a specific version:
4

Install PHP Dependencies

Install dependencies using Composer:
The --no-dev flag excludes development dependencies for production.
5

Configure Database Connection

OpenEyes reads database configuration from environment variables or /etc/openeyes/db.conf.Option 1: Environment Variables (Recommended for Docker/containerized deployments)Set in your environment or systemd service:
Option 2: Configuration File (Traditional deployment)Create /etc/openeyes/db.conf:
Secure the file:
The configuration is read from protected/config/core/common.php:
6

Run Database Migrations

Initialize the database schema:
This creates all necessary tables and applies schema migrations.For module-specific migrations:
7

Set File Permissions

Configure proper ownership and permissions:
8

Configure Apache Virtual Host

Create /etc/apache2/sites-available/openeyes.conf:
Enable the site:
9

Configure SSL/TLS

For production, HTTPS is mandatory. Use Let’s Encrypt:
Certbot will automatically:
  • Obtain SSL certificate
  • Configure Apache for HTTPS
  • Set up automatic renewal
For manual SSL configuration, create /etc/apache2/sites-available/openeyes-ssl.conf:
10

Configure Application Settings

Set production environment variables:
Key configuration options from protected/config/core/common.php:
For production, always set OE_MODE=LIVE to disable debug features and enforce security.
11

Create Initial Admin User

Access the database and create an administrative user:
The user will be prompted to change their password on first login.
12

Verify Installation

Test the installation:
  1. Access the application:
    • Navigate to https://openeyes.example.com
    • You should see the OpenEyes login page
  2. Check PHP configuration:
  3. Verify database connection:
    Should report “No new migrations found.”
  4. Review logs:

Post-Installation Configuration

Authentication Setup

Configure LDAP integration:

Cron Jobs

Set up scheduled tasks:
Add the following:

Backup Strategy

Implement regular backups:
backup.sh

Security Hardening

Configure UFW firewall:
Edit /etc/php/8.1/apache2/php.ini:
  • Use strong passwords
  • Restrict database user to localhost only
  • Enable binary logging for point-in-time recovery
  • Regular security updates
Install and configure AIDE:

Performance Optimization

PHP OpCache

Enable and configure OpCache in /etc/php/8.1/apache2/php.ini:

MySQL Tuning

Optimize MySQL configuration:

Apache MPM

Configure Apache MPM prefork:

Monitoring and Maintenance

Application Monitoring

Health Checks

Create a monitoring script:
monitor.sh

Troubleshooting

Check PHP error logs:
Common causes:
  • Database connection failure
  • File permission issues
  • Missing PHP extensions
Reset migration state:
Manually apply failed migration:
Clear session data:
Enable slow query log:
Review slow queries:

Upgrading OpenEyes

Always backup before upgrading!
1

Backup Current Installation

2

Pull Latest Code

3

Update Dependencies

4

Run Migrations

5

Clear Cache

Getting Support

GitHub Issues

Community issue tracker

Wiki Documentation

Additional installation guides

Professional Services

Accredited partners for production support

Contact

General inquiries
Production Deployment Checklist
  • SSL/TLS certificate configured
  • Firewall rules applied
  • Database backups automated
  • Cron jobs configured
  • Monitoring enabled
  • Security hardening completed
  • Admin users created
  • Authentication configured (LDAP/SAML/OIDC)
  • Clinical safety assessment performed
  • Support contract in place
  • Disaster recovery plan documented