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
intl- Internationalization functionsmbstring- Multibyte string handlingjson- JSON encoding/decodingcurl- HTTP requests (for API features)gdorimagick- Image processingfileinfo- File type detection
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:
- Visit your domain in a browser
- Register an admin account
- Log in and access the Admin Settings
- Configure your site name and preferences
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
writabledirectory is writable by the web server - All required PHP extensions are installed
- The
.htaccessfile 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.baseURLin.envis correct - Files in
public/assetsare readable - Browser cache is cleared
AncestryCodex