|
@@ -0,0 +1,81 @@
|
|
|
+ <!DOCTYPE html>
|
|
|
+ <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
|
|
+ <head>
|
|
|
+ <title>Running HostMon in Docker</title>
|
|
|
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="keywords" content="Install HostMon In Docker,Run HostMon In Docker,Application Dashboard,HostMon,Heimdall Alternative,DashMachine Alternative,Homer Alternative,Self-Hosted,Docker Made Easy,Service Monitoring,Browser Based,System Administration,Docker,Javascript,Express,Host Dashboard,Host Monitor,Install Guide,Linux,NodeJS,Home Lab,Ping,Web Based Tools,WOL,Wake-On-LAN,Web Based,Apache Guacamole,Docker Container,Docker Simplified,How To,Tutorial,i12bretro">
|
|
|
+ <meta name="author" content="i12bretro">
|
|
|
+ <meta name="description" content="Running HostMon in Docker">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <meta name="revised" content="03/23/2022 09:17:27 AM" />
|
|
|
+ <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
|
|
|
+ <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
|
|
+ <script type="text/javascript" src="includes/js/steps.js"></script>
|
|
|
+ <link href="css/steps.css" rel="stylesheet" type="text/css" />
|
|
|
+ </head>
|
|
|
+ <body>
|
|
|
+ <div id="gridContainer">
|
|
|
+ <div class="topMargin"></div>
|
|
|
+ <div id="listName" class="topMargin">
|
|
|
+ <h1>Running HostMon in Docker</h1>
|
|
|
+ </div>
|
|
|
+ <div></div>
|
|
|
+ <div id="content">
|
|
|
+ <h2>What is HostMon?</h2>
|
|
|
+
|
|
|
+<blockquote>
|
|
|
+<p><em>HostMon is a simple web-based host monitor and application dashboard. It can be used to monitor the real-time status of hosts and services running in your homelab environment. In addition to monitoring, HostMon has built-in Wake-On-LAN (WOL) capability, SSH client, real-time ping output and the ability to link to your existing Apache Guacamole installation to remotely control hosts from the within browser.<br />
|
|
|
+<br />
|
|
|
+The HostMon application is written in javascript and uses a SQLite database backend. -<a href="https://github.com/i12bretro/HostMon" target="_blank">https://github.com/i12bretro/HostMon</a></em></p>
|
|
|
+</blockquote>
|
|
|
+
|
|
|
+<h2>Installing Docker</h2>
|
|
|
+
|
|
|
+<ol>
|
|
|
+ <li>Log into the Linux based device</li>
|
|
|
+ <li>Run the following commands in the terminal
|
|
|
+ <div class="codeBlock"># install prerequisites<br />
|
|
|
+ sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y<br />
|
|
|
+ # add docker gpg key<br />
|
|
|
+ curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -<br />
|
|
|
+ # add docker software repository<br />
|
|
|
+ sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"<br />
|
|
|
+ # install docker<br />
|
|
|
+ sudo apt install docker-ce docker-compose containerd.io -y<br />
|
|
|
+ # enable and start docker service<br />
|
|
|
+ sudo systemctl enable docker && sudo systemctl start docker<br />
|
|
|
+ # add the current user to the docker group<br />
|
|
|
+ sudo usermod -aG docker $USER<br />
|
|
|
+ # reauthenticate for the new group membership to take effect<br />
|
|
|
+ su - $USER</div>
|
|
|
+ </li>
|
|
|
+</ol>
|
|
|
+
|
|
|
+<h2>Running HostMon</h2>
|
|
|
+
|
|
|
+<ol>
|
|
|
+ <li>Now that Docker is installed, run the following commands to setup the HostMon Docker container and run it
|
|
|
+ <div class="codeBlock"># create working directories<br />
|
|
|
+ mkdir ~/docker/hostmon -p<br />
|
|
|
+ # set owner of working directories<br />
|
|
|
+ sudo chown "$USER":"$USER" ~/docker -R<br />
|
|
|
+ # create the hostmon docker container<br />
|
|
|
+ docker create -ti --name hostmon i12bretro/hostmon<br />
|
|
|
+ # export the hostmon database<br />
|
|
|
+ docker cp hostmon:/app/data/hostmon.db ~/docker/hostmon/hostmon.db<br />
|
|
|
+ # remove the temporary hostmon container<br />
|
|
|
+ docker rm hostmon -f<br />
|
|
|
+ # run hostmon with persistent database<br />
|
|
|
+ docker run -d --name hostmon -v ~/docker/hostmon:/app/data -p 3000:3000 --restart=unless-stopped i12bretro/hostmon</div>
|
|
|
+ </li>
|
|
|
+ <li>Open a web browser and navigate to http://DNSorIP:3000</li>
|
|
|
+ <li>Welcome to HostMon running in Docker</li>
|
|
|
+</ol>
|
|
|
+
|
|
|
+<p>Documentation: <a href="https://hub.docker.com/r/i12bretro/hostmon" target="_blank">https://hub.docker.com/r/i12bretro/hostmon</a></p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </body>
|
|
|
+ </html>
|
|
|
+
|