This directory contains guides for setting up and configuring a gEAR server instance.
- New Server Setup - Complete guide for setting up a fresh gEAR instance
- System requirements and cloud instance setup
- Base system configuration
- Quick reference for common setup tasks
- MySQL Database - MySQL installation and configuration
- Apache Web Server - Apache setup with mod_wsgi
- Python Environment - Python packages and dependencies
- R and rpy2 - R installation for ProjectR (if running locally)
- RabbitMQ - Message broker for async job processing
- Docker - Docker-based development environment
- MySQL in Docker - Docker-based MySQL installation and configuration
- Systemd Services - Background worker services
For a new server installation:
- Start with New Server Setup
- Follow the component guides in order:
- MySQL → Python → Apache → RabbitMQ (optional) → R (optional)
- Configure
gear.inifrom template - Set up systemd services for background workers
- Load annotation data and test datasets
- OS: Ubuntu 22.04 LTS (recommended)
- CPU: 2 vCPUs (4+ recommended for production)
- RAM: 16GB (48GB+ recommended for production)
- Storage: 100GB+ SSD
- CPU: 16+ cores
- RAM: 100GB+
- Storage: 300GB+ SSD (more depending on dataset sizes)
gear.ini.template- Main configuration templatedocker/gear.ini.docker.template- Docker-specific configurationcreate_schema.sql- Database schema
After setup, ensure these directories exist and have proper permissions:
www/
├── datasets/ # H5AD dataset files
├── datasets/spatial/ # Zarr spatial data stores
├── analyses/ # Analysis results
├── carts/ # Gene lists
├── projections/ # ProjectR results
├── uploads/files/ # Upload staging area
└── img/dataset_previews/ # Dataset preview images
- Check Apache error logs:
/var/log/apache2/error.log - Verify mod_wsgi is installed:
apache2ctl -M | grep wsgi - Check gear.ini permissions and syntax
- Verify MySQL is running:
systemctl status mysql - Check database credentials in
gear.ini - Ensure database user has proper permissions
- Activate virtual environment if using one
- Install missing packages:
pip install -r requirements.txt - Check Python path in wsgi configuration
- Verify RabbitMQ is running:
systemctl status rabbitmq-server - Check credentials and virtual host in
gear.ini - Review RabbitMQ logs:
/var/log/rabbitmq/
Transfer these directories from old to new instance:
$HOME/git/gEAR/www/datasets
$HOME/git/gEAR/www/analyses-
Export database from old instance:
mysqldump -u root -p gear_db > gear_backup.sql -
Import on new instance:
mysql -u root -p gear_db < gear_backup.sql
For development, strongly recommended to use Docker instead of a full server setup:
- See Docker Setup Guide
- Faster setup but requires more disk space
- Good for local development and testing
- Update system packages:
sudo apt update && sudo apt upgrade - Monitor disk space (datasets can grow large)
- Review Apache/MySQL logs for errors
- Backup database regularly
cd /path/to/gEAR
git pull origin devel
# Restart services (if needed)
sudo systemctl restart apache2
sudo systemctl restart projectr-consumer.target gosling-upload-consumer.target
sudo systemctl restart spatial-panel.serviceApache2 - If API code was updated
ProjectR consumers - If projectR code in /services/projectr was updated
Spatial Panel daemon - If code in /services/spatial was updated
- Check component-specific setup guides for detailed instructions
- Review logs for error messages
- Create an issue on GitHub
- Contact @adkinsrs for infrastructure questions