How to Self-Host IHateMoney with Docker Compose

What Is IHateMoney?

IHateMoney is a self-hosted web app for tracking shared expenses in groups. Add who paid what, and it calculates who owes whom and the minimum number of transactions to settle up. It replaces Splitwise for roommates, travel groups, or anyone splitting costs — without giving a third party access to your spending data.

Official site: ihatemoney.org

Prerequisites

  • A Linux server (Ubuntu 22.04+ recommended)
  • Docker and Docker Compose installed (guide)
  • 128 MB of free RAM
  • A domain name (optional, for remote access)

Docker Compose Configuration

Create a docker-compose.yml file:

services:
  ihatemoney:
    image: ihatemoney/ihatemoney:7.0.1
    container_name: ihatemoney
    restart: unless-stopped
    ports:
      - "8000:8000"
    volumes:
      - ihatemoney_data:/database
      - ./ihatemoney.cfg:/etc/ihatemoney/ihatemoney.cfg:ro
    environment:
      - IHATEMONEY_SETTINGS_FILE_PATH=/etc/ihatemoney/ihatemoney.cfg
    networks:
      - ihatemoney

networks:
  ihatemoney:

volumes:
  ihatemoney_data:

Create the configuration file ihatemoney.cfg:

# IHateMoney configuration
SECRET_KEY = "change-this-to-a-random-secret-string"
SQLALCHEMY_DATABASE_URI = "sqlite:////database/ihatemoney.db"
ALLOW_PUBLIC_PROJECT_CREATION = True
ADMIN_PASSWORD = "change-this-admin-password"

Before starting:

  • Generate SECRET_KEY with: python3 -c "import secrets; print(secrets.token_hex(32))"
  • Set ADMIN_PASSWORD to a strong password (hashed with ihatemoney generate_password_hash or set plaintext — the app hashes it on first use)
  • Set ALLOW_PUBLIC_PROJECT_CREATION to False if you want only admins to create projects

Start the stack:

docker compose up -d

Initial Setup

  1. Open http://your-server-ip:8000 in your browser
  2. Click “Create a project” (or “Login” if you have one)
  3. Enter a project name, password, and contact email
  4. Add members to the project
  5. Start logging expenses — select who paid, how much, and who benefits

Each project has its own password. Share the project URL and password with group members. No individual user accounts needed.

Configuration

SettingDefaultWhat It Does
SECRET_KEY(none)Flask session encryption — required
ALLOW_PUBLIC_PROJECT_CREATIONTrueWhether anyone can create projects
ADMIN_PASSWORD(none)Password for the admin panel at /admin
SQLALCHEMY_DATABASE_URISQLiteDatabase connection string
DEFAULT_CURRENCYXXXDefault currency for new projects (e.g., USD, EUR)

Using PostgreSQL Instead of SQLite

For multi-user deployments, PostgreSQL is more reliable:

services:
  ihatemoney:
    image: ihatemoney/ihatemoney:7.0.1
    container_name: ihatemoney
    restart: unless-stopped
    ports:
      - "8000:8000"
    volumes:
      - ./ihatemoney.cfg:/etc/ihatemoney/ihatemoney.cfg:ro
    depends_on:
      postgres:
        condition: service_healthy
    networks:
      - ihatemoney

  postgres:
    image: postgres:16-alpine
    container_name: ihatemoney-db
    restart: unless-stopped
    environment:
      POSTGRES_USER: ihatemoney
      POSTGRES_PASSWORD: change_this_strong_password
      POSTGRES_DB: ihatemoney
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ihatemoney"]
      interval: 10s
      timeout: 5s
      retries: 5
    networks:
      - ihatemoney

volumes:
  postgres_data:

networks:
  ihatemoney:

Update ihatemoney.cfg:

SQLALCHEMY_DATABASE_URI = "postgresql://ihatemoney:change_this_strong_password@postgres/ihatemoney"

Reverse Proxy

Example Nginx Proxy Manager configuration:

FieldValue
Domainsplit.yourdomain.com
Schemehttp
Forward Hostihatemoney
Forward Port8000
SSLRequest a new certificate

For more options: Reverse Proxy Setup

Backup

With SQLite (default):

docker cp ihatemoney:/database/ihatemoney.db ./ihatemoney-backup-$(date +%Y%m%d).db

With PostgreSQL:

docker exec ihatemoney-db pg_dump -U ihatemoney ihatemoney > ihatemoney_backup.sql

For automated backup strategies: Backup Strategy

Troubleshooting

”Internal Server Error” on First Access

Symptom: 500 error after starting the container.

Fix: Check that ihatemoney.cfg is properly mounted and SECRET_KEY is set. View logs:

docker logs ihatemoney

Projects Not Saving

Symptom: Created projects disappear after container restart.

Fix: Ensure the /database volume is properly mapped. Without persistent storage, SQLite data is lost on restart.

Cannot Create Projects (Button Missing)

Symptom: Homepage shows login but no “Create a project” link.

Fix: Set ALLOW_PUBLIC_PROJECT_CREATION = True in ihatemoney.cfg, or create projects from the admin panel at /admin.

Resource Requirements

ResourceUsage
RAM~30-50 MB
CPUVery low
DiskNegligible

IHateMoney is extremely lightweight. It runs comfortably on a Raspberry Pi alongside other services.

Verdict

IHateMoney does one thing well: split expenses in groups. The project-based model (shared password, no individual accounts) makes it dead simple to set up for a trip, shared apartment, or event. It lacks budgeting, investment tracking, or bank syncing — those aren’t its job. For group expense splitting, it’s the best self-hosted option. For personal budgeting, use Actual Budget. For full financial tracking, use Firefly III.

FAQ

How does IHateMoney compare to Splitwise?

IHateMoney handles the core use case — tracking who paid what and calculating settlement — without requiring individual user accounts. Splitwise has mobile apps, friend lists, and simplify-debt algorithms, but IHateMoney is self-hosted, free, and keeps your spending data private. For group expense splitting without a SaaS dependency, IHateMoney is sufficient.

Does IHateMoney require individual user accounts?

No. IHateMoney uses a project-based model. Each project has its own password shared among group members. Anyone with the project URL and password can add expenses and view balances. There are no per-user accounts — this is simpler but less secure than role-based access.

Can I use IHateMoney for multi-currency trips?

Yes. Set the default currency per project in the configuration, and individual expenses can be entered in different currencies. IHateMoney handles currency conversion when calculating settlements, though exchange rates must be entered manually.

Is IHateMoney suitable for ongoing household expenses?

Yes. Create a persistent project for your household. Members add expenses as they occur — groceries, utilities, shared subscriptions. IHateMoney tracks the running balance and shows the minimum number of transactions to settle up. It works for both one-time trips and ongoing shared living.

Can I export expense data from IHateMoney?

Yes. IHateMoney supports JSON and CSV exports per project. Access the export from the project settings page. This is useful for record-keeping or migrating data.

How lightweight is IHateMoney compared to Firefly III?

Extremely. IHateMoney uses ~30-50 MB of RAM with SQLite — roughly 1/10th of Firefly III. It runs on a Raspberry Pi without issue. The trade-off: IHateMoney only tracks shared expenses, while Firefly III is a full personal finance manager with budgeting, bank syncing, and reports.

Comments