Self-Hosting
This guide covers deploying Gäld on your own server in production. For local development, see Getting Started.
This procedure installs the complete public Community Edition under AGPL-3.0-or-later. It does not require a hosted subscription, private registry credentials, or the commercial EE plugin. Hosted billing, quotas, and SaaS operations belong to the separate commercial deployment.
Managed installation
For a new Community Edition installation, choose a signed Gäld release from v3.11.0 onward. The managed installer supports Docker on Linux AMD64 and ARM64 and on Apple Silicon. Native systemd installation is supported on a dedicated Ubuntu 24.04 LTS ARM64 host. The managed installation and recovery guide covers both modes, encrypted backups and recovery with an age identity stored separately.
To move an existing Sail installation, follow the adoption path for its version in the signed release manifest. If you installed from a source archive, follow the source archive adoption procedure. Keep the original installation and its backup until you have tested a restore.
Once v3.12.1 is available in the signed releases, use the gaeld launcher and scripts/distribution directory from the verified v3.12.1 release to upgrade a managed v3.11.0 or v3.12.0 installation. Use that same launcher and directory if you restore its previous backup.
Verify the managed installer signing key
The managed installer uses an Ed25519 key to verify the release manifest before installing or updating. Download the Gäld release public key to a file named gaeld-release.pub. Compare its SHA-256 with the fingerprint in a trusted copy of the public launcher or with your operator, then supply the file using --trust-key.
Release key SHA-256
a8fc25a937ba95210f64d75ae361ce20ed30c828b3712990c958f93224a3653c
shasum -a 256 gaeld-release.pub
A separate EE acceptance public key verifies the private edition’s compatibility receipt. Its SHA-256 is 81c9d5e200e21fd0d6f0df020a5be0f97b31215d6237899e29e708fb56bf8f4c.
Source installations
These sections describe the earlier source-based setup. Use the requirements for the tag you checked out.
Server Requirements
| Component | Minimum version |
|---|---|
| PHP | 8.4 |
| PostgreSQL | 15 |
| Redis | 7 |
| MeiliSearch | Latest |
| Nginx (or Caddy) | — |
| Node.js (build only) | 20 + pnpm |
| Tesseract OCR | 4.0+ |
A single VPS with 2 vCPU, 2 GB RAM, and 20 GB SSD is sufficient for most small organisations.
If MeiliSearch is unavailable, Gäld falls back to database search automatically. Results may be slower and less fuzzy, but the application continues to function.
Required only for the Quick Receipt scan feature. Install with sudo apt install tesseract-ocr tesseract-ocr-fra tesseract-ocr-deu. Without it, users can still fill in expense fields manually.
Sail development checkout
From a public source checkout, start the Sail development environment with the project launcher.
git clone https://github.com/Scanix/Gaeld.git
cd Gaeld
./gaeld setup
This starts the following services:
| Service | Port |
|---|---|
| Gäld (PHP + Nginx) | 8080 |
| PostgreSQL 15+ | 5432 |
| Redis 7 | 6379 |
| MeiliSearch | 7700 |
| Mailpit (dev mail) | 8025 |
For a production Docker installation, follow the managed guide above and configure an HTTPS reverse proxy before allowing remote access.
Manual Installation
git clone https://github.com/Scanix/Gaeld.git /var/www/gaeld
cd /var/www/gaeld
composer install --no-dev --optimize-autoloader
pnpm install && pnpm run build
cp .env.example .env
php artisan key:generate
Edit .env with your production values (see Environment Variables below).
php artisan gaeld:install
Nginx Configuration
server {
listen 80;
server_name app.example.com;
root /var/www/gaeld/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
Add an SSL certificate (e.g. via Certbot) and redirect port 80 to 443 before going live.
PHP-FPM Pool
Create or edit /etc/php/8.4/fpm/pool.d/gaeld.conf:
[gaeld]
user = www-data
group = www-data
listen = /run/php/php8.4-fpm.sock
listen.owner = www-data
listen.group = www-data
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
Restart: systemctl restart php8.4-fpm
Queue Worker (systemd)
Gäld uses Laravel queues for background jobs (bank imports, notifications). Run a persistent worker:
# /etc/systemd/system/gaeld-worker.service
[Unit]
Description=Gäld Queue Worker
After=network.target
[Service]
User=www-data
WorkingDirectory=/var/www/gaeld
ExecStart=/usr/bin/php /var/www/gaeld/artisan queue:work --sleep=3 --tries=3 --max-time=3600
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
Enable and start:
systemctl enable gaeld-worker
systemctl start gaeld-worker
Scheduled Tasks (cron)
Add to the www-data crontab:
* * * * * /usr/bin/php /var/www/gaeld/artisan schedule:run >> /dev/null 2>&1
File Storage and Permissions
chown -R www-data:www-data /var/www/gaeld/storage /var/www/gaeld/bootstrap/cache
chmod -R 775 /var/www/gaeld/storage /var/www/gaeld/bootstrap/cache
Generated files (invoice PDFs, bank imports) are stored in storage/app/. Mount this on persistent storage if using containers.
Environment Variables
| Variable | Description | Example |
|---|---|---|
APP_ENV | Environment | production |
APP_URL | Public URL | https://app.example.com |
APP_DEBUG | Debug mode (disable in production) | false |
DB_HOST | PostgreSQL host | 127.0.0.1 |
DB_DATABASE | Database name | gaeld |
DB_USERNAME | DB user | gaeld |
DB_PASSWORD | DB password | … |
REDIS_HOST | Redis host | 127.0.0.1 |
CACHE_STORE | Cache backend | redis |
QUEUE_CONNECTION | Queue backend | redis |
SCOUT_DRIVER | Search driver | meilisearch |
MEILISEARCH_HOST | MeiliSearch URL | http://127.0.0.1:7700 |
MEILISEARCH_KEY | MeiliSearch master key | your-master-key |
MAIL_MAILER | Mail driver | smtp or mailgun |
MAIL_FROM_ADDRESS | Sender address | noreply@example.com |
FEATURE_BANK_SYNC | Enable bank sync (SaaS/EE) | true |
FEATURE_AUTOMATION | Enable rule engine | true |
FEATURE_API_ACCESS | Enable REST API | true |
FEATURE_MCP_ACCESS | Enable optional read-only MCP; also requires API access | false |
FEATURE_AUTO_RECONCILIATION | Enable auto-reconciliation | true |
FEATURE_MULTI_CURRENCY | Enable multi-currency features | true |
FEATURE_RULE_ENGINE | Enable accounting automation rules | true |
FEATURE_ADVANCED_PERMISSIONS | Enable advanced role permissions | true |
PLUGINS_ENABLED | Enable plugin system | true |
TESSERACT_BINARY | Absolute path to tesseract binary | /usr/bin/tesseract |
TESSERACT_LANG | OCR language(s) for receipt scanning | deu+fra+eng |
Updating
After pulling a new release:
cd /var/www/gaeld
git pull
composer install --no-dev --optimize-autoloader
pnpm install && pnpm run build
php artisan gaeld:update
systemctl restart gaeld-worker
gaeld:update runs pending migrations, clears caches, and restarts queues safely.
Backups
Back up:
- PostgreSQL database:
pg_dump gaeld > gaeld_$(date +%F).sql - Storage directory:
storage/app/(contains generated PDFs and uploads) .envfile: store securely outside the web root
Consider a daily cron job and off-site replication for production environments.