# Self-host Ghostfolio

> A privacy-first wealth tracker for stocks, ETFs, and crypto, with portfolio analytics and no ads.

- Page: https://levelrail.com/templates/ghostfolio/
- JSON: https://levelrail.com/templates/ghostfolio.json
- Category: Finance
- Licence: AGPL-3.0 (Network copyleft (AGPL) license)
- Source: https://github.com/ghostfolio/ghostfolio
- Upstream docs: https://github.com/ghostfolio/ghostfolio

## Requirements
- Memory: about 1 GiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: 16-alpine

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| db | postgres | 16-alpine | none | ghostfolio_db_data -> /var/lib/postgresql/data |
| ghostfolio | ghostfolio/ghostfolio | 3.72.0 | 3333 | none |
| redis | redis | 7-alpine | none | ghostfolio_redis_data -> /data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| db | POSTGRES_DB | preset |
| db | POSTGRES_PASSWORD | generated |
| db | POSTGRES_USER | preset |
| ghostfolio | ACCESS_TOKEN_SALT | generated |
| ghostfolio | DATABASE_URL | generated |
| ghostfolio | JWT_SECRET_KEY | generated |
| ghostfolio | REDIS_HOST | preset |
| ghostfolio | REDIS_PORT | preset |

## Deploy

### CLI

```bash
levelrail-cli templates deploy ghostfolio --name my-ghostfolio
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/ghostfolio/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy Ghostfolio on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Ghostfolio, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image postgres:16-alpine, ghostfolio/ghostfolio:3.72.0, redis:7-alpine is what you deploy there.

Self-host Ghostfolio, Ghostfolio docker compose file, deploy Ghostfolio on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
