# Coremarket

> Size a VM for the applications you'll run on a Core, then compare its price across cloud providers and regions.

- Web page: https://documentation.federated.computer/developer-tools/coremarket/

Coremarket answers the question you face before provisioning a You host Core: how big a VM do I need, and where should I run it? Choose the applications, and Coremarket works out the CPU, memory, and disk they need, then prices a matching VM at 14 cloud providers in about 250 regions.

For each option it shows:

- the monthly price,
- the region, grouped by continent,
- whether the provider offers HIPAA, SOC 2, PCI DSS, and GDPR compliance there, and
- the estimated network latency from the region to the cities your users are in.

## How sizing works

Every estimate includes what the Core itself runs (its Traefik proxy, PowerDNS, and Authelia sign-in), plus each application you choose. You can start from a preset that matches a We host plan (Base, Good, Better, or Best) and add or remove applications.

By default Coremarket adds 25% headroom, and enough disk for a year of growth at 30%. You can change both.

Prices for Vultr, Akamai (Linode), and Azure are fetched live every 24 hours. Other providers come from a dated catalog included with Coremarket. Treat every price as an estimate, and check it with the provider before you commit.

## Run it

Coremarket runs in Docker. You need Docker with Compose.

1. Get the code and create a settings file:

   ```
   git clone https://gitea.federated.computer/Federated_Computer/coremarket.git
   cd coremarket
   cp .env.example .env
   ```

2. In `.env`, set `ADMIN_USERNAME` and `ADMIN_PASSWORD` (at least 10 characters). Coremarket creates this administrator the first time it starts, and won't start without it.
3. Start it:

   ```
   docker compose up -d --build
   ```

4. Open `http://localhost:8999` and sign in as the administrator.

Administrators can add other people, as users or administrators, and create API keys. After five failed sign-ins for the same account from the same address, sign-in is blocked for five minutes.

## Settings

| Setting | Default | What it does |
|---|---|---|
| `LIVE_PRICING` | `1` | Fetch live prices where providers publish them |
| `LIVE_REFRESH_HOURS` | `24` | How often to refresh live prices |
| `DIGITALOCEAN_TOKEN`, `HCLOUD_TOKEN` | | Optional tokens for live DigitalOcean and Hetzner prices |
| `GLOBALPING_TOKEN` | | Optional token for measuring latency with Globalping |
| `SESSION_HOURS` | `12` | How long a sign-in lasts |
| `COOKIE_SECURE` | `0` | Set to `1` when Coremarket is served over HTTPS |

## Next

- [Coremarket API](api/): get the same quotes from scripts and other tools.
- [Core Sizing](https://documentation.federated.computer/hosting/cores/core-sizing/): Federated's guidance on VM sizes.
- [Provisioning a Core](https://documentation.federated.computer/hosting/cores/provisioning-a-core/): once you've chosen a VM.

## Source code

[gitea.federated.computer/Federated_Computer/coremarket](https://gitea.federated.computer/Federated_Computer/coremarket)

## Pages in this section

- [Coremarket API](https://documentation.federated.computer/developer-tools/coremarket/api/index.md): Get VM sizes and price quotes from Coremarket over HTTP.
