Skip to content

Deploying Galette

Introduction

Galette is a free, open-source membership management web application designed for non-profit organizations, associations, clubs, and community groups. Built with PHP, Galette provides a comprehensive suite of tools for managing members, tracking contributions and dues, handling mailings, generating reports, and maintaining detailed records of your organization’s membership activities.

Originally developed by the French community, Galette has grown into a mature, feature-rich platform used by thousands of organizations worldwide. The name “Galette” comes from the French word for a flat, round cake—symbolizing the community gathering aspect the software enables.

Key Features

  • Member Management: Comprehensive member profiles with customizable fields, photos, statuses, and categories
  • Contribution Tracking: Track membership fees, donations, and other contributions with detailed payment histories
  • Mailing System: Built-in tools for sending bulk emails and generating mailing labels
  • PDF Generation: Create membership cards, contribution receipts, labels, and custom documents
  • Import/Export: Import members from CSV files and export data for external processing
  • Multi-language Support: Available in numerous languages including English, French, German, Spanish, and more
  • Plugin Architecture: Extend functionality with official and community plugins for events, maps, activities, and auto-billing
  • Customizable Fields: Add unlimited dynamic fields to adapt Galette to your organization’s needs
  • Access Control: Role-based permissions for administrators, staff, and group managers
  • Template System: Customize emails, receipts, and documents with built-in templating

Why Deploy Galette on Klutch.sh?

  • Simplified Deployment: Deploy directly from your GitHub repository with automatic Dockerfile detection
  • Persistent Storage: Attach volumes to preserve member photos, documents, and uploaded files
  • Database Flexibility: Connect to MySQL, MariaDB, or PostgreSQL databases
  • Custom Domains: Map your organization’s domain to your Galette instance
  • Secure Infrastructure: Production-grade hosting with HTTPS encryption
  • Scalable Resources: Adjust CPU and memory as your membership grows
  • Cost-Effective: Affordable hosting for non-profit organizations and community groups

Prerequisites

Before deploying Galette on Klutch.sh, ensure you have:


What You’ll Deploy

By following this guide, you’ll have:

  • A fully functional Galette installation running on Klutch.sh
  • Persistent storage for member photos, documents, and application data
  • Database connectivity for storing membership records
  • Secure environment configuration with proper credentials management
  • Production-ready setup with optimized PHP and Apache configurations

Understanding Galette Architecture

Galette follows a traditional LAMP-style architecture:

┌─────────────────────────────────────────────────────────────┐
│ Web Browser │
│ (Members & Admins) │
└─────────────────────┬───────────────────────────────────────┘
│ HTTPS (Port 443)
┌─────────────────────────────────────────────────────────────┐
│ Klutch.sh Platform │
│ ┌──────────────────────┐ │
│ │ Load Balancer │ │
│ └──────────┬───────────┘ │
│ │ Port 80 │
│ ┌──────────▼───────────┐ │
│ │ Galette Container │ │
│ │ ┌────────────────┐ │ │
│ │ │ Apache │ │ │
│ │ │ + mod_php │ │ │
│ │ └───────┬────────┘ │ │
│ │ │ │ │
│ │ ┌───────▼────────┐ │ │
│ │ │ PHP 8.x │ │ │
│ │ │ + Galette │ │ │
│ │ └───────┬────────┘ │ │
│ └──────────┼───────────┘ │
│ │ │
│ ┌────────────────────┼────────────────────┐ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ MySQL/ │ │ Persistent │ │ SMTP │ │
│ │ MariaDB/ │ │ Volume │ │ Server │ │
│ │ PostgreSQL│ │ (uploads, │ │ (mailings) │ │
│ └──────────┘ │ photos) │ └──────────────┘ │
│ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘

System Requirements:

  • PHP 8.1+ with extensions: PDO, MySQL/PostgreSQL, GD, intl, mbstring, curl, openssl, xml, zip
  • Apache or Nginx web server
  • MySQL 5.7+, MariaDB 10.4+, or PostgreSQL 10+
  • File storage for uploads, photos, and generated documents

Step 1: Prepare Your Repository

Create a new GitHub repository for your Galette deployment with the following structure:

