1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
.Dd May 5, 2026
.Dt FIREFOX-PROFILER 1
.Os
.Sh NAME
.Nm firefox-profiler
.Nd serve the Firefox Profiler frontend locally
.Sh SYNOPSIS
.Nm
.Op Fl port Ar port
.Op Fl open Ar file
.Sh DESCRIPTION
.Nm
is a standalone HTTP server that serves the Firefox Profiler web application
from a single self-contained binary.
.Pp
The official Firefox Profiler is hosted at
.Lk https://profiler.firefox.com/ .
Firefox no longer ships its own local profiler; any profiles you capture
are opened on the Mozilla-hosted website.
While Mozilla employees have stated that no telemetry is currently collected,
the linked privacy policy permits Mozilla to perform arbitrary data collection,
which may conflict with GDPR obligations and is problematic for
IP-sensitive profiling data such as company-internal performance work.
.Pp
.Nm firefox-profiler
solves this by building the profiler frontend from a pinned upstream commit
and embedding it into a single binary, which serves both the JavaScript
application and stub API endpoints from the same origin.
The upload, delete, and URL-shortening API endpoints all return
.Dq 501 Not Implemented
\(em the server is intended purely for local profile viewing, not sharing.
.Pp
To use
.Nm firefox-profiler ,
configure Firefox to open profiles with your local server instead of
.Lk https://profiler.firefox.com/ .
In Firefox, go to
.Lk about:config
and set the preference
.Cm devtools.performance.recording.ui-base-url
to
.Cm http://localhost:5252
.Pq or whichever port you are using .
.Pp
The arguments are as follows:
.Bl -tag -width Ds
.It Fl port Ar port
The TCP port to listen on.
Defaults to
.Cm 5252 ,
or a random free port when
.Fl open
is used.
.It Fl open Ar file
Open a profile file directly in the browser.
.Nm
serves the file at
.Pa /cli/open/profile
and opens the browser at the corresponding
.Pa /from-url/
address.
The route is de-registered after the first fetch so the profile data
is not kept in memory, but the server itself keeps running.
Implies a random port unless
.Fl port
is also given.
.El
.Sh API ENDPOINTS
The following endpoints are implemented:
.Bl -tag -width Ds
.It GET /__lbheartbeat__
Returns 200 OK. Load-balancer liveness check.
.It GET /__heartbeat__
Returns 200 OK. Health check.
.It GET /__version__
Returns a JSON object with version information.
.It GET /
Serves the Firefox Profiler single-page application.
All paths not matching a known static asset fall back to
.Pa index.html
for client-side routing.
.El
.Pp
The following endpoints return
.Dq 501 Not Implemented :
.Bl -tag -width Ds
.It POST /compressed-store
Profile upload (requires Google Cloud Storage in the original server).
.It DELETE /profile/ Ns Ar token
Profile deletion.
.It POST /shorten
URL shortening (requires Bitly in the original server).
.It POST /expand
URL expansion.
.El
.Sh EXAMPLES
Start the server on the default port:
.Bd -literal -offset indent
$ firefox-profiler
firefox-profiler listening on http://localhost:5252
.Ed
.Pp
Open a profile file directly in the browser (random port, server stays running):
.Bd -literal -offset indent
$ firefox-profiler -open profile.json.gz
firefox-profiler listening on http://localhost:48291
opening http://localhost:48291/from-url/http%3A%2F%2Flocalhost%3A48291%2Fcli%2Fopen%2Fprofile
profile served, route deactivated
.Ed
.Pp
Use a custom port:
.Bd -literal -offset indent
$ firefox-profiler -port 8080
.Ed
.Pp
Build and run directly with Nix:
.Bd -literal -offset indent
$ nix run git+https://codeberg.org/Profpatsch/Profpatsch#firefox-profiler -- -open profile.json.gz
.Ed
.Pp
Use a custom port:
.Bd -literal -offset indent
$ firefox-profiler-server -port 8080
.Ed
.Pp
Build and run directly with Nix:
.Bd -literal -offset indent
$ nix run git+https://codeberg.org/Profpatsch/Profpatsch#firefox-profiler
.Ed
.Sh SEE ALSO
.Lk https://profiler.firefox.com/
.Sh AUTHORS
.An Profpatsch
|