Reach Midium remotely
Use this Mac's Midium dashboard and API from another computer, over an SSH tunnel on any plan or a public ngrok URL on a Hub.
For Hub admins and members
By default, only this Mac#
Midium serves its dashboard and API at http://127.0.0.1:9100, which only this Mac can reach. Your base URL here is http://127.0.0.1:9100. To reach Midium from somewhere else, pick one:
| Way | Plan | Reaches |
|---|---|---|
| SSH tunnel | Any | The dashboard and the API, from a computer that can SSH into this Mac |
| ngrok tunnel | Hub, or a Mac that joined one | The API, on a public URL from anywhere |
Midium Relay, a private way to reach this Mac from your phone without opening ports, is coming soon.
Over SSH (any plan)#
-
On this Mac, turn on Remote Login in macOS System Settings → General → Sharing.
-
On this Mac, run:
Shellmidium tunnelIt prints the exact command for your Mac, like:
Shellssh -L 9100:localhost:9100 you@192.168.1.20 -
Run that command on the other computer and leave it open.
-
On the other computer, open
http://localhost:9100/for the dashboard. The API is athttp://localhost:9100/v1.
API requests through the tunnel still need your API key. See Authentication.
On a Mac with nobody logged in at the screen, start the engine with midium start --detach. It keeps running after you log out of your SSH session.
On a public URL with ngrok (Hub or member)#
Settings → Tunnel exposes this Mac's API on a public ngrok URL. It shows on a licensed Hub, or on a Mac that joined one.
- In your ngrok dashboard, reserve a domain and copy your auth token.
- Open Settings → Tunnel.
- Paste the Domain as a bare host, like
domain.ngrok.app. Midium stripshttps://and paths for you. - Paste the Auth token.
- Press Connect. Midium saves both, opens the tunnel, and checks it's reachable from the internet.
The status then reads Connected. The connection pill in the title bar shows Base URL · public (tunnel) next to Base URL · this Mac, and copies either one.
Callers use the public URL plus /v1 as their base URL, with your API key:
curl https://domain.ngrok.app/v1/models \
-H "Authorization: Bearer YOUR_API_KEY"
Turn it on and off#
- The Tunnel switch in the connection pill, or in the menu-bar icon's panel or menu.
- Disconnect and Connect in Settings → Tunnel.
You don't need to restart Midium. The domain and token are stored in ~/Midium/.env. While the tunnel is off, only this Mac can reach the API.
Anyone with the public URL and your API key can use your models. Keep the key private, and turn the tunnel off when you don't need it.
Related#
- Authentication: your API key and base URL.
- Run a Hub: serve vaults and models to your team.
- Command line:
midium tunneland the other commands.
Something here wrong or out of date? Tell us.