galette-deployment/
├── Dockerfile
├── docker-entrypoint.sh
├── apache-galette.conf
├── php-galette.ini
├── .dockerignore
└── README.md

Create the Dockerfile

Create a Dockerfile in your repository root:

FROM php:8.2-apache
LABEL maintainer="Your Organization <admin@yourorg.org>"
LABEL description="Galette membership management software"
# Set environment variables
ENV GALETTE_VERSION=1.1.0
ENV APACHE_DOCUMENT_ROOT=/var/www/galette/galette
# Install system dependencies
RUN apt-get update && apt-get install -y \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
libicu-dev \
libxml2-dev \
libzip-dev \
libpq-dev \
libcurl4-openssl-dev \
libonig-dev \
unzip \
curl \
wget \
git \
cron \
msmtp \
msmtp-mta \
&& rm -rf /var/lib/apt/lists/*
# Configure and install PHP extensions
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \
gd \
pdo \
pdo_mysql \
pdo_pgsql \
intl \
mbstring \
curl \
xml \
zip \
opcache \
gettext
# Enable Apache modules
RUN a2enmod rewrite headers expires deflate
# Download and install Galette
WORKDIR /var/www
RUN wget -q "https://github.com/galette/galette/releases/download/${GALETTE_VERSION}/galette-${GALETTE_VERSION}.tar.bz2" \
&& tar -xjf "galette-${GALETTE_VERSION}.tar.bz2" \
&& rm "galette-${GALETTE_VERSION}.tar.bz2" \
&& mv "galette-${GALETTE_VERSION}" galette
# Set proper permissions
RUN chown -R www-data:www-data /var/www/galette \
&& chmod -R 755 /var/www/galette \
&& chmod -R 775 /var/www/galette/galette/data \
&& chmod -R 775 /var/www/galette/galette/config \
&& chmod -R 775 /var/www/galette/galette/tempimages \
&& chmod -R 775 /var/www/galette/galette/templates_c
# Copy custom configurations
COPY apache-galette.conf /etc/apache2/sites-available/000-default.conf
COPY php-galette.ini /usr/local/etc/php/conf.d/galette.ini
COPY docker-entrypoint.sh /usr/local/bin/
# Make entrypoint executable
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Configure Apache document root
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
&& sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
# Create directories for persistent data
RUN mkdir -p /var/www/galette/galette/data/photos \
&& mkdir -p /var/www/galette/galette/data/attachments \
&& mkdir -p /var/www/galette/galette/data/exports \
&& mkdir -p /var/www/galette/galette/data/imports \
&& mkdir -p /var/www/galette/galette/data/tempimages \
&& mkdir -p /var/www/galette/galette/data/logs \
&& chown -R www-data:www-data /var/www/galette/galette/data
WORKDIR /var/www/galette/galette
EXPOSE 80
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["apache2-foreground"]

Create the Apache Configuration

Create apache-galette.conf:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/galette/galette
<Directory /var/www/galette/galette>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
# Security headers
Header always set X-Content-Type-Options "nosniff"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-XSS-Protection "1; mode=block"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
</Directory>
# Deny access to sensitive directories
<DirectoryMatch "^/var/www/galette/galette/(config|data|includes|lib|templates_c)/">
Require all denied
</DirectoryMatch>
# Allow specific data subdirectories for public access
<Directory /var/www/galette/galette/data/photos>
Require all granted
</Directory>
# Enable compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json
</IfModule>
# Enable caching for static assets
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
</IfModule>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Create the PHP Configuration

Create php-galette.ini:

; Galette PHP Configuration
; Memory and execution limits
memory_limit = 256M
max_execution_time = 300
max_input_time = 300
max_input_vars = 3000
; Upload settings
upload_max_filesize = 32M
post_max_size = 48M
file_uploads = On
; Session configuration
session.cookie_httponly = On
session.cookie_secure = On
session.use_strict_mode = On
session.cookie_samesite = Strict
; Error handling (production settings)
display_errors = Off
display_startup_errors = Off
log_errors = On
error_log = /var/log/php_errors.log
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
; Date and timezone
date.timezone = UTC
; OPcache settings
opcache.enable = 1
opcache.memory_consumption = 128
opcache.interned_strings_buffer = 8
opcache.max_accelerated_files = 10000
opcache.revalidate_freq = 60
opcache.fast_shutdown = 1
opcache.enable_cli = 0
; Intl settings
intl.default_locale = en_US

Create the Entrypoint Script

Create docker-entrypoint.sh:

#!/bin/bash
set -e
# Color codes for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "${GREEN}Starting Galette container initialization...${NC}"
# Galette directories
GALETTE_ROOT="/var/www/galette/galette"
GALETTE_DATA="${GALETTE_ROOT}/data"
GALETTE_CONFIG="${GALETTE_ROOT}/config"
# Ensure data directories exist with proper permissions
echo -e "${YELLOW}Setting up data directories...${NC}"
directories=(
"${GALETTE_DATA}/photos"
"${GALETTE_DATA}/attachments"
"${GALETTE_DATA}/exports"
"${GALETTE_DATA}/imports"
"${GALETTE_DATA}/tempimages"
"${GALETTE_DATA}/logs"
"${GALETTE_DATA}/cache"
"${GALETTE_DATA}/files"
"${GALETTE_ROOT}/templates_c"
)
for dir in "${directories[@]}"; do
if [ ! -d "$dir" ]; then
mkdir -p "$dir"
echo -e " Created: $dir"
fi
done
# Set ownership and permissions
chown -R www-data:www-data "${GALETTE_DATA}"
chown -R www-data:www-data "${GALETTE_ROOT}/templates_c"
chown -R www-data:www-data "${GALETTE_CONFIG}"
chmod -R 775 "${GALETTE_DATA}"
chmod -R 775 "${GALETTE_ROOT}/templates_c"
chmod -R 775 "${GALETTE_CONFIG}"
# Generate config.inc.php if environment variables are set
if [ -n "${GALETTE_DB_HOST}" ] && [ -n "${GALETTE_DB_NAME}" ]; then
echo -e "${YELLOW}Generating Galette configuration from environment variables...${NC}"
CONFIG_FILE="${GALETTE_CONFIG}/config.inc.php"
# Determine database type
DB_TYPE="${GALETTE_DB_TYPE:-mysql}"
cat > "${CONFIG_FILE}" << EOF
<?php
/**
* Galette Configuration
* Generated automatically from environment variables
*/
// Database configuration
define('TYPE_DB', '${DB_TYPE}');
define('HOST_DB', '${GALETTE_DB_HOST}');
define('PORT_DB', '${GALETTE_DB_PORT:-3306}');
define('USER_DB', '${GALETTE_DB_USER}');
define('PWD_DB', '${GALETTE_DB_PASSWORD}');
define('NAME_DB', '${GALETTE_DB_NAME}');
define('PREFIX_DB', '${GALETTE_DB_PREFIX:-galette_}');
// Installation mode (set to false after initial setup)
define('GALETTE_MODE', '${GALETTE_MODE:-PROD}');
// Debug mode
define('GALETTE_DEBUG', ${GALETTE_DEBUG:-false});
EOF
chown www-data:www-data "${CONFIG_FILE}"
chmod 640 "${CONFIG_FILE}"
echo -e "${GREEN}Configuration file generated successfully.${NC}"
fi
# Configure email settings if SMTP is configured
if [ -n "${SMTP_HOST}" ]; then
echo -e "${YELLOW}Configuring SMTP settings...${NC}"
cat > /etc/msmtprc << EOF
account default
host ${SMTP_HOST}
port ${SMTP_PORT:-587}
auth on
user ${SMTP_USER}
password ${SMTP_PASSWORD}
from ${SMTP_FROM:-noreply@example.com}
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile /var/log/msmtp.log
EOF
chmod 600 /etc/msmtprc
# Configure PHP to use msmtp
echo 'sendmail_path = "/usr/bin/msmtp -t"' >> /usr/local/etc/php/conf.d/mail.ini
echo -e "${GREEN}SMTP configuration completed.${NC}"
fi
# Set timezone if provided
if [ -n "${TZ}" ]; then
echo -e "${YELLOW}Setting timezone to ${TZ}...${NC}"
ln -snf "/usr/share/zoneinfo/${TZ}" /etc/localtime
echo "${TZ}" > /etc/timezone
echo "date.timezone = ${TZ}" >> /usr/local/etc/php/conf.d/galette.ini
fi
# Wait for database if configured
if [ -n "${GALETTE_DB_HOST}" ]; then
echo -e "${YELLOW}Waiting for database connection...${NC}"
max_attempts=30
attempt=1
while [ $attempt -le $max_attempts ]; do
if php -r "
\$host = '${GALETTE_DB_HOST}';
\$port = ${GALETTE_DB_PORT:-3306};
\$user = '${GALETTE_DB_USER}';
\$pass = '${GALETTE_DB_PASSWORD}';
\$db = '${GALETTE_DB_NAME}';
\$type = '${GALETTE_DB_TYPE:-mysql}';
try {
if (\$type === 'pgsql') {
\$dsn = \"pgsql:host=\$host;port=\$port;dbname=\$db\";
} else {
\$dsn = \"mysql:host=\$host;port=\$port;dbname=\$db\";
}
new PDO(\$dsn, \$user, \$pass, [PDO::ATTR_TIMEOUT => 5]);
exit(0);
} catch (Exception \$e) {
exit(1);
}
" 2>/dev/null; then
echo -e "${GREEN}Database connection established.${NC}"
break
fi
echo -e " Attempt $attempt/$max_attempts: Waiting for database..."
sleep 2
attempt=$((attempt + 1))
done
if [ $attempt -gt $max_attempts ]; then
echo -e "${RED}Warning: Could not connect to database after $max_attempts attempts.${NC}"
echo -e "${YELLOW}Galette will start anyway - please check your database configuration.${NC}"
fi
fi
echo -e "${GREEN}Galette initialization complete. Starting Apache...${NC}"
# Execute the main command
exec "$@"

