v1.1.0 Back to App

Installation Guide

This guide walks you through installing AncestryCodex on your own server.

System Requirements

Before installing, ensure your server meets these requirements:

Component Minimum Recommended
PHP 8.1 8.2+
Web Server Apache 2.4 or Nginx Apache 2.4 with mod_rewrite
Memory 512MB RAM 1GB+ RAM
Storage 1GB 10GB+ (for media files)

Required PHP Extensions

Installation Steps

Step 1: Download AncestryCodex

Download the latest release or clone the repository:

# Clone the repository
git clone https://github.com/ancestrycodex/ancestrycodex.git

# Or download and extract the zip
wget https://github.com/ancestrycodex/ancestrycodex/archive/main.zip
unzip main.zip

Step 2: Configure Web Server

Point your web server's document root to the public directory.

Apache Virtual Host Example:

<VirtualHost *:80>
    ServerName yourdomain.com
    DocumentRoot /var/www/ancestrycodex/public

    <Directory /var/www/ancestrycodex/public>
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/ancestrycodex_error.log
    CustomLog ${APACHE_LOG_DIR}/ancestrycodex_access.log combined
</VirtualHost>

Step 3: Set Permissions

Ensure the web server can write to required directories:

# Set ownership
sudo chown -R www-data:www-data /var/www/ancestrycodex

# Set directory permissions
sudo chmod -R 755 /var/www/ancestrycodex
sudo chmod -R 775 /var/www/ancestrycodex/writable

Step 4: Configure Environment

Copy the environment file and configure your settings:

# Copy the example environment file
cp env .env

# Edit the configuration
nano .env

Key settings to configure:

# Application
CI_ENVIRONMENT = production
app.baseURL = 'https://yourdomain.com/'

# Encryption
encryption.key = 'your-random-32-character-key-here'

Step 5: Enable SSL (Recommended)

We strongly recommend using HTTPS. Use Let's Encrypt for free SSL certificates:

sudo certbot --apache -d yourdomain.com

Post-Installation

Create Admin Account

After installation, visit your site and register the first account. The first registered user automatically becomes the administrator.

Verify Installation

Check that everything is working:

  1. Visit your domain in a browser
  2. Register an admin account
  3. Log in and access the Admin Settings
  4. Configure your site name and preferences
Next Steps

Once installed, continue to the Quick Start Guide to set up your first family tree.

Troubleshooting

Common Issues

Check the Apache error log and ensure:

  • The writable directory is writable by the web server
  • All required PHP extensions are installed
  • The .htaccess file is present and mod_rewrite is enabled

Enable PHP error reporting to see the actual error:

// In public/index.php, add at the top:
ini_set('display_errors', 1);
error_reporting(E_ALL);

Check that:

  • The app.baseURL in .env is correct
  • Files in public/assets are readable
  • Browser cache is cleared