ghostfolio/ghostfolio: Open Source Wealth Management with Angular + NestJS
Managing personal investments across multiple brokers, exchanges, and asset classes creates a persistent data fragmentation problem. Developers who trade stocks, ETFs, and cryptocurrencies often resort to spreadsheets or closed-source platforms that compromise privacy and data ownership. ghostfolio/ghostfolio addresses this directly: it is an open-source wealth management application built with modern web technology, designed for continuous self-hosted operation, and licensed under AGPL v3.
With 8,959 GitHub stars and an active development cycle (last commit July 14, 2026), Ghostfolio has matured into a credible alternative to proprietary portfolio trackers. The focus keyword ghostfolio/ghostfolio represents both the repository and the growing ecosystem around personal financial tooling for technically capable users.
What is ghostfolio/ghostfolio?
Ghostfolio is an open-source wealth management software application built with TypeScript and organized as an Nx monorepo workspace. It is maintained by the Ghostfolio organization and designed explicitly for personal use in continuous operation—not as a multi-tenant SaaS, but as a private instance controlled by its owner.
The project sits at the intersection of several technical categories: personal finance software, portfolio analytics tools, and self-hosted web applications. Its relevance stems from three converging trends: increasing developer interest in data sovereignty, the maturation of the Angular/NestJS/Prisma stack for full-stack TypeScript applications, and growing skepticism toward closed-source financial platforms following high-profile custodial failures.
The repository's statistics reflect steady organic growth: 8,959 stars, 1,224 forks, and a primary codebase in TypeScript under the GNU Affero General Public License v3.0. The AGPL choice is significant—it ensures that hosted modifications remain open, aligning with the project's privacy-first ethos. The maintainers fund ongoing development through Ghostfolio Premium, a managed cloud offering, while keeping the core software freely available.
Key Features
Ghostfolio's feature set targets the operational realities of multi-platform investors rather than speculative traders. The implementation reflects deliberate technical choices:
Transaction Management: Full CRUD operations for activities across asset classes. The system supports stocks, ETFs, and cryptocurrencies with proper handling of fees, dividends, interest, and liabilities—not just simple buy/sell pairs.
Multi-Account Architecture: Users can track holdings across multiple brokers or exchanges within a unified view, solving the fragmentation problem without manual consolidation.
Performance Analytics: Return on Average Investment (ROAI) calculations across multiple time horizons—Today, WTD, MTD, YTD, 1Y, 5Y, and Max. This metric choice (ROAI over simple ROI) indicates attention to the timing and scale of capital deployment.
Portfolio Composition Analysis: Static analysis identifies concentration risks and diversification gaps. This goes beyond visualization to actual risk identification.
Data Portability: Import and export functionality prevents lock-in, a core requirement for privacy-conscious users.
Progressive Web App: Mobile-first design with PWA capabilities, dark mode, and a "Zen Mode" for reduced-distraction viewing. The Angular Material + Bootstrap utility-class frontend delivers responsive interfaces without heavy custom CSS.
Self-Hosting Infrastructure: Official Docker↗ Bright Coding Blog images for linux/amd64, linux/arm/v7, and linux/arm64, with explicit support for home server systems including CasaOS, Home Assistant, Runtipi, TrueCharts, Umbrel, and Unraid.
Use Cases
Cross-Platform Buy-and-Hold Investors: The primary target user trades across multiple platforms—perhaps a 401(k) at one broker, a taxable account at another, and crypto on a separate exchange. Ghostfolio aggregates these without requiring API access to each provider, using manual or bulk-imported transaction data.
Privacy-Focused Technologists: Users who reject cloud-based portfolio trackers due to data mining concerns or regulatory jurisdiction issues. Self-hosting on home infrastructure (Raspberry Pi, NAS, or VPS) keeps financial data under direct control.
Financial Independence Trackers: The ROAI metrics and long-term performance views support FIRE (Financial Independence, Retire Early) practitioners monitoring progress toward sustainability targets.
Minimalist Spreadsheet Replacements: Users who have outgrown spreadsheet-based tracking but find commercial alternatives bloated with features they don't need. The "Zen Mode" and clean Angular Material interface support this use case explicitly.
Home Lab Enthusiasts: The broad home server system support and ARM architecture images make Ghostfolio a natural addition to existing self-hosted service stacks, alongside tools like [INTERNAL_LINK: home-server-software].
Installation & Setup
Ghostfolio provides two Docker Compose paths: using pre-built images from Docker Hub, or building locally. Both require basic Docker knowledge and a local clone of the repository.
Prerequisites
- Docker installed (Docker Desktop or engine)
- Git clone of
https://github.com/ghostfolio/ghostfolio - Copy
.env.exampleto.envand populate with your values:
cp .env.example .env
Option A: Run Pre-built Images
# Start containers from published Docker Hub images
docker compose -f docker/docker-compose.yml up -d
This pulls ghostfolio/ghostfolio and dependencies (PostgreSQL↗ Bright Coding Blog, Redis) and starts them in detached mode.
Option B: Build Locally
# Build images from source
docker compose -f docker/docker-compose.build.yml build
# Start built containers
docker compose -f docker/docker-compose.build.yml up -d
Use this path if you need custom modifications or are running on an architecture not covered by published images.
Initial Configuration
After containers start, open http://localhost:3333 and create the first user via Get Started. This first user receives ADMIN role automatically.
Critical Environment Variables
| Variable | Purpose |
|---|---|
DATABASE_URL |
PostgreSQL connection string (use pooled URL if behind connection pooler) |
DIRECT_URL |
Direct PostgreSQL URL for Prisma CLI migrations (bypasses poolers) |
JWT_SECRET_KEY |
Random string for JSON Web Token signing |
ACCESS_TOKEN_SALT |
Random salt for access token generation |
REDIS_HOST / REDIS_PORT / REDIS_PASSWORD |
Redis caching layer configuration |
ROOT_URL |
Application URL for callbacks and external links (default: http://0.0.0.0:3333) |
Upgrades
# If using explicit version tag: update docker/docker-compose.yml
# If using :latest tag:
docker compose -f docker/docker-compose.yml pull
# Restart with new image
docker compose -f docker/docker-compose.yml up -d
Database migrations apply automatically on container startup.
Real Code Examples
The Ghostfolio README documents several API interactions. These examples use the actual endpoints and payload structures as specified.
Bearer Token Authentication
Before accessing protected endpoints, obtain a Bearer token:
# POST to anonymous auth endpoint with your account's security token
curl -X POST http://localhost:3333/api/v1/auth/anonymous \
-H "Content-Type: application/json" \
-d '{"accessToken": "<INSERT_SECURITY_TOKEN_OF_ACCOUNT>"}'
The response contains the JWT Bearer token for subsequent requests. The README notes that the previous GET endpoint for this purpose is deprecated.
Importing Activities via API
Bulk transaction import enables migration from other systems or automated ingestion:
curl -X POST http://localhost:3333/api/v1/import \
-H "Authorization: Bearer eyJh..." \
-H "Content-Type: application/json" \
-d '{
"activities": [
{
"currency": "USD",
"dataSource": "YAHOO",
"date": "2021-09-15T00:00:00.000Z",
"fee": 19,
"quantity": 5,
"symbol": "MSFT",
"type": "BUY",
"unitPrice": 298.58
}
]
}'
Key fields: dataSource specifies the price feed (YAHOO, COINGECKO, MANUAL, or GHOSTFOLIO for premium data); type accepts BUY, DIVIDEND, FEE, INTEREST, LIABILITY, or SELL. The API returns 201 Created on success or 400 Bad Request with duplicate detection messages.
Public Portfolio Endpoint (No Auth Required)
For sharing performance without exposing holdings detail:
# Access ID configured in My Ghostfolio > Access tab with Public permission
curl http://localhost:3333/api/v1/public/<INSERT_ACCESS_ID>/portfolio
Response structure:
{
"performance": {
"1d": { "relativeChange": 0.012 },
"ytd": { "relativeChange": 0.085 },
"max": { "relativeChange": 0.340 }
}
}
Values are normalized from -1 to 1, suitable for direct percentage conversion.
Updating Asset Profile Data (Admin Only)
Override or enrich metadata for specific securities:
curl -X PATCH http://localhost:3333/api/v1/asset-profiles/YAHOO/MSFT \
-H "Authorization: Bearer eyJh..." \
-H "Content-Type: application/json" \
-d '{
"countries": [{"code": "US", "weight": 1}],
"sectors": [{"name": "Technology", "weight": 1}]
}'
This endpoint supports manual correction of geographic or sectoral classifications when automated data sources are incomplete or inaccurate.
Advanced Usage & Best Practices
Connection Pooling Considerations: The separation of DATABASE_URL (pooled, for application) and DIRECT_URL (unpooled, for Prisma migrations) reflects real-world PostgreSQL deployment patterns. If using PgBouncer or similar, misconfiguring this causes migration failures that appear as permission errors.
Redis as Cache vs. Session Store: The README specifies Redis for caching. In high-frequency update scenarios (e.g., automated imports), monitor Redis memory usage and configure appropriate eviction policies.
OIDC Integration (Experimental): For organizations or advanced users wanting centralized authentication, the experimental OpenID Connect support enables integration with existing identity providers. The discovery-based configuration (OIDC_ISSUER with /.well-known/openid-configuration) reduces manual endpoint configuration but requires careful OIDC_CALLBACK_URL alignment with ROOT_URL.
Rate Limiting Behind Proxies: The TRUST_PROXY setting directly impacts Express.js rate limiting accuracy. Set to 1 for single reverse proxy (common in Docker Compose with Traefik or Nginx), or match your proxy chain depth.
Data Provider API Keys: CoinGecko Demo vs. Pro keys affect rate limits and data freshness. The optional configuration suggests the application functions without them (likely with reduced capabilities or built-in fallbacks), but production instances benefit from registered keys.
Comparison with Alternatives
| Feature | Ghostfolio | GnuCash | Firefly III |
|---|---|---|---|
| Primary Focus | Investment portfolio tracking | General accounting | Personal finance management |
| Tech Stack | Angular + NestJS + Prisma | C + Scheme | PHP↗ Bright Coding Blog + Laravel↗ Bright Coding Blog |
| Real-time Quotes | Yes (via YAHOO/COINGECKO) | Manual entry | Limited plugins |
| Self-hosting | Docker-first, ARM support | Native packages | Docker available |
| Mobile Experience | PWA, mobile-first | Desktop-oriented | Responsive web |
| License | AGPL v3 | GPL v2+ | AGPL v3 |
| Crypto Support | First-class | Manual tracking | Via tags/hacks |
GnuCash offers superior double-entry accounting but lacks modern web architecture and real-time market data integration. Firefly III excels at budgeting and expense tracking but treats investments as secondary. Ghostfolio occupies a specific niche: technically proficient users prioritizing investment performance analytics over general ledger functionality, who want a contemporary TypeScript stack they can extend.
FAQ
Is ghostfolio/ghostfolio free for commercial use? The AGPL v3 license permits commercial use but requires source disclosure for network use. For proprietary deployment without source release, contact the maintainers.
Can I run Ghostfolio without Docker?
The README documents Docker as the primary path. Manual installation requires following DEVELOPMENT.md for environment setup; production without containers is not explicitly supported.
What database migrations are required on upgrade?
None manually—the container auto-applies Prisma migrations on startup. Ensure DIRECT_URL bypasses poolers for this to function.
Does Ghostfolio support real-time trading or order execution? No. It is a portfolio tracking and analytics tool, not a trading platform.
How does Ghostfolio Premium differ from self-hosted? Premium is the managed cloud offering with professional data providers and no infrastructure maintenance. Revenue funds open-source development.
Is the public API stable? Endpoints marked "experimental" (health check, portfolio, asset profile updates) may change. The import endpoint and anonymous auth are documented without experimental status.
Can I contribute without deep financial domain knowledge?
Yes—the maintainers tag good first issue and help wanted items, including UI improvements and documentation.
Conclusion
ghostfolio/ghostfolio delivers a technically sound, privacy-respecting portfolio management solution for developers and technically capable investors. Its Angular/NestJS/Prisma architecture demonstrates production-grade patterns for full-stack TypeScript applications, while the Docker-first deployment and ARM support acknowledge real-world self-hosting constraints.
The tool best serves buy-and-hold investors across multiple platforms who value data ownership over convenience, and who possess the infrastructure skills to maintain a PostgreSQL/Redis stack. It does not replace general accounting software or active trading platforms, nor does it attempt to.
For those matching this profile, the repository at https://github.com/ghostfolio/ghostfolio provides source code, issue tracking, and contribution guidelines. The live demo at ghostfol.io offers immediate exploration without installation commitment. Whether as a spreadsheet replacement or a home lab addition, Ghostfolio represents a mature, licensable alternative to closed-source financial data aggregators.