Create the .dockerignore File

Create .dockerignore:

.git
.github
.gitignore
.env
.env.*
*.md
docker-compose*.yml
.dockerignore
Dockerfile*
*.log
*.bak
*.swp
*.tmp
node_modules
.DS_Store
Thumbs.db

Step 2: Set Up the Database

Galette requires a MySQL, MariaDB, or PostgreSQL database. You can deploy a database on Klutch.sh or use an external database service.

Option A: Deploy MySQL on Klutch.sh

Follow our MySQL deployment guide to set up a MySQL database on Klutch.sh.

After deploying MySQL, create a database and user for Galette:

CREATE DATABASE galette CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'galette_user'@'%' IDENTIFIED BY 'your_secure_password';
GRANT ALL PRIVILEGES ON galette.* TO 'galette_user'@'%';
FLUSH PRIVILEGES;

Option B: Deploy MariaDB on Klutch.sh

Alternatively, follow our MariaDB deployment guide for a MySQL-compatible database.

Database Connection Details

After deploying your database, note the following connection details:

  • Host: Your database app URL (e.g., mysql-app.klutch.sh)
  • Port: 8000 (external port for TCP connections on Klutch.sh)
  • Database Name: galette
  • Username: galette_user
  • Password: Your secure password

Step 3: Deploy to Klutch.sh

  1. Log in to your Klutch.sh dashboard.
  2. Click Create New App to start a new deployment.
  3. Enter an app name (e.g., galette or membership-portal).
  4. Connect your GitHub account and select the repository containing your Galette Dockerfile.
  5. Klutch.sh will automatically detect the Dockerfile in your repository root.
  6. Configure the following settings:
    • Traffic Type: Select HTTP
    • Internal Port: Enter 80
  7. Add environment variables (see the Environment Variables section below).
  8. Click Deploy to start the build and deployment process.

