dashy icon indicating copy to clipboard operation
dashy copied to clipboard

[QUESTION] Authentication System

Open FuckingToasters opened this issue 2 years ago • 3 comments

Question

I read the docs but i don't really understand how to implement an autheticathion system. I don't want everyone to have access to all services.

Here the dokcer compose file i run as stack inside portainer:

version: '3'
services:
  dashy:
    image: lissy93/dashy:2.0.0
    container_name: Dashy
    environment:
      - NODE_ENV=production
      - DASHY_USERNAME=InfinityMonster
    restart: always

    healthcheck:
      test: ['CMD', 'node', '/app/services/healthcheck']
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 40s
    volumes:
      - ./dashy-config:/app/public/config
    networks:
      - webproxy

networks:
  webproxy:
    external: true

I read something about a config file but i can't find it. following directory is empty: /var/lib/docker/volumes/dashy_dashy_data/_data

Category

Configuration

Please tick the boxes

FuckingToasters avatar Sep 22 '23 07:09 FuckingToasters

If you're enjoying Dashy, consider dropping us a ⭐
🤖 I'm a bot, and this message was automated

liss-bot avatar Sep 22 '23 07:09 liss-bot

Firstly, you can check the documentation about authentication setup here: https://dashy.to/docs/authentication#setting-up-authentication

  1. Following the Built-In Auth method, you have to add this to the conf.yml:
appConfig.auth.enableGuestAccess: true  # for enabling guest mode
# guest: no autenticated users
appConfig:
  auth:
    users:
    - user: alicia
      hash: 4D1E58C90B3B94BCAD9848ECCACD6D2A8C9FBC5CA913304BBA5CDEAB36FEEFA3
      type: admin # admins can make make changes to disk 
    - user: bob
      hash: 5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8
      # this user without admin can't make changes to disk 
  1. Then you have to modify your tabs or elements and check:
    image

  2. You can follow the documentation for more customization.

For this, you need to have access to the config file located on /app/public/conf.yml
You can access going to settings on the WebUI.

If for some reason, the changes are not being saved on the webUI

You have to make sure that you have access to the conf.yml.
Add this to your docker-compose.yml

...
volumes: 
  - ./dashy-config/my-config.yml:/app/public/conf.yml  
...

Example of docker file: https://dashy.to/docs/deployment#using-docker-compose

---
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
    # Configure healthchecks
    healthcheck:
      test: ['CMD', 'node', '/app/services/healthcheck']
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 40s
- Basic Auth
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.

BarbarianTarkus avatar Sep 26 '23 04:09 BarbarianTarkus

This issue has gone 3 months without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

liss-bot avatar Dec 26 '23 01:12 liss-bot

This issue was automatically closed because it has been stalled for over 6 weeks with no activity.

liss-bot avatar Dec 31 '23 01:12 liss-bot