Tracking investments usually means handing your financial data to apps like Mint, Robinhood, or Yahoo Finance. They know every stock you own, every trade you make, and every dollar in your portfolio. Then they monetize that data.

Ghostfolio is an open-source, self-hosted wealth management app that tracks stocks, ETFs, crypto, and other assets — all on your own server. Beautiful dashboards, real-time quotes, and zero data sharing.

Why Ghostfolio?

  • Privacy — your portfolio data never leaves your server
  • Multi-asset — stocks, ETFs, bonds, crypto, commodities, real estate
  • Real-time quotes — automatic price updates via multiple data providers
  • Portfolio analytics — allocation charts, performance over time, dividends
  • Multi-currency — supports any currency, auto-converts
  • Import/export — CSV import from brokers, full data export
  • Multi-account — track multiple brokerage accounts separately
  • Mobile-friendly — responsive PWA works great on phones
  • Active development — regular releases with new features

Prerequisites

  • Docker and Docker Compose
  • A server with at least 1GB RAM
  • Optional: API key for premium data (free tier works fine for most users)

Installation

Step 1: Create the project directory

mkdir -p ~/ghostfolio && cd ~/ghostfolio

Step 2: Create docker-compose.yml

services:
  ghostfolio:
    image: ghostfolio/ghostfolio:latest
    container_name: ghostfolio
    ports:
      - "127.0.0.1:3333:3333"
    environment:
      DATABASE_URL: postgresql://ghostfolio:${POSTGRES_PASSWORD}@postgres:5432/ghostfolio
      REDIS_HOST: redis
      REDIS_PORT: 6379
      ACCESS_TOKEN_SALT: ${ACCESS_TOKEN_SALT}
      JWT_SECRET_KEY: ${JWT_SECRET_KEY}
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_started
    restart: unless-stopped

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

  redis:
    image: redis:7-alpine
    container_name: ghostfolio-redis
    restart: unless-stopped

volumes:
  postgres-data:

Step 3: Create the .env file

# Generate secrets
cat > .env << EOF
POSTGRES_PASSWORD=$(openssl rand -hex 16)
ACCESS_TOKEN_SALT=$(openssl rand -hex 32)
JWT_SECRET_KEY=$(openssl rand -hex 32)
EOF

Step 4: Start it up

docker compose up -d

Step 5: Access the UI

Open http://your-server-ip:3333 in your browser.

Default admin login:

  • Navigate to http://your-server-ip:3333/en/register
  • Create your account (first user becomes admin)

Adding Your Investments

Manual Entry

  1. Go to Portfolio → Activities
  2. Click Add Activity
  3. Select the type: Buy, Sell, Dividend, Interest, Fee
  4. Search for the asset (e.g., “AAPL”, “VTSAX”, “BTC”)
  5. Enter quantity, price, date, and fee

CSV Import

Most brokers let you export transaction history as CSV. Ghostfolio supports imports from:

  • Interactive Brokers
  • Degiro
  • Swissquote
  • Trading 212
  • Generic CSV format

For the generic format, your CSV needs these columns:

Date,Symbol,Type,Quantity,Unit Price,Fee,Currency,Account
2025-01-15,AAPL,BUY,10,185.50,4.95,USD,Schwab
2025-02-01,VTSAX,BUY,5,110.25,0,USD,Vanguard
2025-03-01,BTC,BUY,0.1,45000,1.50,USD,Coinbase

Go to Portfolio → Activities → Import and upload.

Tracking Crypto

Ghostfolio pulls crypto prices automatically. Just add buy/sell activities with the ticker:

  • BTC — Bitcoin
  • ETH — Ethereum
  • SOL — Solana

Works with thousands of cryptocurrencies via CoinGecko data.

Data Providers

Ghostfolio uses multiple sources for price data:

ProviderCoverageCostSetup
Yahoo FinanceStocks, ETFs, indicesFreeBuilt-in (default)
CoinGeckoCryptoFreeBuilt-in
Financial Modeling PrepStocks, ETFsFree tier availableAPI key needed
EOD Historical DataGlobal stocksPaidAPI key needed
Rapid APIVariousVariesAPI key needed