Step 4: Configure Environment Variables

In your Klutch.sh app settings, add the following environment variables:

Required Database Variables

VariableDescriptionExample
GALETTE_DB_TYPEDatabase type (mysql or pgsql)mysql
GALETTE_DB_HOSTDatabase server hostnamemysql-app.klutch.sh
GALETTE_DB_PORTDatabase port8000
GALETTE_DB_NAMEDatabase namegalette
GALETTE_DB_USERDatabase usernamegalette_user
GALETTE_DB_PASSWORDDatabase passwordyour_secure_password
GALETTE_DB_PREFIXTable prefixgalette_

Application Variables

VariableDescriptionExample
GALETTE_MODEApplication mode (PROD, DEV, or MAINT)PROD
GALETTE_DEBUGEnable debug modefalse
TZTimezoneAmerica/New_York

Optional SMTP Variables

VariableDescriptionExample
SMTP_HOSTSMTP server hostnamesmtp.sendgrid.net
SMTP_PORTSMTP server port587
SMTP_USERSMTP usernameapikey
SMTP_PASSWORDSMTP passwordyour_smtp_password
SMTP_FROMDefault sender emailnoreply@yourorg.org

Step 5: Attach Persistent Storage

Galette stores member photos, attachments, exports, and other files that need to persist across deployments.

  1. In your Klutch.sh app settings, navigate to the Volumes section.
  2. Click Add Volume and configure:
    • Mount Path: /var/www/galette/galette/data
    • Size: Start with 5GB (increase as needed for your organization)
  3. Save the configuration and redeploy your app.

