You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Phoenix LiveDashboard on a separate port (#4119)
## Summary
- Adds Phoenix LiveDashboard served on a dedicated Bandit instance,
configured via `ELECTRIC_LIVE_DASHBOARD_PORT`
- Dashboard is opt-in: not started unless the env var is set
- Fully isolated from the main Plug-based HTTP API
> **⚠️ Security note:** The dashboard endpoint is **completely
unauthenticated** and exposes internal system state (VM metrics, process
info, ETS tables, etc.). In production, operators **must** ensure the
dashboard port is firewalled or otherwise restricted to trusted networks
only.
## Test plan
- [x] Set `ELECTRIC_LIVE_DASHBOARD_PORT=4000` and verify dashboard loads
at `http://localhost:4000`
- [x] Verify main API on `ELECTRIC_PORT` is unaffected
- [x] Verify dashboard does not start when env var is unset
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@ Real-time sync for Postgres.
32
32
-[What is Electric?](#what-is-electric)
33
33
-[Getting Started](#getting-started)
34
34
-[HTTP API Docs](#http-api-docs)
35
+
-[Phoenix LiveDashboard](#phoenix-livedashboard)
35
36
-[Developing Electric](#developing-electric)
36
37
-[Mac setup](#mac-setup)
37
38
-[Contributing](#contributing)
@@ -98,6 +99,20 @@ Again, see the [Quickstart](https://electric-sql.com/docs/quickstart) and the [D
98
99
99
100
The HTTP API is defined in an [OpenAPI spec](https://swagger.io/specification/) in [website/electric-api.yaml](./website/electric-api.yaml).
100
101
102
+
## Phoenix LiveDashboard
103
+
104
+
Electric includes an optional [Phoenix LiveDashboard](https://github.com/phoenixframework/phoenix_live_dashboard) for real-time monitoring of the running system (VM metrics, process info, ETS tables, etc.).
105
+
106
+
To enable it, set the `ELECTRIC_LIVE_DASHBOARD_PORT` environment variable:
107
+
108
+
```sh
109
+
ELECTRIC_LIVE_DASHBOARD_PORT=4000
110
+
```
111
+
112
+
The dashboard will be available at `http://localhost:4000` (or whichever port you choose). When the variable is not set, the dashboard is not started.
113
+
114
+
> **WARNING: The LiveDashboard endpoint is completely unauthenticated.** Anyone with network access to the port can view internal system state. In production, you **must** restrict access to this port using firewall rules, network policies, or similar controls. Do not expose it to the public internet.
115
+
101
116
## Developing Electric
102
117
103
118
We use [asdf](https://asdf-vm.com/) to install Elixir, Erlang, and Node.js. Versions are defined in [.tool-versions](.tool-versions).
0 commit comments