03 - Homelab dashboard - Dashy

Docker
Dashboard
Dashy
Add a centralized homepage for your services
Author

ProtossGP32

Published

January 30, 2023

Introduction

Dashy is a lightweight dashboard that allows users, devops and sysadmins to quickly access to its services:

Getting started

Installation

Follow this video for a simple Docker deployment and initial configuration:

Synology

The docker image can also be deployed inside a Synology NAS. Follow the official Dashy’s documentation on how to do it.

Docker compose

We can also create a docker-compose.yml file for an easier deployment. Follow Dashy’s documentation and modify it according to your own architecture.

Just add some volumes for both config.yml and the item-icons folder so we don’t lose them when restarting the container.

docker-compose.yml
---
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/public/conf.yml
    ports:
      - 4000:80
    # 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
    # Volumes
    volumes:
      - $PWD/public/conf.yml:/app/public/conf.yml
      - $PWD/public/item-icons:/app/public/item-icons
    # Configure healthchecks
    healthcheck:
      test: ['CMD', 'node', '/app/services/healthcheck']
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 40s

Then locally clone the GitHub repository of icons to beautify the panels:

cd public/item-icons
git clone https://github.com/walkxcode/dashboard-icons.git

And here is a basic config.yml with enabled built-in authentication and some services already configured into its proper sections:

Remember to change the admin hash

The hash parameter within auth.users[admin].hash is the password converted to a sha256 hash. You can obtain it by simply invoking the following command from a terminal:

echo -n "your-admin-super-secret-password" | sha256sum

The hash is the first 64 characters of the output (ignore the empty spaces and dashes at the end).

public/conf.yml
appConfig:
  theme: colorful
  layout: auto
  iconSize: large
  language: en
  auth:
    enableGuestAccess: true
    users:
      - user: admin
        hash: hash-of-a-password-you-choose-using-sha256-hashing
        type: admin
defaultOpeningMethod: newtab
webSearch:
    disableWebSearch: false
    searchEngine: duckduckgo
    openingMethod: newtab
    searchBangs: {}
  enableFontAwesome: true
  enableMaterialDesignIcons: true
  allowConfigEdit: true
pageInfo:
  title: Home Lab
  description: Welcome to your Home Lab!
  navLinks:
    - title: GitHub
      path: https://github.com/ProtossGP32/DevOps-training-projects
    - title: Introduction to HomeLab
      path: https://protossgp32.github.io/DevOps-training-projects/homelab-project/00-introduction.html
  footerText: ''
sections:
  - name: Server administration
    icon: fas fa-server
    items:
      - title: Proxmox
        description: Virtualisation manager
        url: https://pve.protossnet.local
        icon: dashboard-icons/png/proxmox.png
        statusCheck: true
      - title: phpLDAPadmin
        description: LDAP administrator
        url: http://ldap-server.protossnet.local:8080
        icon: dashboard-icons/png/phpldapadmin.png
        statusCheck: true
    displayData:
      sortBy: default
      rows: 1
      cols: 1
      collapsed: false
      hideForGuests: true

  - name: Productivity Tools
    icon: fas fa-regular fa-window
    items:
      - title: NextCloud
        description: Cloud office suite and collaboration platform
        url: http://sonic.protossnet.local:8080
        icon: dashboard-icons/png/nextcloud.png
        statusCheck: true
      - title: OpenProject
        description: Projects management suite
        url: http://sonic.protossnet.local:8081
        icon: dashboard-icons/png/openproject.png
        statusCheck: true
      - title: SonarQube
        description: Static code analysis suite
        url: http://sonic.protossnet.local:9000
        icon: dashboard-icons/png/sonarqube.png
      - title: VS Code Web
        description: Cloud based VS Code development environment
        icon: dashboard-icons/png/vs-code.png
        statusCheck: true

  - name: User management
    icon: fas fa-light fa-user
    displayData:
      sortBy: default
      rows: 1
      cols: 1
      collapsed: false
      hideForGuests: false
    items:
      - title: Self Service Password
        description: Allows to change your user password
        icon: dashboard-icons/png/ltb-logo.png
        url: https://ssp-protoss.cifoweb.dev/
        statusCheck: true

Configuring additional shortcuts

TODO

Add any additional information that could be useful