The persistent volume ensures that:

  • Member photos are preserved
  • Uploaded attachments persist
  • Export files remain available
  • Import history is maintained
  • Logs are retained across restarts

For more information on persistent storage, see our Persistent Volumes documentation.


Step 6: Complete Initial Setup

After deployment, complete the Galette installation through the web interface:

  1. Navigate to your Galette instance at https://your-app.klutch.sh.
  2. The installation wizard will guide you through the setup process:
    • System Check: Verify PHP requirements and permissions
    • Database Configuration: If not configured via environment variables, enter your database details
    • Database Installation: Choose between new installation or import existing data
    • Administrator Account: Create the super administrator account
  3. After completing setup, log in with your administrator credentials.
  4. Important: After installation, update GALETTE_MODE to PROD and redeploy to disable the installation wizard.

Getting Started with Galette

Creating Your First Member

Once logged in as administrator:

  1. Navigate to MembersAdd a member.
  2. Fill in the member details:
    • Personal information (name, birthdate, gender)
    • Contact information (email, phone, address)
    • Membership status and category
    • Optional: Upload a member photo
  3. Click Save to create the member record.

Setting Up Member Categories

Customize membership types for your organization:

  1. Go to ConfigurationMembership status.
  2. Add statuses like:
    • Active Member
    • Honorary Member
    • Board Member
    • Student Member
    • Expired
  3. Navigate to ConfigurationContributions types.
  4. Define contribution types:
    • Annual Dues
    • Donation
    • Event Registration
    • Merchandise

Recording Contributions

Track membership dues and donations:

  1. Go to ContributionsAdd a contribution.
  2. Select the member, contribution type, and amount.
  3. Set the contribution dates and payment method.
  4. Save to record the contribution.

Bulk Import Members

Import existing member data from CSV:

  1. Prepare a CSV file with member data matching Galette's import format.
  2. Navigate to MembersImport from CSV.
  3. Upload your CSV file and map columns to Galette fields.
  4. Review the import preview and confirm.

Example CSV format:

nom_adh,prenom_adh,pseudo_adh,email_adh,date_crea_adh
Smith,John,jsmith,john.smith@example.com,2024-01-15
Johnson,Sarah,sjohnson,sarah.j@example.com,2024-01-20
Williams,Michael,mwilliams,m.williams@example.com,2024-02-01

API Integration

Galette provides a REST API for programmatic access to member data.

Enabling the API

  1. Log in as administrator.
  2. Navigate to ConfigurationPlugins.
  3. Install and enable the API plugin if not already active.
  4. Generate an API key in the plugin settings.

Example: Fetching Members (PHP)

<?php
/**
* Galette API Example - Fetch Members
*/
$apiUrl = 'https://your-app.klutch.sh/api';
$apiKey = 'your_api_key';
// Initialize cURL
$ch = curl_init();
// Configure request
curl_setopt_array($ch, [
CURLOPT_URL => "$apiUrl/members",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $apiKey",
"Content-Type: application/json",
"Accept: application/json"
]
]);
// Execute request
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 200) {
$members = json_decode($response, true);
foreach ($members as $member) {
echo "Member: {$member['firstname']} {$member['lastname']}\n";
echo " Email: {$member['email']}\n";
echo " Status: {$member['status']}\n";
echo "---\n";
}
} else {
echo "Error: HTTP $httpCode\n";
echo $response;
}

