# Howto setup JS-ROOT

**URL:** <https://root-forum.cern.ch/t/howto-setup-js-root/64122>\
**Category:** ROOT\
**Tags:** jsroot\
**Created:** [September 5, 2025, 8:26am UTC](https://root-forum.cern.ch/t/howto-setup-js-root/64122 "2025-09-05T08:26:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrian\_sev](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/adrian_sev/32/13169_2.png) [@adrian\_sev](https://root-forum.cern.ch/u/adrian_sev)\
**Post date:** [September 5, 2025, 8:26am UTC](https://root-forum.cern.ch/t/howto-setup-js-root/64122/1 "2025-09-05T08:26:36Z")

</div>

Hi! I have ROOT (including JS-ROOT) installed on Alma9 from EPEL.  
I would like to setup JS-ROOT locally but i see no clear (apache) instruction to do so .. i have so far:

```auto
root@issaf: conf.d # cat jsroot.conf 
<FilesMatch "\.mjs">
  ForceType text/javascript
</FilesMatch>

```

but it’s not clear to me how to:

1. enable the interface  
and
2. associate the root files on the server to be opened with js-root

Thank you!  
Adrian

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [September 5, 2025, 8:35am UTC](https://root-forum.cern.ch/t/howto-setup-js-root/64122/2 "2025-09-05T08:35:39Z")

</div>

Hi,

> [@adrian\_sev](#):
>
> enable the interface

This is server-specific configuration. So can be found in correspondent documentation.

By the way - you can use [server.py](https://github.com/root-project/jsroot/blob/master/server/server.py) script which configures simple http server. It used by JSROOT testing tools.

> [@adrian\_sev](#):
>
> associate the root files on the server to be opened with js-root

Typically one provides file as URL parameter. If you are using default JSROOT GUI,  
you can edit `index.htm` file and provide list of existing files as `files` attribute. Like:

```auto
<div id="simpleGUI" path="../files/" files="ct.root;exclusion.root;fillrandom.root;glbox.root;graph.root;hsimple.root;legends.root;rf107.root;stacks.root;zdemo.root">
         loading modules ...
 </div>

```

---

<div class="post-metadata">

**Author:** ![adrian\_sev](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/adrian_sev/32/13169_2.png) [@adrian\_sev](https://root-forum.cern.ch/u/adrian_sev)\
**Post date:** [September 5, 2025, 8:51am UTC](https://root-forum.cern.ch/t/howto-setup-js-root/64122/3 "2025-09-05T08:51:36Z")

</div>

Hi! Could you point to me the “correspondent documentation”? looking at [GitHub - root-project/jsroot: JavaScript ROOT](https://github.com/root-project/jsroot) for something related to apache i did not find anything ..

Regarding `server.py` : i had the impression that the `js-root` is a java interface (so run by the http server) not a stand-alone process that is accessed through a reverse-proxy in the httpd server.. did i got it wrong?

my goal is to have the interface that is seen at `https://root.cern/js/latest/` and to have the ability that clicking on a root file on the server, the js-root to open that file.

Thanks a lot!!

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [September 5, 2025, 9:02am UTC](https://root-forum.cern.ch/t/howto-setup-js-root/64122/4 "2025-09-05T09:02:27Z")

</div>

JSROOT does not provide documentation for Apache configuration.  
It can be very complex - but also there are extra GUI tools to configure web server on the host.

`server.py` runs very simple http server using Python.  
But it is sufficient for JSROOT usage. See [readme](https://github.com/root-project/jsroot/blob/master/server/readme.md) for how to use it. Once it running, you will be able to see default JSROOT page via URL: [http://localhost:8000/jsroot/](http://localhost:8000/jsroot/)

> [@adrian\_sev](#):
>
> i had the impression that the `js-root` is a java interface (so run by the http server)

No. JSROOT is pure JavaScript library and does not rely on any special http server functionality. Any http server can be used together with JSROOT.

Probably you speaking about ROOT `webgui` - which provides specialized http server to display graphics and GUI in web browser. But this functionality integrated into ROOT and does not require any extra http servers - one just run `root --web hsimple.C`

---

<div class="post-metadata">

**Author:** ![adrian\_sev](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/adrian_sev/32/13169_2.png) [@adrian\_sev](https://root-forum.cern.ch/u/adrian_sev)\
**Post date:** [September 5, 2025, 9:09am UTC](https://root-forum.cern.ch/t/howto-setup-js-root/64122/5 "2025-09-05T09:09:26Z")

</div>

I’m sorry that i cannot communicate clear enough what i try to achieve… i will see if i can reformulate:

1. The goal is to have a locally setup of js-root that would provide the functionality of `https://root.cern/js/latest/`
2. I would like to NOT have to configure a reverse proxy in the apache server if i do not have to.
3. I’m looking for documentation/example on how was this achieved at `https://root.cern/js/latest/` .. is this possible, or is something private?

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [September 5, 2025, 9:19am UTC](https://root-forum.cern.ch/t/howto-setup-js-root/64122/6 "2025-09-05T09:19:54Z")

</div>

> [@adrian\_sev](#):
>
> The goal is to have a locally setup of js-root that would provide the functionality of `https://root.cern/js/latest/`

For private usage `server.py` is easiest way to achieve that you want - just run it as described in readme and try to use it.

> [@adrian\_sev](#):
>
> I would like to NOT have to configure a reverse proxy in the apache server if i do not have to.

It is not necessary for JSROOT.

> [@adrian\_sev](#):
>
> I’m looking for documentation/example on how was this achieved at `https://root.cern/js/latest/` .. is this possible, or is something private?

As far as I know `https://root.cern` server managed by CERN IT and does not have any special components for JSROOT. Only extra `.htaccess` file placed in top folder to ease access to JSON and ROOT files. I attach it here.  
[htaccess.txt](https://root-forum.cern.ch/uploads/short-url/4DfAWkkzpFCOct8E8GqOg5Bi5sA.txt) (750 Bytes)

So there are no any special `magic` behind http server for JSROOT.  
http server just used as plain file server for JavaScript/HTML/ROOT files.  
So any http server can do the job.

---

<div class="post-metadata">

**Author:** ![adrian\_sev](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/adrian_sev/32/13169_2.png) [@adrian\_sev](https://root-forum.cern.ch/u/adrian_sev)\
**Post date:** [September 5, 2025, 9:30am UTC](https://root-forum.cern.ch/t/howto-setup-js-root/64122/7 "2025-09-05T09:30:24Z")

</div>

> [@linev](#):
>
> For private usage `server.py` is easiest way to achieve that you want - just run it as described in readme and try to use it.

this is not for private usage, is for server usage

> [@linev](#):
>
> It is not necessary for JSROOT.

Great!

> [@linev](#):
>
> As far as I know `https://root.cern` server managed by CERN IT and does not have any special components for JSROOT. Only extra `.htaccess` file placed in top folder to ease access to JSON and ROOT files. I attach it here.  
> [htaccess.txt](https://root-forum.cern.ch/uploads/short-url/4DfAWkkzpFCOct8E8GqOg5Bi5sA.txt) (750 Bytes)
> 
> So there are no any special `magic` behind http server for JSROOT.  
> http server just used as plain file server for JavaScript/HTML/ROOT files.  
> So any http server can do the job.

ok .. thank a lot! but it’s not clear to me what is the entry point for application .. it should be a `.htm` or `.html` file (or maybe a `.js`) that is what is started as index file

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [September 5, 2025, 10:45am UTC](https://root-forum.cern.ch/t/howto-setup-js-root/64122/8 "2025-09-05T10:45:38Z")

</div>

> [@adrian\_sev](#):
>
> ok .. thank a lot! but it’s not clear to me what is the entry point for application .. it should be a `.htm` or `.html` file (or maybe a `.js`) that is what is started as index file

If one type URL `http://localhost:8000/jsroot/`, web browser tries to open file `index.html` or `index.htm` in this folder. So JSROOT provides such file. But there are other HTML files - like `examples.htm` or `api.htm`. They only accessible if addressed explicitly.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [September 19, 2025, 10:46am UTC](https://root-forum.cern.ch/t/howto-setup-js-root/64122/9 "2025-09-19T10:46:08Z")

</div>

Closed on September 19, 2025, 10:46am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
