mirror of
https://github.com/Lissy93/dashy.git
synced 2025-12-06 16:43:13 +01:00
22 lines
No EOL
38 KiB
HTML
22 lines
No EOL
38 KiB
HTML
<!doctype html>
|
|
<html lang="en" dir="ltr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<meta name="generator" content="Docusaurus v2.0.0-beta.2">
|
|
<title data-react-helmet="true">Management | Dashy</title><meta data-react-helmet="true" property="og:url" content="https://dashy.to/docs/management"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_version" content="current"><meta data-react-helmet="true" name="docusaurus_tag" content="docs-default-current"><meta data-react-helmet="true" property="og:title" content="Management | Dashy"><meta data-react-helmet="true" name="description" content="Providing Assets"><meta data-react-helmet="true" property="og:description" content="Providing Assets"><link data-react-helmet="true" rel="shortcut icon" href="/img/favicon.ico"><link data-react-helmet="true" rel="canonical" href="https://dashy.to/docs/management"><link data-react-helmet="true" rel="alternate" href="https://dashy.to/docs/management" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://dashy.to/docs/management" hreflang="x-default"><link rel="stylesheet" href="/assets/css/styles.1cbdf792.css">
|
|
<link rel="preload" href="/assets/js/runtime~main.80849a44.js" as="script">
|
|
<link rel="preload" href="/assets/js/main.92cfbc15.js" as="script">
|
|
</head>
|
|
<body>
|
|
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"dark")}()</script><div id="__docusaurus">
|
|
<div><a href="#main" class="skipToContent_1oUP">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><img src="/img/dashy.png" alt="Dashy Logo" class="themedImage_1VuW themedImage--light_3UqQ navbar__logo"><img src="/img/dashy.png" alt="Dashy Logo" class="themedImage_1VuW themedImage--dark_hz6m navbar__logo"><b class="navbar__title">Dashy</b></a><a href="https://github.com/lissy93/dashy" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub</a><a href="https://demo.dashy.to" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Live Demo</a><a class="navbar__item navbar__link" href="/docs/quick-start">Quick Start</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs">Documentation</a></div><div class="navbar__items navbar__items--right"><div class="react-toggle displayOnlyInLargeViewport_GrZ2 react-toggle--checked react-toggle--disabled"><div class="react-toggle-track" role="button" tabindex="-1"><div class="react-toggle-track-check"><span class="toggle_71bT">🌙</span></div><div class="react-toggle-track-x"><span class="toggle_71bT">☀️</span></div><div class="react-toggle-thumb"></div></div><input type="checkbox" checked="" class="react-toggle-screenreader-only" aria-label="Switch between dark and light mode"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div><div class="navbar-sidebar"><div class="navbar-sidebar__brand"><a class="navbar__brand" href="/"><img src="/img/dashy.png" alt="Dashy Logo" class="themedImage_1VuW themedImage--light_3UqQ navbar__logo"><img src="/img/dashy.png" alt="Dashy Logo" class="themedImage_1VuW themedImage--dark_hz6m navbar__logo"><b class="navbar__title">Dashy</b></a></div><div class="navbar-sidebar__items"><div class="menu"><ul class="menu__list"><li class="menu__list-item"><a href="https://github.com/lissy93/dashy" target="_blank" rel="noopener noreferrer" class="menu__link">GitHub</a></li><li class="menu__list-item"><a href="https://demo.dashy.to" target="_blank" rel="noopener noreferrer" class="menu__link">Live Demo</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/quick-start">Quick Start</a></li><li class="menu__list-item"><a aria-current="page" class="menu__link navbar__link--active" href="/docs">Documentation</a></li></ul></div></div></div></nav><div class="main-wrapper docs-wrapper doc-page"><div class="docPage_31aa"><aside class="docSidebarContainer_3Kbt"><div class="sidebar_15mo"><nav class="menu menu--responsive thin-scrollbar menu_Bmed menuWithAnnouncementBar_2WvA" aria-label="Sidebar navigation"><button aria-label="Open menu" aria-haspopup="true" class="button button--secondary button--sm menu__button" type="button"><svg class="sidebarMenuIcon_fgN0" width="24" height="24" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><ul class="menu__list"><li class="menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#!">Running Dashy</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/quick-start">Quick Start</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/deployment">Deployment</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/configuring">Configuring</a></li><li class="menu__list-item"><a aria-current="page" class="menu__link menu__link--active active" tabindex="0" href="/docs/management">Management</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/troubleshooting">Troubleshooting</a></li></ul></li><li class="menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#!">Community</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/showcase">User Showcase</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/contributing">Contributing</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/developing">Developing</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/development-guides">Development Guides</a></li></ul></li><li class="menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#!">Feature Docs</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/icons">Icons</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/theming">Theming</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/status-indicators">Status Indicators</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/authentication">Authentication</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/searching">Keyboard Shortcuts</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/alternate-views">Alternate Views & Opening Methods</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/multi-language-support">Internationalization</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/backup-restore">Cloud Backup and Restore</a></li></ul></li><li class="menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#!">Misc</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/privacy">Privacy & Security</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/changelog">Changelog</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/license">license</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/code-of-conduct">Contributor Covenant Code of Conduct</a></li></ul></li></ul></nav></div></aside><main class="docMainContainer_3ufF"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_3FnS"><div class="docItemContainer_33ec"><article><div class="markdown"><header><h1 class="h1Heading_27L5">Management</h1></header><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="providing-assets"></a>Providing Assets<a class="hash-link" href="#providing-assets" title="Direct link to heading">#</a></h2><p>Although not essential, you will most likely want to provide several assets to Dashy. All web assets can be found in the <code>/public</code> directory.</p><p>For example:</p><ul><li><code>./public/conf.yml</code> - As mentioned, this is your main application config file</li><li><code>./public/item-icons</code> - If you're using your own icons, you can choose to store them locally for better load time, and this is the directory to put them in. You can also use sub-folders here to keep things organized</li><li>Also within <code>./public</code> you'll find standard website assets, including <code>favicon.ico</code>, <code>manifest.json</code>, <code>robots.txt</code>, etc. There's no need to pass these in, but you can do so if you wish</li></ul><p>This is easy to do using <a href="https://docs.docker.com/storage/volumes/" target="_blank" rel="noopener noreferrer">Docker Volumes</a>, which lets you share a file or directory between your host system, and the container. Volumes are specified in the Docker run command, or Docker compose file, using the <code>--volume</code> or <code>-v</code> flags. The value of which consists of the path to the file / directory on your host system, followed by the destination path within the container. Fields are separated by a colon (<code>:</code>), and must be in the correct order. For example: <code>-v ~/alicia/my-local-conf.yml:/app/public/conf.yml</code></p><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="running-commands"></a>Running Commands<a class="hash-link" href="#running-commands" title="Direct link to heading">#</a></h2><p>The project has a few commands that can be used for various tasks, you can find a list of these either in the <a href="/docs/developing#project-commands">Developing Docs</a>, or by looking at the <a href="https://github.com/Lissy93/dashy/blob/master/package.json#L5" target="_blank" rel="noopener noreferrer"><code>package.json</code></a>. These can be used by running <code>yarn [command-name]</code>.</p><p> But if you're using Docker, then you'll need to execute them within the container. This can be done by preceding each command with <code>docker exec -it [container-id]</code>, where container ID can be found by running <code>docker ps</code>. For example <code>docker exec -it 26c156c467b4 yarn build</code>. You can also enter the container, with <code>docker exec -it [container-id] /bin/ash</code>, and navigate around it with normal Linux commands.</p><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="healthchecks"></a>Healthchecks<a class="hash-link" href="#healthchecks" title="Direct link to heading">#</a></h2><p>Healthchecks are configured to periodically check that Dashy is up and running correctly on the specified port. By default, the health script is called every 5 minutes, but this can be modified with the <code>--health-interval</code> option. You can check the current container health with: <code>docker inspect --format "{{json .State.Health }}" [container-id]</code>, and a summary of health status will show up under <code>docker ps</code>. You can also manually request the current application status by running <code>docker exec -it [container-id] yarn health-check</code>. You can disable healthchecks altogether by adding the <code>--no-healthcheck</code> flag to your Docker run command.</p><p>To restart unhealthy containers automatically, check out <a href="https://hub.docker.com/r/willfarrell/autoheal/" target="_blank" rel="noopener noreferrer">Autoheal</a>. This image watches for unhealthy containers, and automatically triggers a restart. This is a stand in for Docker's <code>--exit-on-unhealthy</code> that was proposed, but <a href="https://github.com/moby/moby/pull/22719" target="_blank" rel="noopener noreferrer">not merged</a>.</p><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="logs-and-performance"></a>Logs and Performance<a class="hash-link" href="#logs-and-performance" title="Direct link to heading">#</a></h2><h4><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="container-logs"></a>Container Logs<a class="hash-link" href="#container-logs" title="Direct link to heading">#</a></h4><p>You can view logs for a given Docker container with <code>docker logs [container-id]</code>, add the <code>--follow</code> flag to stream the logs. For more info, see the <a href="https://docs.docker.com/config/containers/logging/" target="_blank" rel="noopener noreferrer">Logging Documentation</a>. There's also <a href="https://dozzle.dev/" target="_blank" rel="noopener noreferrer">Dozzle</a>, a useful tool, that provides a web interface where you can stream and query logs from all your running containers from a single web app.</p><h4><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="container-performance"></a>Container Performance<a class="hash-link" href="#container-performance" title="Direct link to heading">#</a></h4><p>You can check the resource usage for your running Docker containers with <code>docker stats</code> or <code>docker stats [container-id]</code>. For more info, see the <a href="https://docs.docker.com/engine/reference/commandline/stats/" target="_blank" rel="noopener noreferrer">Stats Documentation</a>. There's also <a href="https://github.com/google/cadvisor" target="_blank" rel="noopener noreferrer">cAdvisor</a>, a useful web app for viewing and analyzing resource usage and performance of all your running containers.</p><h4><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="management-apps"></a>Management Apps<a class="hash-link" href="#management-apps" title="Direct link to heading">#</a></h4><p>You can also view logs, resource usage and other info as well as manage your entire Docker workflow in third-party Docker management apps. For example <a href="https://github.com/portainer/portainer" target="_blank" rel="noopener noreferrer">Portainer</a> an all-in-one open source management web UI for Docker and Kubernetes, or <a href="https://github.com/jesseduffield/lazydocker" target="_blank" rel="noopener noreferrer">LazyDocker</a> a terminal UI for Docker container management and monitoring.</p><h4><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="advanced-logging-and-monitoring"></a>Advanced Logging and Monitoring<a class="hash-link" href="#advanced-logging-and-monitoring" title="Direct link to heading">#</a></h4><p>Docker supports using <a href="https://prometheus.io/" target="_blank" rel="noopener noreferrer">Prometheus</a> to collect logs, which can then be visualized using a platform like <a href="https://grafana.com/" target="_blank" rel="noopener noreferrer">Grafana</a>. For more info, see <a href="https://docs.docker.com/config/daemon/prometheus/" target="_blank" rel="noopener noreferrer">this guide</a>. If you need to route your logs to a remote syslog, then consider using <a href="https://github.com/gliderlabs/logspout" target="_blank" rel="noopener noreferrer">logspout</a>. For enterprise-grade instances, there are managed services, that make monitoring container logs and metrics very easy, such as <a href="https://sematext.com/blog/docker-container-monitoring-with-sematext/" target="_blank" rel="noopener noreferrer">Sematext</a> with <a href="https://github.com/sematext/logagent-js" target="_blank" rel="noopener noreferrer">Logagent</a>.</p><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="auto-starting-at-system-boot"></a>Auto-Starting at System Boot<a class="hash-link" href="#auto-starting-at-system-boot" title="Direct link to heading">#</a></h2><p>You can use Docker's <a href="https://docs.docker.com/engine/reference/run/#restart-policies---restart" target="_blank" rel="noopener noreferrer">restart policies</a> to instruct the container to start after a system reboot, or restart after a crash. Just add the <code>--restart=always</code> flag to your Docker compose script or Docker run command. For more information, see the docs on <a href="https://docs.docker.com/config/containers/start-containers-automatically/" target="_blank" rel="noopener noreferrer">Starting Containers Automatically</a>.</p><p>For Podman, you can use <code>systemd</code> to create a service that launches your container, <a href="https://podman.io/blogs/2018/09/13/systemd.html" target="_blank" rel="noopener noreferrer">the docs</a> explains things further. A similar approach can be used with Docker, if you need to start containers after a reboot, but before any user interaction.</p><p>To restart the container after something within it has crashed, consider using <a href="https://github.com/willfarrell/docker-autoheal" target="_blank" rel="noopener noreferrer"><code>docker-autoheal</code></a> by @willfarrell, a service that monitors and restarts unhealthy containers. For more info, see the <a href="#healthchecks">Healthchecks</a> section above.</p><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="securing"></a>Securing<a class="hash-link" href="#securing" title="Direct link to heading">#</a></h2><h4><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="ssl"></a>SSL<a class="hash-link" href="#ssl" title="Direct link to heading">#</a></h4><p>Enabling HTTPS with an SSL certificate is recommended if you hare hosting Dashy anywhere other than your home. This will ensure that all traffic is encrypted in transit.</p><p><a href="https://letsencrypt.org/docs/" target="_blank" rel="noopener noreferrer">Let's Encrypt</a> is a global Certificate Authority, providing free SSL/TLS Domain Validation certificates in order to enable secure HTTPS access to your website. They have good browser/ OS <a href="https://letsencrypt.org/docs/certificate-compatibility/" target="_blank" rel="noopener noreferrer">compatibility</a> with their ISRG X1 and DST CA X3 root certificates, support <a href="https://community.letsencrypt.org/t/acme-v2-production-environment-wildcards/55578" target="_blank" rel="noopener noreferrer">Wildcard issuance</a> done via ACMEv2 using the DNS-01 and have <a href="https://letsencrypt.org/2020/02/19/multi-perspective-validation.html" target="_blank" rel="noopener noreferrer">Multi-Perspective Validation</a>. Let's Encrypt provide <a href="https://certbot.eff.org/" target="_blank" rel="noopener noreferrer">CertBot</a> an easy app for generating and setting up an SSL certificate</p><p><a href="https://zerossl.com/" target="_blank" rel="noopener noreferrer">ZeroSSL</a> is another popular certificate issuer, they are free for personal use, and also provide easy-to-use tools for getting things setup.</p><p>If you're hosting Dashy behind Cloudflare, then they offer <a href="https://www.cloudflare.com/en-gb/learning/ssl/what-is-an-ssl-certificate/" target="_blank" rel="noopener noreferrer">free and easy SSL</a>.</p><p>If you're not so comfortable on the command line, then you can use a tool like <a href="https://www.sslforfree.com/" target="_blank" rel="noopener noreferrer">SSL For Free</a> to generate your Let's Encrypt or ZeroSSL certificate, and support shared hosting servers. They also provide step-by-step tutorials on setting up your certificate on most common platforms. If you are using shared hosting, you may find <a href="https://www.sitepoint.com/a-guide-to-setting-up-lets-encrypt-ssl-on-shared-hosting/" target="_blank" rel="noopener noreferrer">this tutorial</a> helpful.</p><h4><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="authentication"></a>Authentication<a class="hash-link" href="#authentication" title="Direct link to heading">#</a></h4><p>Dashy has <a href="/docs/authentication">basic authentication</a> built in, however at present this is handled on the front-end, and so where security is critical, it is recommended to use an alternative method. See <a href="/docs/authentication#alternative-authentication-methods">here</a> for options regarding securing Dashy.</p><p><strong><a href="#management">⬆️ Back to Top</a></strong></p><hr><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="updating"></a>Updating<a class="hash-link" href="#updating" title="Direct link to heading">#</a></h2><p>Dashy is under active development, so to take advantage of the latest features, you may need to update your instance every now and again.</p><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="updating-docker-container"></a>Updating Docker Container<a class="hash-link" href="#updating-docker-container" title="Direct link to heading">#</a></h3><ol><li>Pull latest image: <code>docker pull lissy93/dashy:latest</code></li><li>Kill off existing container<ul><li>Find container ID: <code>docker ps</code></li><li>Stop container: <code>docker stop [container_id]</code></li><li>Remove container: <code>docker rm [container_id]</code></li></ul></li><li>Spin up new container: <code>docker run [params] lissy93/dashy</code></li></ol><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="automatic-docker-updates"></a>Automatic Docker Updates<a class="hash-link" href="#automatic-docker-updates" title="Direct link to heading">#</a></h3><p>You can automate the above process using <a href="https://github.com/containrrr/watchtower" target="_blank" rel="noopener noreferrer">Watchtower</a>.
|
|
Watchtower will watch for new versions of a given image on Docker Hub, pull down your new image, gracefully shut down your existing container and restart it with the same options that were used when it was deployed initially.</p><p>To get started, spin up the watchtower container:</p><div class="codeBlockContainer_K1bP"><div class="codeBlockContent_hGly"><pre tabindex="0" class="prism-code language-undefined codeBlock_23N8 thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_39YC"><span class="token-line" style="color:#F8F8F2"><span class="token plain">docker run -d \</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> --name watchtower \</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> -v /var/run/docker.sock:/var/run/docker.sock \</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> containrrr/watchtower</span></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_Ue-o clean-btn">Copy</button></div></div><p>For more information, see the <a href="https://containrrr.dev/watchtower/" target="_blank" rel="noopener noreferrer">Watchtower Docs</a></p><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="updating-dashy-from-source"></a>Updating Dashy from Source<a class="hash-link" href="#updating-dashy-from-source" title="Direct link to heading">#</a></h3><ol><li>Navigate into directory: <code>cd ./dashy</code></li><li>Stop your current instance</li><li>Pull latest code: <code>git pull origin master</code></li><li>Re-build: <code>yarn build</code></li><li>Start: <code>yarn start</code></li></ol><p><strong><a href="#management">⬆️ Back to Top</a></strong></p><hr><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="web-server-configuration"></a>Web Server Configuration<a class="hash-link" href="#web-server-configuration" title="Direct link to heading">#</a></h2><p><em>The following section only applies if you are not using Docker, and would like to use your own web server</em></p><p>Dashy ships with a pre-configured Node.js server, in <a href="https://github.com/Lissy93/dashy/blob/master/server.js" target="_blank" rel="noopener noreferrer"><code>server.js</code></a> which serves up the contents of the <code>./dist</code> directory on a given port. You can start the server by running <code>node server</code>. Note that the app must have been build (run <code>yarn build</code>), and you need <a href="https://nodejs.org" target="_blank" rel="noopener noreferrer">Node.js</a> installed.</p><p>If you wish to run Dashy from a sub page (e.g. <code>example.com/dashy</code>), then just set the <code>BASE_URL</code> environmental variable to that page name (in this example, <code>/dashy</code>), before building the app, and the path to all assets will then resolve to the new path, instead of <code>./</code>.</p><p>However, since Dashy is just a static web application, it can be served with whatever server you like. The following section outlines how you can configure a web server.</p><p>Note, that if you choose not to use <code>server.js</code> to serve up the app, you will loose access to the following features:</p><ul><li>Loading page, while the app is building</li><li>Writing config file to disk from the UI</li><li>Website status indicators, and ping checks</li></ul><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="nginx"></a>NGINX<a class="hash-link" href="#nginx" title="Direct link to heading">#</a></h3><p>Create a new file in <code>/etc/nginx/sites-enabled/dashy</code></p><div class="codeBlockContainer_K1bP"><div class="codeBlockContent_hGly"><pre tabindex="0" class="prism-code language-undefined codeBlock_23N8 thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_39YC"><span class="token-line" style="color:#F8F8F2"><span class="token plain">server {</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> listen 80;</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> listen [::]:80;</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block">
|
|
</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> root /var/www/dashy/html;</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> index index.html;</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block">
|
|
</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> server_name your-domain.com www.your-domain.com;</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block">
|
|
</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> location / {</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> try_files $uri $uri/ =404;</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> }</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">}</span></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_Ue-o clean-btn">Copy</button></div></div><p>Then upload the build contents of Dashy's dist directory to that location.
|
|
For example: <code>scp -r ./dist/* [username]@[server_ip]:/var/www/dashy/html</code></p><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="apache"></a>Apache<a class="hash-link" href="#apache" title="Direct link to heading">#</a></h3><p>Copy Dashy's dist folder to your apache server, <code>sudo cp -r ./dashy/dist /var/www/html/dashy</code>.</p><p>In your Apache config, <code>/etc/apche2/apache2.conf</code> add:</p><div class="codeBlockContainer_K1bP"><div class="codeBlockContent_hGly"><pre tabindex="0" class="prism-code language-undefined codeBlock_23N8 thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_39YC"><span class="token-line" style="color:#F8F8F2"><span class="token plain"><Directory /var/www/html></span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> Options Indexes FollowSymLinks</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> AllowOverride All</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"> Require all granted</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain"></Directory></span></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_Ue-o clean-btn">Copy</button></div></div><p>Add a <code>.htaccess</code> file within <code>/var/www/html/dashy/.htaccess</code>, and add:</p><div class="codeBlockContainer_K1bP"><div class="codeBlockContent_hGly"><pre tabindex="0" class="prism-code language-undefined codeBlock_23N8 thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_39YC"><span class="token-line" style="color:#F8F8F2"><span class="token plain">Options -MultiViews</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">RewriteEngine On</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">RewriteCond %{REQUEST_FILENAME} !-f</span></span><span class="token-line" style="color:#F8F8F2"><span class="token plain">RewriteRule ^ index.html [QSA,L]</span></span></code></pre><button type="button" aria-label="Copy code to clipboard" class="copyButton_Ue-o clean-btn">Copy</button></div></div><p>Then restart Apache, with <code>sudo systemctl restart apache2</code></p><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="cpanel"></a>cPanel<a class="hash-link" href="#cpanel" title="Direct link to heading">#</a></h3><ol><li>Login to your WHM</li><li>Open 'Feature Manager' on the left sidebar</li><li>Under 'Manage feature list', click 'Edit'</li><li>Find 'Application manager' in the list, enable it and hit 'Save'</li><li>Log into your users cPanel account, and under 'Software' find 'Application Manager'</li><li>Click 'Register Application', fill in the form using the path that Dashy is located, and choose a domain, and hit 'Save'</li><li>The application should now show up in the list, click 'Ensure dependencies', and move the toggle switch to 'Enabled'</li><li>If you need to change the port, click 'Add environmental variable', give it the name 'PORT', choose a port number and press 'Save'.</li><li>Dashy should now be running at your selected path an on a given port</li></ol><p><strong><a href="#management">⬆️ Back to Top</a></strong></p><hr><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2LWZ" id="authentication-1"></a>Authentication<a class="hash-link" href="#authentication-1" title="Direct link to heading">#</a></h2><p>Dashy has built-in authentication and login functionality. However, since this is handled on the client-side, if you are using Dashy in security-critical situations, it is recommended to use an alternate method for authentication, such as <a href="https://www.authelia.com/" target="_blank" rel="noopener noreferrer">Authelia</a>, a VPN or web server and firewall rules. For more info, see <strong><a href="/docs/authentication">Authentication Docs</a></strong>.</p><p><strong><a href="#management">⬆️ Back to Top</a></strong></p></div><footer class="row docusaurus-mt-lg"><div class="col"><a href="https://github.com/Lissy93/dashy/edit/gh-pages/docs/docs/management.md" target="_blank" rel="noreferrer noopener"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_2_ui" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_3DPF"></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/configuring"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« Configuring</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/troubleshooting"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Troubleshooting »</div></a></div></nav></div></div><div class="col col--3"><div class="tableOfContents_35-E thin-scrollbar"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#providing-assets" class="table-of-contents__link">Providing Assets</a></li><li><a href="#running-commands" class="table-of-contents__link">Running Commands</a></li><li><a href="#healthchecks" class="table-of-contents__link">Healthchecks</a></li><li><a href="#logs-and-performance" class="table-of-contents__link">Logs and Performance</a></li><li><a href="#auto-starting-at-system-boot" class="table-of-contents__link">Auto-Starting at System Boot</a></li><li><a href="#securing" class="table-of-contents__link">Securing</a></li><li><a href="#updating" class="table-of-contents__link">Updating</a><ul><li><a href="#updating-docker-container" class="table-of-contents__link">Updating Docker Container</a></li><li><a href="#automatic-docker-updates" class="table-of-contents__link">Automatic Docker Updates</a></li><li><a href="#updating-dashy-from-source" class="table-of-contents__link">Updating Dashy from Source</a></li></ul></li><li><a href="#web-server-configuration" class="table-of-contents__link">Web Server Configuration</a><ul><li><a href="#nginx" class="table-of-contents__link">NGINX</a></li><li><a href="#apache" class="table-of-contents__link">Apache</a></li><li><a href="#cpanel" class="table-of-contents__link">cPanel</a></li></ul></li><li><a href="#authentication-1" class="table-of-contents__link">Authentication</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">Intro</div><ul class="footer__items"><li class="footer__item"><a href="https://github.com/lissy93/dashy" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub</a></li><li class="footer__item"><a href="https://demo.dashy.to" target="_blank" rel="noopener noreferrer" class="footer__link-item">Live Demo</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/quick-start">Quick Start</a></li><li class="footer__item"><a class="footer__link-item" href="/docs">Documentation</a></li></ul></div><div class="col footer__col"><div class="footer__title">Setup Guide</div><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/docs/deployment">Deploying</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/configuring">Configuring</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/management">Management</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/troubleshooting">Troubleshooting</a></li></ul></div><div class="col footer__col"><div class="footer__title">Feature Docs Pt 1</div><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/docs/authentication">Authentication</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/alternate-views">Alternate Views</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/backup-restore">Backup & Restore</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/icons">Icons</a></li></ul></div><div class="col footer__col"><div class="footer__title">Feature Docs Pt 2</div><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/docs/multi-language-support">Language Switching</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/status-indicators">Status Indicators</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/searching">Searching & Shortcuts</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/theming">Theming</a></li></ul></div><div class="col footer__col"><div class="footer__title">Community</div><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/docs/developing">Developing</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/development-guides">Development Guides</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/contributing">Contributing</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/showcase">Showcase</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/credits">Credits</a></li></ul></div><div class="col footer__col"><div class="footer__title">Misc</div><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/docs/privacy">Privacy & Security</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/license">License</a></li><li class="footer__item"><a href="https://github.com/Lissy93/dashy/blob/master/.github/LEGAL.md" target="_blank" rel="noopener noreferrer" class="footer__link-item">Legal</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/code-of-conduct">Code of Conduct</a></li><li class="footer__item"><a class="footer__link-item" href="/docs/changelog">Changelog</a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright"><a href="https://dashy.to">Dashy</a> - The Self-Hosted Dashboard for your Homelab<br>License under <a href="https://github.com/Lissy93/dashy/blob/master/LICENSE">MIT</a>. Copyright © 2021 <a href="https://aliciasykes.com">Alicia Sykes</a></div></div></div></footer></div>
|
|
<script src="/assets/js/runtime~main.80849a44.js"></script>
|
|
<script src="/assets/js/main.92cfbc15.js"></script>
|
|
</body>
|
|
</html> |