Example: Create Member (Python)

"""
Galette API Example - Create Member
"""
import requests
import json
API_URL = "https://your-app.klutch.sh/api"
API_KEY = "your_api_key"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json"
}
# New member data
new_member = {
"nom_adh": "Garcia",
"prenom_adh": "Maria",
"pseudo_adh": "mgarcia",
"email_adh": "maria.garcia@example.com",
"login_adh": "mgarcia",
"mdp_adh": "secure_password_123",
"id_statut": 1, # Active member status
"date_crea_adh": "2024-03-15"
}
try:
response = requests.post(
f"{API_URL}/members",
headers=headers,
json=new_member
)
if response.status_code == 201:
member = response.json()
print(f"Created member: {member['firstname']} {member['lastname']}")
print(f"Member ID: {member['id']}")
else:
print(f"Error {response.status_code}: {response.text}")
except requests.exceptions.RequestException as e:
print(f"Request failed: {e}")

Example: Export Members (Node.js)

/**
* Galette API Example - Export Members
*/
const https = require('https');
const API_URL = 'your-app.klutch.sh';
const API_KEY = 'your_api_key';
const options = {
hostname: API_URL,
path: '/api/members/export',
method: 'GET',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Accept': 'text/csv'
}
};
const req = https.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
if (res.statusCode === 200) {
// Save CSV data
const fs = require('fs');
fs.writeFileSync('members_export.csv', data);
console.log('Members exported successfully');
} else {
console.error(`Error ${res.statusCode}: ${data}`);
}
});
});
req.on('error', (e) => {
console.error(`Request failed: ${e.message}`);
});
req.end();

Installing Plugins

Galette supports plugins to extend its functionality.

Official Plugins

  • Maps: Display members on an interactive map
  • Events: Manage events and registrations
  • Auto: Automatic membership renewal and billing
  • Paypal: Accept online payments via PayPal
  • Activities: Track member activities and participation
  • FullCard: Enhanced membership card generation

Installing a Plugin

  1. Download the plugin from the Galette website.
  2. Update your Dockerfile to include the plugin:
    # Add to your Dockerfile after Galette installation
    # Download and install plugins
    RUN cd /var/www/galette/galette/plugins \
    && wget -q "https://github.com/galette/plugin-maps/releases/download/v1.5.0/plugin-maps-1.5.0.tar.bz2" \
    && tar -xjf plugin-maps-*.tar.bz2 \
    && rm plugin-maps-*.tar.bz2 \
    && chown -R www-data:www-data /var/www/galette/galette/plugins
  3. Commit and push changes to trigger a new deployment.
  4. Activate the plugin in ConfigurationPlugins.

Configuring Email Templates

Galette uses customizable email templates for member communications.

Accessing Templates

  1. Navigate to ConfigurationEmails content.
  2. Select a template to customize:
    • New account notification
    • Password reset
    • Contribution reminder
    • Membership expiration warning
    • Custom mailings

Template Variables

Use these variables in your templates:

VariableDescription
{NAME}Member’s full name
{FIRSTNAME}Member’s first name
{LASTNAME}Member’s last name
{LOGIN}Member’s username
{COMPANY}Member’s company name
{DEADLINE}Membership expiration date
{CONTRIB_BEGIN}Contribution start date
{CONTRIB_END}Contribution end date
{AMOUNT}Contribution amount
{COMMENT}Contribution comment

Example: Custom Renewal Reminder

Subject: Membership Renewal Reminder - {COMPANY}
Dear {FIRSTNAME},
This is a friendly reminder that your membership with our organization
expires on {DEADLINE}.
To continue enjoying member benefits, please renew your membership at
your earliest convenience.
If you have already renewed, please disregard this message.
Best regards,
The Membership Team

Production Best Practices

