Running Ghostfolio: Self-Hosted Portfolio Tracker
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. ...