MCPcopy Index your code
hub / github.com/ghostfolio/ghostfolio

github.com/ghostfolio/ghostfolio @3.20.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 3.20.0 ↗ · + Follow
2,788 symbols 6,974 edges 792 files 16 documented · 1% updated today3.21.0 · 2026-07-05★ 8,901179 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Ghostfolio logo

Ghostfolio

Open Source Wealth Management Software

Ghostfol.io | Live Demo | Ghostfolio Premium | FAQ | Blog | LinkedIn | Slack | X

Shield: Buy me a coffee Shield: Contributions Welcome Shield: Docker Pulls Shield: License: AGPL v3

Ghostfolio is an open source wealth management software built with web technology. The application empowers busy people to keep track of stocks, ETFs or cryptocurrencies and make solid, data-driven investment decisions. The software is designed for personal use in continuous operation.

Preview image of the Ghostfolio video trailer

Ghostfolio Premium

Our official Ghostfolio Premium cloud offering is the easiest way to get started. Due to the time it saves, this will be the best option for most people. Revenue is used to cover operational costs for the hosting infrastructure and professional data providers, and to fund ongoing development.

If you prefer to run Ghostfolio on your own infrastructure, please find further instructions in the Self-hosting section.

Why Ghostfolio?

Ghostfolio is for you if you are...

  • 💼 trading stocks, ETFs or cryptocurrencies on multiple platforms
  • 🏦 pursuing a buy & hold strategy
  • 🎯 interested in getting insights of your portfolio composition
  • 👻 valuing privacy and data ownership
  • 🧘 into minimalism
  • 🧺 caring about diversifying your financial resources
  • 🆓 interested in financial independence
  • 🙅 saying no to spreadsheets
  • 😎 still reading this list

Features

  • ✅ Create, update and delete transactions
  • ✅ Multi account management
  • ✅ Portfolio performance: Return on Average Investment (ROAI) for Today, WTD, MTD, YTD, 1Y, 5Y, Max
  • ✅ Various charts
  • ✅ Static analysis to identify potential risks in your portfolio
  • ✅ Import and export transactions
  • ✅ Dark Mode
  • ✅ Zen Mode
  • ✅ Progressive Web App (PWA) with a mobile-first design

Image of a phone showing the Ghostfolio app open

Technology Stack

Ghostfolio is a modern web application written in TypeScript and organized as an Nx workspace.

Backend

The backend is based on NestJS using PostgreSQL as a database together with Prisma and Redis for caching.

Frontend

The frontend is built with Angular and uses Angular Material with utility classes from Bootstrap.

Self-hosting

We provide official container images hosted on Docker Hub for linux/amd64, linux/arm/v7 and linux/arm64.

Buy me a coffee button

Supported Environment Variables

Name Type Default Value Description
ACCESS_TOKEN_SALT string A random string used as salt for access tokens
API_KEY_COINGECKO_DEMO string (optional)   The CoinGecko Demo API key
API_KEY_COINGECKO_PRO string (optional) The CoinGecko Pro API key
DATABASE_URL string The database connection URL. If using a connection pooler, use the pooled connection URL here. e.g. postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}
DIRECT_URL string (optional) The direct database connection URL used by the Prisma CLI (e.g. for schema migrations) and seeding, bypassing any connection poolers (falls back to DATABASE_URL)
ENABLE_FEATURE_AUTH_TOKEN boolean (optional) true Enables authentication via security token
HOST string (optional) 0.0.0.0 The host where the Ghostfolio application will run on
JWT_SECRET_KEY string A random string used for JSON Web Tokens (JWT)
LOG_LEVELS string[] (optional) The logging levels for the Ghostfolio application, e.g. ["debug","error","log","warn"]
PORT number (optional) 3333 The port where the Ghostfolio application will run on
POSTGRES_DB string The name of the PostgreSQL database
POSTGRES_PASSWORD string The password of the PostgreSQL database
POSTGRES_USER string The user of the PostgreSQL database
REDIS_DB number (optional) 0 The database index of Redis
REDIS_HOST string The host where Redis is running
REDIS_PASSWORD string The password of Redis
REDIS_PORT number The port where Redis is running
REQUEST_TIMEOUT number (optional) 2000 The timeout of network requests to data providers in milliseconds
ROOT_URL string (optional) http://0.0.0.0:3333 The root URL of the Ghostfolio application, used for generating callback URLs and external links.

OpenID Connect OIDC (experimental)

Name Type Default Value Description
ENABLE_FEATURE_AUTH_OIDC boolean (optional) false Enables authentication via OpenID Connect
OIDC_AUTHORIZATION_URL string (optional) Manual override for the OIDC authorization endpoint (falls back to the discovery from the issuer)
OIDC_CALLBACK_URL string (optional) ${ROOT_URL}/api/auth/oidc/callback The OIDC callback URL
OIDC_CLIENT_ID string The OIDC client ID
OIDC_CLIENT_SECRET string The OIDC client secret
OIDC_ISSUER string The OIDC issuer URL, used to discover the OIDC configuration via /.well-known/openid-configuration
OIDC_SCOPE string[] (optional) ["openid"] The OIDC scope to request, e.g. ["email","openid","profile"]
OIDC_TOKEN_URL string (optional) Manual override for the OIDC token endpoint (falls back to the discovery from the issuer)
OIDC_USER_INFO_URL string (optional) Manual override for the OIDC user info endpoint (falls back to the discovery from the issuer)