Security Hardening

  1. Remove Install Directory: After installation, add this to your Dockerfile:
    RUN rm -rf /var/www/galette/galette/install
  2. Restrict Config Access: Ensure config files are not web-accessible (handled in Apache config).
  3. Use Strong Passwords: Generate unique passwords for database and admin accounts.
  4. Enable HTTPS: Klutch.sh provides automatic HTTPS—ensure all communications use it.
  5. Regular Updates: Keep Galette updated by changing the version in your Dockerfile.

Backup Strategy

Implement regular backups for your membership data:

Database Backup:

Terminal window
# Connect to your MySQL container and create backup
mysqldump -h mysql-app.klutch.sh -P 8000 -u galette_user -p galette > galette_backup_$(date +%Y%m%d).sql

File Backup:

The persistent volume at /var/www/galette/galette/data should be backed up regularly. Consider:

  • Export member data periodically via Galette’s export feature
  • Download generated exports and reports
  • Archive member photos and attachments

Performance Optimization

  1. Enable OPcache: Already configured in php-galette.ini for optimal PHP performance.
  2. Database Indexing: Galette creates necessary indexes during installation.
  3. Image Optimization: Use appropriately sized member photos (recommended: 150x200 pixels).
  4. Caching: Apache caching headers configured for static assets.

Monitoring

Monitor your Galette deployment through:

  • Klutch.sh dashboard logs for application errors
  • Database query performance via MySQL/MariaDB tools
  • PHP error logs in /var/log/php_errors.log
  • Apache access and error logs

For detailed monitoring setup, see our Monitoring documentation.


Troubleshooting

Common Issues and Solutions

Issue: Installation wizard appears after setup

The installation wizard is still accessible. Update the environment variable:

GALETTE_MODE=PROD

Then redeploy your application.

Issue: Cannot connect to database

Verify your database connection settings:

  1. Check that the database host is correct (include port 8000 for Klutch.sh databases)
  2. Verify credentials are correct
  3. Ensure the database exists and user has proper permissions
  4. Check if the database container is running

Issue: File upload fails

Check PHP upload limits and file permissions:

  1. Verify upload_max_filesize and post_max_size in php-galette.ini
  2. Ensure the data directory has write permissions
  3. Check available disk space on the persistent volume

Issue: Emails not sending

Troubleshoot SMTP configuration:

  1. Verify SMTP credentials are correct
  2. Check SMTP port (usually 587 for TLS, 465 for SSL)
  3. Review msmtp logs: cat /var/log/msmtp.log
  4. Test SMTP connection independently

Issue: Photos not displaying

Verify the photos directory permissions:

Terminal window
# In container
ls -la /var/www/galette/galette/data/photos
chown -R www-data:www-data /var/www/galette/galette/data/photos

Issue: Slow performance with many members

Optimize for large datasets:

  1. Increase PHP memory limit in php-galette.ini
  2. Enable MySQL query caching
  3. Add database indexes for frequently queried fields
  4. Consider upgrading container resources in Klutch.sh

Issue: Template compilation errors

Clear the templates cache:

Terminal window
# In container
rm -rf /var/www/galette/galette/templates_c/*
chown -R www-data:www-data /var/www/galette/galette/templates_c

Upgrading Galette

To upgrade to a new version of Galette:

  1. Backup Everything: Export your database and download the data directory.
  2. Update Dockerfile: Change the GALETTE_VERSION variable:
    ENV GALETTE_VERSION=1.2.0
  3. Review Release Notes: Check the Galette news for migration requirements.
  4. Commit and Deploy: Push changes to trigger a new deployment.
  5. Run Migrations: Galette will automatically detect and apply database updates on first access.
  6. Verify Functionality: Test member management, contributions, and other features.

Additional Resources


Summary

Galette is an excellent choice for non-profit organizations, clubs, and associations looking for a comprehensive membership management solution. By deploying Galette on Klutch.sh, you get:

  • Easy Deployment: Automatic Dockerfile detection and building
  • Reliable Storage: Persistent volumes for member data and photos
  • Flexible Database: Support for MySQL, MariaDB, or PostgreSQL
  • Secure Hosting: Production-grade infrastructure with HTTPS
  • Scalable Resources: Adjust as your organization grows

With the configuration outlined in this guide, your Galette instance is ready to manage members, track contributions, send mailings, and generate reports—all the tools your organization needs to thrive.