Back to articles
Technology Insight

Self-Hosting Ghostfolio on a VPS: The Ultimate Guide to Private, Open-Source Wealth Tracking

May 30, 2026

Introduction to Modern Wealth Tracking

In an era where financial markets move at unprecedented speeds, maintaining a comprehensive overview of your investment portfolio is paramount. Whether you hold traditional equities, exchange-traded funds (ETFs), commodities, or digital assets, tracking your net worth often requires juggling multiple platforms. However, relying on commercial wealth-tracking software comes with a significant trade-off: your financial privacy.

Every transaction, asset balance, and historical performance metric you log on a proprietary platform becomes data stored on someone else's server. For privacy-conscious investors and business professionals, this is a glaring vulnerability. This is where Ghostfolio enters the equation—a lightweight, open-source wealth management platform designed to put you back in control of your financial footprint. By self-hosting Ghostfolio on your own Virtual Private Server (VPS), you combine the analytical power of premium financial software with the absolute security of self-sovereign data ownership.

What is Ghostfolio?

Ghostfolio is a modern, web-based personal finance dashboard focused on anonymity and simplicity. Unlike traditional financial aggregators that require direct linking to your bank accounts via third-party APIs, Ghostfolio operates on a privacy-first model. It allows you to track your holdings, analyze asset allocation, and monitor historical performance without exposing your identity or financial institutions.

Key Features of Ghostfolio

  • Multi-Asset Support: Seamlessly track stocks, ETFs, cryptocurrencies, commodities, and cash accounts in various currencies.
  • Advanced Analytics: Gain insights into your portfolio's diversification, sector exposure, and geographic distribution.
  • Privacy by Design: No tracking scripts, no third-party data sharing, and completely anonymous account creation.
  • Open-Source Transparency: The source code is fully auditable, ensuring no hidden telemetry or backdoors exist.
"Self-hosting your financial infrastructure is not just about cutting subscription costs; it is about establishing data sovereignty over your most sensitive information."

Why Choose a VPS for Self-Hosting?

While it is entirely possible to run Ghostfolio on a local machine or a home network attached storage (NAS) device, utilizing a Virtual Private Server (VPS) offers distinct professional advantages:

  1. High Availability: A VPS ensures your financial dashboard is accessible 24/7 from any device worldwide, backed by enterprise-grade uptime SLAs.
  2. Enhanced Security: Reputable VPS providers operate within secure data centers featuring robust firewall protections and DDoS mitigation.
  3. Performance Stability: Dedicated cloud resources guarantee smooth performance when processing large historical financial datasets or rendering complex analytical charts.

Prerequisites for Deployment

Before initiating the installation process, ensure you have the following components ready:

  • A VPS running a clean installation of a modern Linux distribution (Ubuntu 22.04 LTS or 24.04 LTS is highly recommended).
  • A registered domain name or subdomain (e.g., finance.yourdomain.com) pointed to your VPS IP address via an A record.
  • SSH access to your server with a non-root user possessing sudo privileges.
  • Docker and Docker Compose installed on the host system.

Step-by-Step Installation Guide via Docker Compose

Deploying Ghostfolio using Docker Compose is the most efficient and maintainable method. It encapsulates the application logic and the database environment into isolated containers, simplifying future updates and backups.

Step 1: System Preparation

Connect to your VPS via SSH and update your system packages to their latest versions:

sudo apt update && sudo apt upgrade -y

Next, create a dedicated directory for your Ghostfolio deployment to keep your filesystem organized:

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

Step 2: Configuring the Environment Variables

Ghostfolio utilizes an environment file to manage sensitive configurations such as database passwords and security keys. Create a new file named .env:

nano .env

Populate the file with the following variables, ensuring you replace the placeholder values with secure, randomly generated keys:

# System Configuration
NODE_ENV=production
PORT=3333

# Database Configuration
POSTGRES_USER=ghostfolio
POSTGRES_PASSWORD=YourSecurePasswordHere
POSTGRES_DB=ghostfolio_db

# Security
JWT_SECRET_KEY=YourSuperSecretJWTKeyHere

# Application Settings
INSTANCE_VISIBILITY=PRIVATE
DEFAULT_CURRENCY=USD