The free defaults (Yahoo Finance + CoinGecko) cover most use cases. Add premium providers for historical data or exotic assets.

To add an API key:

environment:
  # Add to ghostfolio service
  API_KEY_FINANCIAL_MODELING_PREP: your-api-key-here

Portfolio Dashboard

Once you’ve added activities, the dashboard shows:

Overview

  • Total portfolio value with real-time updates
  • Today’s gain/loss (absolute and percentage)
  • Allocation by asset class (stocks, crypto, bonds, etc.)

Performance

  • Time-weighted return over any period
  • Portfolio value chart (1W, 1M, 3M, 1Y, YTD, Max)
  • Comparison against benchmarks

Holdings

  • Current value of each position
  • Gain/loss per holding
  • Weight in portfolio
  • Sector and country breakdown

Dividends

  • Dividend income timeline
  • Projected annual dividend income
  • Dividend yield per holding

Setting Up HTTPS

For accessing Ghostfolio remotely:

Caddy:

f}inanrceev.eyrosuer_dpormoaxiyn.lcoocmal{host:3333

See our reverse proxy guide for other options.

Important: Always use HTTPS when accessing Ghostfolio remotely. Your financial data deserves encryption.

Multi-User Setup

Ghostfolio supports multiple users — useful for tracking family portfolios separately:

  1. Go to Admin → Users
  2. Create new user accounts
  3. Each user sees only their own portfolio

Automation Tips

Auto-update prices

Ghostfolio updates prices automatically when you open the dashboard. For background updates, set up a cron job:

# Update prices every hour
0 * * * * curl -s http://localhost:3333/api/v1/admin/gather/max

Backup the database

# Daily backup
docker exec ghostfolio-db pg_dump -U ghostfolio ghostfolio > ghostfolio-backup-$(date +%Y%m%d).sql

For a complete backup strategy, see our backup guide.

Ghostfolio vs Alternatives

FeatureGhostfolioActual BudgetFirefly IIIMint/Copilot
Portfolio tracking✅ Excellent⚠️ Basic
Real-time quotes
Crypto support⚠️ Manual
Budget tracking✅ Excellent✅ Excellent
Self-hosted
Performance charts⚠️
Free⚠️

Ghostfolio is for investment tracking. If you need budgeting, check out Actual Budget or Firefly III. Many people run both.

Resource Usage

Ghostfolio is relatively lightweight:

ComponentRAMCPUStorage
Ghostfolio app~150MBLowMinimal
PostgreSQL~100MBLowGrows with data
Redis~10MBMinimalMinimal
Total~260MBLow~500MB base

Runs comfortably on a Raspberry Pi 4 or any small VPS. Check our VPS comparison or mini PC guide for hardware options.

Troubleshooting

Asset not found when searching: Try the full ticker symbol (e.g., “AAPL” not “Apple”). For international stocks, use the exchange suffix (e.g., “BMW.DE” for BMW on Frankfurt).

Prices not updating: Check the admin panel for data provider errors. Yahoo Finance occasionally rate-limits — wait and retry. Consider adding a premium data provider for reliability.

Import fails: Verify CSV format matches expected columns. Dates should be YYYY-MM-DD format. Currency codes must be ISO 4217 (USD, EUR, GBP).

High memory usage: Large portfolios with many years of history can increase PostgreSQL memory. Set shared_buffers in PostgreSQL config if needed.

Security

  • Bind to 127.0.0.1 and use HTTPS via reverse proxy
  • Use strong passwords and unique JWT secrets
  • The database contains sensitive financial data — encrypt backups
  • Review our Docker security guide for container hardening

Conclusion

Ghostfolio gives you a private, beautiful dashboard for your entire investment portfolio. Stocks, ETFs, crypto, bonds — all in one place, all on your hardware.

No ads. No data selling. No “upgrade to premium to see your own net worth.”

Set it up in 10 minutes, import your transactions, and never hand your financial data to a third party again.

Related guides: