0672.html 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Running Home Assistant in Docker</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Browser Based,Docker Made Easy,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,Container,Containerization,Docker,Docker Host,Docker How To,Docker Simplified,Docker Tutorial,Getting Started With Docker,Linux,Ubuntu,Home Assistant,HASS,Run Home Assistant In Docker,Home Assistant Docker Container,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Running Home Assistant in Docker">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="05/02/2022 12:03:50 PM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Running Home Assistant in Docker</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>What is Home Assistant?</h2>
  26. <blockquote>Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.<i> - <a href="https://www.home-assistant.io/" target="_blank">https://www.home-assistant.io/</a></i></blockquote>
  27. <h2>Installing Docker</h2>
  28. <ol>
  29. <li>Log into the Linux host and run the following commands in a terminal window
  30. <div class="codeBlock"># install prerequisites<br />
  31. sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y<br />
  32. # add docker gpg key<br />
  33. curl -fsSL https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release)/gpg | sudo apt-key add -<br />
  34. # add docker software repository<br />
  35. sudo add-apt-repository &quot;deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release) $(lsb_release -cs) stable&quot;<br />
  36. # install docker<br />
  37. sudo apt install docker-ce docker-compose containerd.io -y<br />
  38. # enable and start docker service<br />
  39. sudo systemctl enable docker &amp;&amp; sudo systemctl start docker<br />
  40. # add the current user to the docker group<br />
  41. sudo usermod -aG docker $USER<br />
  42. # reauthenticate for the new group membership to take effect<br />
  43. su - $USER</div>
  44. </li>
  45. </ol>
  46. <h2>Running Home Assistant Container</h2>
  47. <ol>
  48. <li>Continue with the following commands in a terminal window
  49. <div class="codeBlock"># create working directories<br />
  50. mkdir ~/docker/home-assistant -p<br />
  51. # set owner of working directories<br />
  52. sudo chown &quot;$USER&quot;:&quot;$USER&quot; ~/docker -R<br />
  53. # run the home assistant container<br />
  54. docker run -d --name home-assistant --privileged -e TZ=America/New_York -v ~/docker/home-assistant:/config --network=host --restart=unless-stopped homeassistant/home-assistant</div>
  55. </li>
  56. <li>Open a web browser and navigate to http://DNSorIP:8123/</li>
  57. <li>Wait while Home Assistant initializes</li>
  58. <li>Enter a Name, Username and Password to create a Home Assistant user account &gt; Click Create Account</li>
  59. <li>Enter a Name for this Home Assistant installation (ie Home)</li>
  60. <li>Click Detect to set the installation geolocation</li>
  61. <li>Verify the Unit System and Currency &gt; Click Next</li>
  62. <li>Select any anonymous data to share with the Home Assistant development team &gt; Click Next</li>
  63. <li>Click Finish</li>
  64. <li>Welcome to Home Assistant</li>
  65. </ol>
  66. <p>Source: <a href="https://www.home-assistant.io/installation/linux#install-home-assistant-container" target="_blank">https://www.home-assistant.io/installation/linux#install-home-assistant-container</a><br />
  67. Documentation: <a href="https://hub.docker.com/r/homeassistant/home-assistant" target="_blank">https://hub.docker.com/r/homeassistant/home-assistant</a></p> </div>
  68. </div>
  69. </body>
  70. </html>