Self-Hosting
So betreibst du Financer auf deinem eigenen Server mit Docker.
How to run Financer on your own server using Docker.
VoraussetzungenPrerequisites
- Docker und Docker Compose installiertDocker and Docker Compose installed
- Linux-Server (Ubuntu, Debian o.ä.)A Linux server (Ubuntu, Debian, etc.)
- Optional: eine Domain und Nginx als Reverse ProxyOptional: a domain and Nginx as a reverse proxy
Quick Start
Repo klonen, .env-Datei anlegen und starten:
Clone the repo, create a .env file, and start:
git clone https://github.com/GetFinancer/financer.git cd financer # .env anlegen / create .env echo "SESSION_SECRET=$(openssl rand -base64 32)" >> .env echo "ADMIN_TOKEN=$(openssl rand -base64 32)" >> .env # Starten / Start docker compose -f docker-compose.selfhosted.yml up -d
Die App ist danach unter http://localhost:3000 erreichbar.
The app is then available at http://localhost:3000.
UmgebungsvariablenEnvironment Variables
Alle Variablen werden in der .env-Datei im Projektverzeichnis gesetzt.
All variables are set in the .env file in the project directory.
| Variable | PflichtRequired | Default | BeschreibungDescription |
|---|---|---|---|
SESSION_SECRET |
JaYes | — | Secret für Session-Verschlüsselung. Generieren: openssl rand -base64 32Secret for session encryption. Generate: openssl rand -base64 32 |
ADMIN_TOKEN |
NeinNo | — | Token für den Zugang zum Admin Panel unter /adminToken for access to the Admin Panel at /admin |
DEPLOYMENT_MODE |
NeinNo | selfhosted |
selfhosted (Single-Tenant) oder cloudhost (Multi-Tenant)selfhosted (single-tenant) or cloudhost (multi-tenant) |
DEFAULT_TENANT |
NeinNo | default |
Tenant-Name im selfhosted-ModusTenant name in selfhosted mode |
DATA_DIR |
NeinNo | /app/data |
Verzeichnis für SQLite-Datenbanken (im Container)Directory for SQLite databases (inside container) |
WEB_PORT |
NeinNo | 3000 |
Port für das Web-FrontendPort for the web frontend |
API_PORT |
NeinNo | 4000 |
Port für die APIPort for the API |
BASE_DOMAIN |
NeinNo | — | Basis-Domain für Subdomain-Routing im cloudhost-ModusBase domain for subdomain routing in cloudhost mode |
SMTP_HOST |
NeinNo | — | SMTP-Server für Passwort-Reset-E-Mails (z.B. smtp.gmail.com)SMTP server for password reset emails (e.g. smtp.gmail.com) |
SMTP_PORT |
NeinNo | 587 |
SMTP-Port (587 für STARTTLS, 465 für SSL)SMTP port (587 for STARTTLS, 465 for SSL) |
SMTP_USER |
NeinNo | — | SMTP-Benutzername / E-Mail-AdresseSMTP username / email address |
SMTP_PASS |
NeinNo | — | SMTP-Passwort oder App-PasswortSMTP password or app password |
SMTP_FROM |
NeinNo | = SMTP_USER= SMTP_USER | Absender-Adresse für ausgehende E-MailsSender address for outgoing emails |
APP_URL |
NeinNo | — | URL der App — wird in Passwort-Reset-E-Mails verlinktApp URL — linked in password reset emails |
Hinweis: Ohne SMTP-Konfiguration ist der Passwort-Reset durch den Administrator nicht verfügbar.
Note: Without SMTP configuration, password reset by the administrator is not available.
DatenverzeichnisData Directory
Alle Daten liegen im ./data-Verzeichnis auf dem Host:
All data is stored in the ./data directory on the host:
data/
├── _registry/
│ └── registry.db # Tenant-Registrierung / tenant registry
└── {tenant-name}/
└── financer.db # Tenant-Datenbank / tenant database
Berechtigungen: Das Verzeichnis muss vom Container-User (UID 1001) beschreibbar sein:
Permissions: The directory must be writable by the container user (UID 1001):
chown -R 1001:65533 ./data
Backup
Container stoppen, Datenverzeichnis kopieren, neu starten:
Stop containers, copy the data directory, restart:
docker compose down cp -r ./data ./data_backup_$(date +%Y%m%d) docker compose -f docker-compose.selfhosted.yml up -d
Ein Backup während des Betriebs ist ebenfalls möglich — SQLite-Dateien können sicher kopiert werden, solange die Datei nicht gerade gespeichert wird.
Backup while running is also possible — SQLite files can be safely copied as long as they are not actively being written.
Update
git pull docker compose -f docker-compose.selfhosted.yml up -d --build