F1-Telemetry is a service that receives UDP telemetry data from EA's F1 games (F1 2019 and newer) and stores it in a relational database. A companion Angular web interface visualizes the collected data. The service is built on .NET 11 and ships as two Docker images:
| Image | Docker Hub | Purpose |
|---|---|---|
| Telemetry service | networlddev/f1-telemetry |
Receives and processes telemetry packets, exposes the API |
| Web interface | networlddev/f1-telemetry-app |
Visualizes the stored data |
The live session view shows every car on the track map learned from the motion packets. Hovering a driver in the legend or in the timing table highlights the car on the map.
You need Docker and a supported database (PostgreSQL, MariaDB/MySQL or Microsoft SQL Server). Both images are published to Docker Hub, so no local build is required.
| Port | Protocol | Container | Description |
|---|---|---|---|
20777 |
UDP | service | Telemetry port the F1 game sends packets to |
20778 |
TCP | service | Replay port the F1ReplayClient sends recorded packets to |
80 |
TCP | service | REST API and SignalR hub |
80 |
TCP | web app | Web interface (served by nginx) |
Configure the F1 game to send UDP telemetry to the host running the service on
port 20777.
The service always listens for replay packets on the telemetry port plus one, so
changing the telemetry port moves the replay port with it. The port has to be
published (and allowed by the firewall of the host) whenever the
F1ReplayClient runs on another machine than the service, otherwise the client
cannot deliver a single packet.
services:
f1-telemetry:
image: networlddev/f1-telemetry:latest
restart: unless-stopped
ports:
- "20777:20777/udp" # telemetry from the game
- "20778:20778" # packets from the replay client
- "4820:80" # REST API / SignalR
environment:
F1SERVER_DATABASE_TYPE: 3 # 1 = MariaDB, 2 = MSSQL, 3 = PostgreSQL
F1SERVER_DB_HOST: db
F1SERVER_DB_NAME: f1telemetry
F1SERVER_DB_USER: f1
F1SERVER_DB_PASSWORD: change-me
F1SERVER_WEB: "true"
F1SERVER_RUN_TELEMETRY_LOGGING: "false"
TZ: Europe/Berlin
volumes:
- f1-logs:/var/f1-telemetry
depends_on:
- db
f1-telemetry-app:
image: networlddev/f1-telemetry-app:latest
restart: unless-stopped
ports:
- "8080:80"
environment:
F1SERVER_HOST: f1-telemetry # host of the service, as seen from the web app container
F1SERVER_PORT: "80" # API port of the service, as seen from the web app container
db:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_DB: f1telemetry
POSTGRES_USER: f1
POSTGRES_PASSWORD: change-me
volumes:
- f1-db:/var/lib/postgresql/data
volumes:
f1-logs:
f1-db:The database schema is created and migrated automatically on startup.
| Variable | Description |
|---|---|
F1SERVER_DATABASE_TYPE |
Database provider: 1 (MariaDB/MySQL), 2 (MSSQL) or 3 (PostgreSQL). |
F1SERVER_DB_HOST |
Database host. |
F1SERVER_DB_NAME |
Database name. |
F1SERVER_DB_USER |
Database user. |
F1SERVER_DB_PASSWORD |
Database password. |
F1SERVER_DB_MSSQL_TRUST_SERVER_CERTIFICATE |
MSSQL only. Set to false to validate the server's TLS certificate instead of trusting it unconditionally. Defaults to true. |
F1SERVER_WEB |
Set to true to enable the REST API used by the web interface (port 80). |
F1SERVER_RUN_TELEMETRY_LOGGING |
Set to true to write raw packet logs. Requires a volume mounted at /var/f1-telemetry. |
TZ |
Time zone used for timestamps (e.g. Europe/Berlin). |
| Variable | Description |
|---|---|
F1SERVER_HOST |
Host name of the F1-Telemetry service, reachable from the web app container. |
F1SERVER_PORT |
API port of the service, reachable from the web app container (80 inside the same Docker network, or the published port such as 4820 when using the Docker host address). |
F1SERVER_URL |
Optional. Leave empty (recommended) so the browser calls /api and /live on the web app's own origin and nginx proxies them to the service. Only set it if the browser has to reach the service directly under a different, publicly reachable URL. |
Because the web app proxies /api and /live (including SignalR WebSockets), only the
web app container needs to be exposed, for example through a reverse proxy or a
Cloudflare Tunnel.
To address the service by its container or service name, both containers must be attached
to the same user-defined Docker network (Docker Compose creates one automatically). The
default bridge network does not resolve container names, and a network attached with
docker network connect is lost when the container is recreated, so configure it
persistently (networks: in Compose or --network with docker run). nginx resolves
F1SERVER_HOST at startup and does not start if the name cannot be resolved.
Both images define a Docker HEALTHCHECK. The service reports on
GET /api/serverhealth, the web app on GET /api/health.
F1-Telemetry is a multi-project .NET 11 solution. Incoming UDP packets are
parsed against the F1 packet contracts, dispatched by analyzers/factories to
specialized processors, and persisted through repositories. Multi-database
support is provided by provider-specific EF Core migration projects
(F1Server.Db.MsSqlMigrations, F1Server.Db.MySqlMigrations,
F1Server.Db.PostgreSqlMigrations). The F1Server.WebApi project exposes the
REST controllers and SignalR hubs that feed the Angular frontend.
NuGet versions are managed centrally in Directory.Packages.props. A few
references deviate from the "latest stable, upstream" rule — the pre-release
OpenTelemetry instrumentation packages, the MySQL provider fork and the analyzer
beta. Those decisions are documented in
docs/dependency-decisions.md.
Observability is implemented in F1Server.Observability around
ObservabilityConfiguration, which wires up traces, metrics and logs against the
OpenTelemetry SDK. All signals are tagged with the
resource attributes service.name = F1-Telemetry, service.version = 1.0 and a
service.instance.id of either Development or Production (derived from
ASPNETCORE_ENVIRONMENT).
Observability is activated at startup only when F1SERVER_OTLP_TARGET is set to
a numeric value and at least one signal endpoint is configured. Each signal
is then enabled independently, depending on whether its endpoint variable is set.
| Variable | Description |
|---|---|
F1SERVER_OTLP_TARGET |
Export target: 0 (NotSet), 1 (Console), 3 (OpenTelemetry). The Docker image defaults to 3. Value 2 was Zipkin and no longer exists; any value other than 3 falls back to the console exporter. |
F1SERVER_OTLP_TRACES_URL |
OTLP endpoint for traces. |
F1SERVER_OTLP_METRICS_URL |
OTLP endpoint for metrics. |
F1SERVER_OTLP_LOGGING_URL |
OTLP endpoint for logs. |
F1SERVER_OTLP_URL |
Legacy fallback used for the traces endpoint when F1SERVER_OTLP_TRACES_URL is not set. |
F1SERVER_TRACE_DB_COMMANDS |
Set to true to additionally trace every SQL command through CommandInterceptor. Defaults to false, since EF Core commands are already traced once via the automatic EF Core instrumentation described below. |
All OTLP exporters use the gRPC protocol, so endpoints should point at an
OTLP/gRPC collector (typically port 4317), for example
http://otel-collector:4317.
Configured when F1SERVER_OTLP_TRACES_URL (or the legacy F1SERVER_OTLP_URL)
is set. Activity is captured from the sources F1-Telemetry and
F1-Telemetry-WebAPI, plus automatic Entity Framework Core instrumentation.
Traces are exported over OTLP/gRPC only when F1SERVER_OTLP_TARGET is 3
(OpenTelemetry); for any other target they fall back to the console exporter.
Configured when F1SERVER_OTLP_METRICS_URL is set and always exported over
OTLP/gRPC. Alongside runtime, process and event-counter instrumentation
(Microsoft.Data.SqlClient.EventSource and Microsoft.EntityFrameworkCore),
the application publishes its own meter F1-Telemetry.Metrics. All custom
instruments are prefixed with f1telemetry. and are seeded to zero on startup so
they are visible immediately. Key instruments include:
| Instrument | Type | Description |
|---|---|---|
f1telemetry.packets_received |
Counter | Total packets received from the game. |
f1telemetry.packets_processed |
Counter | Total packets processed (tagged by PacketType). |
f1telemetry.packets_in_queue |
Gauge | Packets waiting to be processed. |
f1telemetry.packet_processing_time |
Histogram | Processing time per packet (ms). |
f1telemetry.processing_errors |
Counter | Packet processing errors. |
f1telemetry.db_errors |
Counter | Database errors. |
f1telemetry.packets_logged |
Counter | Packets written to the raw log. |
f1telemetry.<packet>_packets |
Counter | Per packet-type counters (e.g. cartelemetry_packets, lapdata_packets, motion_packets). |
f1telemetry.<packet>_packet_processing_time |
Gauge | Per packet-type processing time (ms). |
Configured when F1SERVER_OTLP_LOGGING_URL is set. A dedicated
ILoggerFactory exports structured logs over OTLP/gRPC (with formatted
messages, scopes and parsed state values) while also writing to the console.