Skip to main content

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​

ComponentMinimum version
PHP8.4
PostgreSQL15
Redis7
MeiliSearchLatest
Nginx (or Caddy)—
Node.js (build only)20 + pnpm
Tesseract OCR4.0+

A single VPS with 2 vCPU, 2 GB RAM, and 20 GB SSD is sufficient for most small organisations.

MeiliSearch is optional

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.

Tesseract OCR is optional

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:

ServicePort
Gäld (PHP + Nginx)8080
PostgreSQL 15+5432
Redis 76379
MeiliSearch7700
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​

VariableDescriptionExample
APP_ENVEnvironmentproduction
APP_URLPublic URLhttps://app.example.com
APP_DEBUGDebug mode (disable in production)false
DB_HOSTPostgreSQL host127.0.0.1
DB_DATABASEDatabase namegaeld
DB_USERNAMEDB usergaeld
DB_PASSWORDDB password…
REDIS_HOSTRedis host127.0.0.1
CACHE_STORECache backendredis
QUEUE_CONNECTIONQueue backendredis
SCOUT_DRIVERSearch drivermeilisearch
MEILISEARCH_HOSTMeiliSearch URLhttp://127.0.0.1:7700
MEILISEARCH_KEYMeiliSearch master keyyour-master-key
MAIL_MAILERMail driversmtp or mailgun
MAIL_FROM_ADDRESSSender addressnoreply@example.com
FEATURE_BANK_SYNCEnable bank sync (SaaS/EE)true
FEATURE_AUTOMATIONEnable rule enginetrue
FEATURE_API_ACCESSEnable REST APItrue
FEATURE_MCP_ACCESSEnable optional read-only MCP; also requires API accessfalse
FEATURE_AUTO_RECONCILIATIONEnable auto-reconciliationtrue
FEATURE_MULTI_CURRENCYEnable multi-currency featurestrue
FEATURE_RULE_ENGINEEnable accounting automation rulestrue
FEATURE_ADVANCED_PERMISSIONSEnable advanced role permissionstrue
PLUGINS_ENABLEDEnable plugin systemtrue
TESSERACT_BINARYAbsolute path to tesseract binary/usr/bin/tesseract
TESSERACT_LANGOCR language(s) for receipt scanningdeu+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:

  1. PostgreSQL database: pg_dump gaeld > gaeld_$(date +%F).sql
  2. Storage directory: storage/app/ (contains generated PDFs and uploads)
  3. .env file: store securely outside the web root

Consider a daily cron job and off-site replication for production environments.