0963.html 5.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Run MeshCentral - Remote Management Site - 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,Computer Management,Debian,How To Install MeshCentral,Linux,MeshCentral,MeshCentral Installation Guide,Remote Computer Management,Remote Management,Ubuntu,Web Based Utilities,Containerize,Containers,Docker,Docker Container,Docker Host,Docker How To,Docker Made Simple,Docker Setup Tutorial,Docker Simplified,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Run MeshCentral - Remote Management Site - in Docker">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="09/04/2024 08:39:06 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>Run MeshCentral - Remote Management Site - in Docker</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>What is MeshCentral?</h2>
  26. <blockquote><em>MeshCentral is a full computer management web site. With MeshCentral, you can run your own web server to remotely manage and control computers on a local network or anywhere on the internet. -<a href="https://github.com/Ylianst/MeshCentral" target="_blank">https://github.com/Ylianst/MeshCentral</a></em></blockquote>
  27. <h2>Installing Docker</h2>
  28. <ol>
  29. <li>Log into the Linux based device</li>
  30. <li>Run the following commands in the terminal
  31. <div class="codeBlock"># install prerequisites<br />
  32. sudo apt install apt-transport-https ca-certificates git curl software-properties-common gnupg-agent -y<br />
  33. # add docker gpg key<br />
  34. 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 />
  35. # add docker software repository<br />
  36. 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 />
  37. # install docker<br />
  38. sudo apt install docker-ce docker-compose containerd.io -y<br />
  39. # enable and start docker service<br />
  40. sudo systemctl enable docker &amp;&amp; sudo systemctl start docker<br />
  41. # add the current user to the docker group<br />
  42. sudo usermod -aG docker $USER<br />
  43. # reauthenticate for the new group membership to take effect<br />
  44. su - $USER</div>
  45. </li>
  46. </ol>
  47. <h2>Running MeshCentral</h2>
  48. <ol>
  49. <li>Now that Docker is installed, run the following commands to setup the MeshCentral Docker container and run it
  50. <div class="codeBlock"># create working directories<br />
  51. mkdir ~/docker/meshcentral/{data,user_files} -p &amp;&amp; mkdir ~/docker/mongodb -p<br />
  52. # set owner of working directories<br />
  53. sudo chown &quot;$USER&quot;:&quot;$USER&quot; ~/docker -R<br />
  54. # create docker network<br />
  55. docker network create containers<br />
  56. # run mongodb container<br />
  57. docker run -d --name=mongodb --network containers -v ~/docker/mongodb:/data/db --restart=unless-stopped mongo<br />
  58. # run meshcentral container<br />
  59. # update the HOSTNAME variable<br />
  60. docker run -d --name=meshcentral --network containers -p 8086:443 -e HOSTNAME=ubuntuserver.local -e REVERSE_PROXY=false -e IFRAME=false -e ALLOW_NEW_ACCOUNTS=false -e WEBRTC=false -e NODE_ENV=production -v ~/docker/meshcentral/data:/opt/meshcentral/meshcentral-data -v ~/docker/meshcentral/user_files:/opt/meshcentral/meshcentral-files --restart=unless-stopped typhonragewind/meshcentral:mongodb-latest<br />
  61. # update the config file<br />
  62. sed -Ei &#39;s/(&quot;NewAccounts&quot;: &quot;false&quot;,)/&quot;NewAccounts&quot;: &quot;false&quot;,\n\t&quot;allowedOrigin&quot;: true,/&#39; ~/docker/meshcentral/data/config.json<br />
  63. # restart the container<br />
  64. docker restart meshcentral</div>
  65. </li>
  66. <li>Open a web browser and navigate to https://DNSorIP:8086</li>
  67. <li>Accept the certificate warning</li>
  68. <li>Click the link to create an account</li>
  69. <li>Complete the form by entering an username, email and password &gt; Click Create Account</li>
  70. <li>Welcome to MeshCentral running in Docker</li>
  71. </ol>
  72. <p>Source: <a href="https://github.com/Typhonragewind/meshcentral-docker" target="_blank">https://github.com/Typhonragewind/meshcentral-docker</a></p> </div>
  73. </div>
  74. </body>
  75. </html>