-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
deployment
Welcome to Dashy, so glad you're here :) Deployment is super easy, and there are several methods available depending on what type of system you're using. If you're self-hosting, then deploying with Docker (or similar container engine) is the recommended approach.
If you want to skip the fuss, and get straight down to it, then you can spin up a new instance of Dashy by running:
docker run -p 8080:8080 lissy93/dashy
See Management Docs for info about securing, monitoring, updating, health checks, auto starting, web server configuration, etc
Once you've got Dashy up and running, you'll want to configure it with your own content, for this you can reference the configuring docs.
- Deployment
Dashy has a built container image hosted on Docker Hub. You will need Docker installed on your system.
docker run -d \
-p 8080:8080 \
-v /root/my-local-conf.yml:/app/user-data/conf.yml \
--name my-dashboard \
--restart=always \
lissy93/dashy:latest
Explanation of the above options:
-
-d
Detached mode (not running in the foreground of your terminal) -
-p
The port that should be exposed, and the port it should be mapped to in your host system[host-port][container-port]
, leave the container port as is -
-v
Specify volumes, to pass data from your host system to the container, in the format of[host-path]:[container-path]
, you can use this to pass your config file, directory of assets (like icons), custom CSS or web assets (like favicon.ico, manifest.json etc) -
--name
Give your container a human-readable name -
--restart=always
Spin up the container when the daemon starts, or after it has been stopped -
lissy93/dashy:latest
This last option is the image the container should be built from, you can also use a specific version or architecture type, by replacing:latest
with one of the tags
For all available options, and to learn more, see the Docker Run Docs
Dashy is also available through GHCR: docker pull ghcr.io/lissy93/dashy:latest
If you're deploying Dashy on a modern ARM-based board, such as a Raspberry Pi (2+), then you'll need to use one of Dashy's ARM images. Set the base image + tag to either lissy93/dashy:arm64v8
or lissy93/dashy:arm32v7
, depending on your system architecture. You can also use the multi-arch
image, which should work on all system architectures.
The image defaults to :latest
, but you can instead specify a specific version, e.g. docker pull lissy93/dashy:release-1.5.0
Using Docker Compose can be useful for saving your specific config in files, without having to type out a long run command each time. Save compose config as a YAML file, and then run docker compose up -d
(optionally use the -f
flag to specify file location, if it isn't located at ./docker-compose.yml
), -d
is detached mode (not running in the foreground of your terminal). Compose is also useful if you are using clusters, as the format is very similar to stack files, used with Docker Swarm.
The following is a complete example of a docker-compose.yml
for Dashy. Run it as is, or uncomment the additional options you need.
---
version: "3.8"
services:
dashy:
# To build from source, replace 'image: lissy93/dashy' with 'build: .'
# build: .
image: lissy93/dashy
container_name: Dashy
# Pass in your config file below, by specifying the path on your host machine
# volumes:
# - /root/my-config.yml:/app/user-data/conf.yml
ports:
- 8080:8080
# Set any environmental variables
environment:
- NODE_ENV=production
# Specify your user ID and group ID. You can find this by running `id -u` and `id -g`
# - UID=1000
# - GID=1000
# Specify restart policy
restart: unless-stopped
# Configure healthchecks
healthcheck:
test: ['CMD', 'node', '/app/services/healthcheck']
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
You can use a different tag, by for example setting image: lissy93/dashy:arm64v8
, or pull from GHCR instead by setting image: ghcr.io/lissy93/dashy
.
If you are building from source, and would like to use one of the other Dockerfiles, then under services.dashy
first set context: .
, then specify the the path to the dockerfile, e.g. dockerfile: ./docker/Dockerfile-arm32v7
@vyrtualsynthese has written a Helm Chart for deploying with Kubernetes, available here
// TODO
Installing dashy is really simply and fast:
-
Install Docker via Synology
Package Center
. -
Go to
File Station
and open thedocker
folder. Inside the docker folder, create one new folder and name itdashy
.Note: Be careful to enter only lowercase, not uppercase letters.
-
Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script.
-
Once you click on
User-defined
script a new window will open. -
Follow the instructions below:
-
General: In the Task field type in Install dashy. Uncheck "Enabled" option. Select root User.
-
Schedule: Select Run on the following date then select "Do not repeat".
-
Task Settings: Check "Send run details by email", add your email then copy paste the code below in the Run command area. After that click OK.
docker run -d \
-p 4000:8080 \
-v /volume1/docker/dashy/my-local-conf.yml:/app/user-data/conf.yml \
--name dashy \
--restart=always \
lissy93/dashy:latest
dashy should be up within 1-2min after you've started the install task procedure
If you do not want to use Docker, you can run Dashy directly on your host system. For this, you will need both git and the latest or LTS version of Node.js installed, and optionally yarn
- Get Code:
git clone https://github.com/Lissy93/dashy.git
andcd dashy
- Configuration: Fill in your settings in
./user-data/conf.yml
- Install dependencies:
yarn
- Build:
yarn build
- Run:
yarn start
If you don't have a home server, then fear not - Dashy can be deployed to pretty much any cloud provider. The above Docker and NPM guides will work exactly the same on a VPS, but I've also setup some 1-Click deploy links for 10+ of the most common cloud providers, to make things easier. Note that if your instance is exposed to the internet, it will be your responsibility to adequately secure it.
Some hosting providers required a bit of extra configuration, which was why I've made separate branches for deploying to those services (named: deploy_cloudflare
, deploy_digital-ocean
, deploy_platform-sh
and deploy_render
). If there's another cloud service which you'd like 1-click deployment to be supported for, feel free to raise an issue.
Note
If you use a static hosting provider, then status checks, writing new config changes to disk from the UI, and triggering a rebuild through the UI will not be available. This is because these features need endpoints provided by Dashy's local Node server. Everything else should work just the same though.
Netlify offers Git-based serverless cloud hosting for web applications. Their services are free to use for personal use, and they support deployment from both public and private repos, as well as direct file upload. The free plan also allows you to use your own custom domain or sub-domain, and is easy to setup.
To deploy Dashy to Netlify, use the following link
https://app.netlify.com/start/deploy?repository=https://github.com/lissy93/dashy
Heroku is a fully managed cloud platform as a service. You define app settings in a Procfile and app.json, which specifying how the app should be build and how the server should be started. Heroku costs a minimum of $5 for 1,000 dyno hours per month (there are around 720 hours in a month), and supports custom domains. Heroku's single-dyno service is not as quite performant as some other providers, and the app will have a short wake-up time when not visited for a while
To deploy Dashy to Heroku, use the following link
https://heroku.com/deploy?template=https://github.com/Lissy93/dashy
Vercel is a performance-focused platform for hosting static frontend apps. It comes bundled with some useful tools for monitoring and analyzing application performance and other metrics. Vercel is free for personal use, allows for custom domains and has very reasonable limits.
To deploy Dashy to Vercel, use the following link
https://vercel.com/new/project?template=https://github.com/lissy93/dashy
DigitalOcean is a cloud service providing affordable developer-friendly virtual machines from $5/month. But they also have an app platform, where you can run web apps, static sites, APIs and background workers. CDN-backed static sites are free for personal use.
https://cloud.digitalocean.com/apps/new?repo=https://github.com/lissy93/dashy/tree/deploy_digital-ocean
Cloud Run is a service offered by Google Cloud. It's a fully managed serverless platform, for developing and deploying highly scalable containerized applications. Similar to AWS and Azure, GCP offers a wide range of cloud services, which are billed on a pay‐per‐use basis, but Cloud Run has a free tier offering 180,000 vCPU-seconds, 360,000 GiB-seconds, and 2 million requests per month.
To deploy Dashy to GCP, use the following link
https://deploy.cloud.run/?git_repo=https://github.com/lissy93/dashy.git
Platform.sh is an end-to-end solution for developing and deploying applications. It is geared towards enterprise users with large teams, and focuses on allowing applications to scale up and down. Unlike the above providers, Platform.sh is not free, although you can deploy a test app to it without needing a payment method
To deploy Dashy to Platform.sh, use the following link
https://console.platform.sh/projects/create-project/?template=https://github.com/lissy93/dashy
Render is cloud provider that provides easy deployments for static sites, Docker apps, web services, databases and background workers. Render is great for developing applications, and very easy to use. Static sites are free, and services start at $7/month. Currently there are only 2 server locations - Oregon, USA and Frankfurt, Germany. For more info, see the Render Docs
To deploy Dashy to Render, use the following link
https://render.com/deploy?repo=https://github.com/lissy93/dashy/tree/deploy_render
Railway is a Platform as a Service (PaaS) that offers a complete platform for building and delivering programs to the backend of the cloud. You bring your code and Railway does the rest. Railway offers an extremely good developer experience and makes it effortless to deploy apps. Railway offers a free Trial Plan, and paid plans start at $5/month. Railway has 4 server locations: US-west, US-east, EU-west and ASIA-South-East.
https://railway.app/template/MtdjAQ
Scalingo is a scalable container-based cloud platform as a service. It's focus is on compliance and uptime, and is geared towards enterprise users. Scalingo is also not free, although they do have a 3-day free trial that does not require a payment method.
To deploy Dashy to Scalingo, use the following link
https://my.scalingo.com/deploy?source=https://github.com/lissy93/dashy#master
Play with Docker is a community project by Marcos Liljedhal and Jonathan Leibiusky and sponsored by Docker, intended to provide a hands-on learning environment. Their labs let you quickly spin up a Docker container or stack, and test out the image in a temporary, sandboxed environment. There's no need to sign up, and it's completely free.
To run Dashy in PWD, use the following URL:
https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/Lissy93/dashy/master/docker-compose.yml
Surge.sh is quick and easy static web publishing platform for frontend-apps. Surge supports password-protected projects. You can also add a custom domain and then force HTTPS by default and optionally set a custom SSL certificate
To deploy Dashy to Surge.sh, first clone and cd into Dashy, install dependencies, and then use the following commands
yarn add -g surge
yarn build
surge ./dist
Easypanel it's a modern server control panel. You can use it to deploy Dashy on your own server.
To deploy Dashy to Easypanel, use the following link
https://easypanel.io/docs/templates/dashy
Once Dashy has been built, it is effectively just a static web app. This means that it can be served up with pretty much any static host, CDN or web server. To host Dashy through a CDN, the steps are very similar to building from source: clone the project, cd into it, install dependencies, write your config file and build the app. Once build is complete you will have a ./dist
directory within Dashy's root, and this is the build application which is ready to be served up.
However without Dashy's node server, there are a couple of features that will be unavailable to you, including: Writing config changes to disk through the UI, triggering a rebuild through the UI and application status checks. Everything else will work fine.
Dashy works well on a Raspberry Pi (tested on Pi 3 and later), but should also run well on any system.
Initial app build causes a spike in resource usage, but once the built app is running it is fairly steady. For this reason, Dashy works best with a minimum of 1GB of memory, and 1GB of disk space.
Minimum 526mb mem, 2GB disk space.
No specific requirements. The built application alone (without the Node server) is very light-weight, and can be handled smoothly by pretty much any CDN or cloud deployment service (see this list or natively supported cloud providers).
If you're using your own icons, or other assets, additional disk space will be required for those resources.
JavaScript is required to run Dashy.
In terms of browser support, pretty much any browser released since 2018 should render content just fine. However, for Internet Explorer, only IE11+ is supported, yet performance here is still not optimal. The recommended browser is either a Chromium-based / Webkit browser (Chrome, Brave, Vivaldi, Edge, Yandex, etc), or Firefox or one of it's forks (FF-ESR, Tor, LibreWolf, etc). Recent versions of Safari and Opera are also supported, but with limited continuous testing.