Run with Docker Compose

Prerequisites

  • Basic knowledge of Docker
  • Installation of Docker
  • Create a local copy of this Git repository (clone)
  • Copy the file .env.example to .env and populate it with your data (cp .env.example .env)

a. Run environment

Run the following command to start the Docker images from Docker Hub:

docker compose -f docker/docker-compose.yml up -d

b. Build and run environment

Run the following commands to build and start the Docker images:

docker compose -f docker/docker-compose.build.yml build
docker compose -f docker/docker-compose.build.yml up -d

Setup

  1. Open http://localhost:3333 in your browser
  2. Create a new user via Get Started (this first user will get the role ADMIN)

Upgrade Version

  1. Update the Ghostfolio Docker image
  2. Increase the version of the ghostfolio/ghostfolio Docker image in docker/docker-compose.yml
  3. Run the following command if ghostfolio:latest is set: bash docker compose -f docker/docker-compose.yml pull

  4. Run the following command to start the new Docker image: bash docker compose -f docker/docker-compose.yml up -d The container will automatically apply any required database schema migrations during startup.

Home Server Systems (Community)

Ghostfolio is available for various home server systems, including CasaOS, Home Assistant, Runtipi, TrueCharts, Umbrel, and Unraid.

Development

For detailed information on the environment setup and development process, please refer to DEVELOPMENT.md.

Public API

Authorization: B

Extension points exported contracts — how you extend this code

DataEnhancerInterface (Interface)
(no doc) [6 implementers]
apps/api/src/services/data-provider/interfaces/data-enhancer.interface.ts
CreateWatchlistItemDialogParams (Interface)
(no doc)
apps/client/src/app/components/home-watchlist/create-watchlist-item-dialog/interfaces/interfaces.ts
VerticalHoverLinePluginOptions (Interface)
(no doc)
libs/ui/src/lib/chart/chart.registry.ts
InternalRoute (Interface)
(no doc)
libs/common/src/lib/routes/interfaces/internal-route.interface.ts
DataProviderInterface (Interface)
(no doc) [14 implementers]
apps/api/src/services/data-provider/interfaces/data-provider.interface.ts
DataProviderStatus (Interface)
(no doc)
apps/client/src/app/components/data-provider-status/interfaces/interfaces.ts
PluginOptionsByType (Interface)
(no doc)
libs/ui/src/lib/chart/chart.registry.ts
PublicRoute (Interface)
(no doc)
libs/common/src/lib/routes/interfaces/public-route.interface.ts

Core symbols most depended-on inside this repo

get
called by 175
apps/client/src/app/services/user/user.service.ts
parseDate
called by 97
libs/common/src/lib/helper.ts
hasPermission
called by 91
libs/common/src/lib/permissions.ts
filter
called by 78
apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts
get
called by 77
apps/api/src/services/property/property.service.ts
getTranslation
called by 76
apps/api/src/services/i18n/i18n.service.ts
get
called by 65
libs/ui/src/lib/mocks/httpClient.mock.ts
HasPermission
called by 64
apps/api/src/decorators/has-permission.decorator.ts

Shape

Method 1,600
Class 833
Interface 220
Function 129
Enum 6

Languages

TypeScript100%

Modules by API surface

libs/ui/src/lib/services/data.service.ts68 symbols
libs/common/src/lib/helper.ts38 symbols
libs/common/src/lib/interfaces/simplewebauthn.interface.ts29 symbols
apps/api/src/app/portfolio/portfolio.service.ts29 symbols
libs/ui/src/lib/services/admin.service.ts25 symbols
libs/ui/src/lib/activities-table/activities-table.component.ts22 symbols
libs/ui/src/lib/assistant/assistant.component.ts21 symbols
apps/client/src/app/pages/portfolio/activities/activities-page.component.ts21 symbols
apps/client/src/app/components/admin-overview/admin-overview.component.ts21 symbols
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts21 symbols
apps/api/src/services/data-provider/eod-historical-data/eod-historical-data.service.ts21 symbols
apps/api/src/services/queues/data-gathering/data-gathering.service.ts19 symbols

Dependencies from manifests, versioned

@angular-devkit/build-angular21.2.6 · 1×
@angular-devkit/core21.2.6 · 1×
@angular-devkit/schematics21.2.6 · 1×
@angular-eslint/eslint-plugin21.2.0 · 1×
@angular-eslint/eslint-plugin-template21.2.0 · 1×
@angular-eslint/template-parser21.2.0 · 1×
@angular/animations21.2.7 · 1×
@angular/cdk21.2.5 · 1×
@angular/cli21.2.6 · 1×
@angular/common21.2.7 · 1×
@angular/compiler21.2.7 · 1×
@angular/compiler-cli21.2.7 · 1×

For agents

$ claude mcp add ghostfolio \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact