Summary
From the IDE, a Shiny, Streamlit, Dash or Gradio file runs as a real web app, shown in a tab next to the code. It runs in its own process, so it does not block your console, and Linkr serves it itself: no port number to know, no port to open, even in a secure environment.
When a web app
An interactive app remains the right tool for some things: a review form, a score simulator, a custom explorer that no dashboard or notebook replaces.
Running such an app in the console does not work: a shiny::runApp() holds the R session without ever showing anything. So Linkr runs it differently — on its own, as a server — and shows it in a tab.
Server mode only
An install in browser mode has no process to start: web apps do not exist there. See Deployment modes.
Recognised frameworks
Linkr recognises an app’s file by its name or its content:
| Framework | Language | Recognised by |
|---|---|---|
| Shiny | R | an app.R, ui.R or server.R file, or a call to shinyApp() |
| plumber | R | a plumber.R file, or #* @get annotations |
| Shiny for Python | Python | from shiny import … or from shiny.express import … |
| Streamlit | Python | import streamlit |
| Dash | Python | a call to Dash() |
| Gradio | Python | import gradio |
| Panel | Python | import panel |
| FastAPI | Python | a call to FastAPI() |
| Flask | Python | a call to Flask() |
The framework must be installed in the project’s environment, like any package.
To start from an app that works, create it from Create a file by picking its type in the Web apps category: the file already holds a small app with a figure that reacts to sliders — see Creating a file.
Starting an app
On a recognised file, the IDE’s Run button becomes Run app. A click saves the file, starts the app, and opens it in a tab of the right-hand panel, next to the code.
While the app runs, the same button becomes Reload app: it saves the file, stops the app and starts it again in the same tab. That is the gesture after each change — most frameworks read their code only at start.
Running the file in the console remains possible, from the button’s arrow: Run file.
A file Linkr does not recognise
For any other web server, choose Run as web app from the Run button’s arrow. Linkr then asks for the Command that starts the app, for example:
python -m http.server "$PORT" --bind 127.0.0.1
The command runs in the file’s folder, with the project’s environment. The app must listen on the address 127.0.0.1 and on the port Linkr gives it in the $PORT variable.
The app’s tab
The tab shows the app, headed by its name and its state: Starting…, Running, Failed or Stopped. Its toolbar carries five buttons:
- Reload the page — reloads the display, without restarting the app.
- Open in a new window — the app alone, in a browser tab.
- Output — what the app writes: start-up messages, warnings, errors. It opens by itself when the start fails.
- Restart — stops the app and starts it again, like Reload app.
- Stop the app — stops the app.
Closing the tab stops the app. The app also appears in the jobs panel, at the bottom of the screen, from which it can be opened in a new window or stopped.
Meanwhile, your R and Python consoles stay usable: the app runs in its own process, and your variables are left alone.
The app's data is not your console's
The app starts with an empty workspace, like a background job: it does not see your session’s variables. It reads its data itself — a dataset, a database linked to the project — with the same functions as your scripts. See Reaching the project’s data.
In a secure environment
The app listens on the server, on a port your browser never contacts. Linkr serves it, under its own address — the way RStudio Server or JupyterHub do. So nothing needs opening in the firewall, and it works behind the gateway of a health data warehouse that publishes a single address.
One condition, though: interactive apps such as Shiny and Streamlit talk over a WebSocket, a connection that stays open between the browser and the server. If the proxy in front of Linkr does not let it through, the app stays frozen on its first page, and the tab shows the banner WebSockets do not get through to Linkr. Allowing them is up to the proxy’s administrator — the IDE terminal needs them too.
A second condition concerns the installation: Linkr’s interface and its API must be on the same site, that is the same protocol and the same main domain name. Usual installations meet it — Docker, a data warehouse’s gateway, a local machine — where the API is served under the interface’s address (…/api), and so does a subdomain of the same domain (linkr.hospital-example.org and api.hospital-example.org). If the interface and the API are on two unrelated domains, the browser refuses to open the app in its tab.
Limits
An app is not shareable
Only the person who started it can use it. The app is shown inside Linkr, and its code would have access to the login of whoever views it: a shared link would expose their credentials. For the same reason, an app cannot be embedded in a dashboard yet.
An app that hard-codes its addresses — /static/… instead of relative addresses — will not find its files: Linkr serves it under a path of its own.
The values below are the defaults; an administrator can adjust them.
| Limit | Default |
|---|---|
| Concurrent apps per user | 2 |
| Time to start before being marked as failed | 2 minutes |
| Idle time before an automatic stop | 1 hour |
A tab open on the app counts as use: it does not stop while you are looking at it.
Going further
- IDE — writing the app’s code and managing its packages.
- Dashboards — which already cover many interactivity needs, and can be shared.
- Code widgets — R or Python that produces a display in a dashboard.