# FTP static dashboard to web server

**URL:** <https://discourse.nodered.org/t/ftp-static-dashboard-to-web-server/27755>\
**Category:** Dashboard\
**Created:** [4 June 2020 08:07 UTC](https://discourse.nodered.org/t/ftp-static-dashboard-to-web-server/27755 "2020-06-04T08:07:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [4 June 2020 09:37 UTC](https://discourse.nodered.org/t/ftp-static-dashboard-to-web-server/27755/2 "2020-06-04T09:37:15Z")

</div>

You can use for example Puppeteer in a Node.js script for this. The below script has been tested on a Raspberry Pi 4.

**Prerequisites**

- Chromium is installed (not required if running on i686 CPU and not on a Raspberry Pi)
- Puppeteer is installed: `npm install -g puppeteer`

```auto
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
    executablePath: '/usr/bin/chromium-browser'
  });
  const page = await browser.newPage();
  await page.goto('http://localhost:1880/ui');
  await page.waitFor(5000);
  await page.screenshot({path: 'dashboard.png'});
  await browser.close();
})();

```

If you're running an i686 environment, you don't need to separately install Chromium and can remove the `executablePath` part and just call `await puppeteer.launch()`. This should create a `dashboard.png` screenshot in the folder you run the script in. You could call this script from Node-RED using the exec node and use a file watch node to trigger upload when the screenshot is updated.

You can adjust the `waitFor` time in milliseconds to be as long as needed for the dashboard to fully load.

---

_[View the full topic](https://discourse.nodered.org/t/ftp-static-dashboard-to-web-server/27755)._