Save and exit the editor (Press Ctrl+O, Enter, then Ctrl+X).

Step 3: Creating the Docker Compose Specification

Now, create the docker-compose.yml file which defines the service architecture, combining the Ghostfolio application front-end with a PostgreSQL database container:

nano docker-compose.yml

Paste the following configuration into the file:

version: '3.8'

services:
  ghostfolio-db:
    image: postgres:15-alpine
    container_name: ghostfolio_database
    restart: always
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: ${POSTGRES_DB}
    volumes:
      - ghostfolio_db_data:/var/lib/postgresql/data

  ghostfolio-app:
    image: ghostfolio/ghostfolio:latest
    container_name: ghostfolio_application
    restart: always
    ports:
      - "127.0.0.1:3333:3333"
    environment:
      - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@ghostfolio-db:5432/${POSTGRES_DB}?schema=public
      - JWT_SECRET_KEY=${JWT_SECRET_KEY}
      - INSTANCE_VISIBILITY=${INSTANCE_VISIBILITY}
      - DEFAULT_CURRENCY=${DEFAULT_CURRENCY}
    depends_on:
      - ghostfolio-db

volumes:
  ghostfolio_db_data:

This configuration ensures that the database port is not exposed directly to the public internet, drastically reducing the attack surface of your infrastructure.

Step 4: Launching the Containers

With the configuration files successfully created, initialize the deployment by running the following command in detached mode:

sudo docker compose up -d

Verify that both containers are running optimally by checking their status:

sudo docker compose ps

Securing Your Instance with a Reverse Proxy

To ensure your financial data is encrypted in transit, it is critical to configure a reverse proxy such as Nginx combined with an SSL certificate from Let's Encrypt. This prevents third parties from eavesdropping on your traffic when accessing your dashboard over public networks.

Installing Nginx and Certbot

Install the Nginx web server along with the Certbot utility for automated SSL management:

sudo apt install nginx certbot python3-certbot-nginx -y

Configuring Nginx

Create a new server block configuration for Ghostfolio:

sudo nano /etc/nginx/sites-available/ghostfolio

Insert the configuration block below, replacing finance.yourdomain.com with your actual domain:

server {
    listen 80;
    server_name finance.yourdomain.com;

    location / {
        proxy_pass [http://127.0.0.1:3333](http://127.0.0.1:3333);
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Enable the site configuration and restart Nginx to apply changes:

sudo ln -s /etc/nginx/sites-available/ghostfolio /etc/nginx/sites-enabled/
sudo systemctl restart nginx

Obtaining an SSL Certificate

Execute Certbot to automatically fetch and configure an HTTPS certificate for your domain:

sudo certbot --nginx -d finance.yourdomain.com

Follow the on-screen prompts to enforce global HTTPS redirection. Your connection is now fully encrypted via TLS 1.3.

The Initial Setup and Portfolio Optimization

Open your web browser and navigate to your domain (e.g., [https://finance.yourdomain.com](https://finance.yourdomain.com)). You will be greeted by the initial setup wizard.

Account Creation

Because Ghostfolio is built with a zero-knowledge approach, you will create an account using a secure password. Important note: There is no 'Forgot Password' functionality because your data is hashed locally. Store your master password securely in a reliable password manager.

Data Import and Aggregation

Ghostfolio allows you to manually input transactions or utilize a structured CSV template to import historical transaction data from brokers like Interactive Brokers, Degiro, or Binance. This feature allows you to seamlessly transition years of historical trading data into your new self-hosted command center within minutes.

Conclusion and Ongoing Maintenance

By successfully deploying Ghostfolio on your own VPS, you have effectively decoupled your financial tracking from centralized entities. You now possess a premium, institutional-grade analytical dashboard that respects your privacy and scales with your wealth.

To maintain your setup, ensure you periodically update your Docker images and back up the ghostfolio_db_data volume to a secure, off-site location. Taking ownership of your financial data requires technical discipline, but the peace of mind knowing your net worth remains completely confidential is an invaluable asset to any modern investor.

Self-Hosting Ghostfolio on a VPS: The Ultimate Guide to Private, Open-Source Wealth Tracking | DPTCloud