{"id":5821,"date":"2026-09-24T16:57:34","date_gmt":"2026-09-24T07:57:34","guid":{"rendered":"https:\/\/donguri3.net\/server-tech\/ubuntu-cockpit-sensors-install-2\/"},"modified":"2026-09-24T16:57:36","modified_gmt":"2026-09-24T07:57:36","slug":"ubuntu-cockpit-sensors-install","status":"publish","type":"post","link":"https:\/\/donguri3.net\/en\/server-tech\/linux-server-network\/ubuntu-cockpit-sensors-install\/","title":{"rendered":"Monitoring CPU Temperature from the Browser on Ubuntu Server by Installing Cockpit and cockpit-sensors"},"content":{"rendered":"<p>On our previously operated PT3 recording server, we experienced an issue where a sudden cooling fan failure caused the CPU to overheat, leading to a system halt due to thermal runaway.<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"5LWOr65M5V\">\n<p><a href=\"https:\/\/donguri3.net\/en\/server-tech\/linux-server-network\/pt3-server-fan-failure-thermal-runaway-container-migration\/\">Thermal Runaway Caused by PT3 Recording Server Fan Failure and Emergency Evacuation of Key Containers<\/a><\/p>\n<\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"\u201cThermal Runaway Caused by PT3 Recording Server Fan Failure and Emergency Evacuation of Key Containers\u201d \u2014 Nando Kobo\" src=\"https:\/\/donguri3.net\/en\/server-tech\/linux-server-network\/pt3-server-fan-failure-thermal-runaway-container-migration\/embed\/#?secret=mXgnoq2b38#?secret=5LWOr65M5V\" data-secret=\"5LWOr65M5V\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>When running small form-factor PCs or spare PCs continuously as home servers, heat tends to get trapped inside the chassis, and fan degradation or blocked airflow directly leads to fatal hardware failures. This made us acutely realize the importance of setting up an environment where abnormal temperature rises can be detected routinely rather than reacting only after a failure occurs.<\/p>\n<p>Therefore, this time, we decided to set up &#8220;Cockpit&#8221;, a web-based console tool, on an environment running Ubuntu Server 26.04, and build a monitoring system that allows us to easily check hardware status and temperatures remotely via a browser.<\/p>\n<h2>Building an Environment to Check CPU Temperature and Hardware Status Just by Opening a Browser<\/h2>\n<p>The objectives and goals for hardware monitoring of the home server are as follows:<\/p>\n<ul>\n<li>Objective: To eliminate terminal-based CUI operations in order to detect early signs of trouble, enabling centralized management and remote monitoring of server resource status and hardware health via a web browser.<\/li>\n<li>Goal: To completely eliminate the hassle of logging in via SSH and executing commands each time, making it possible to check the temperature of each CPU core in real time simply by opening Cockpit in a web browser.<\/li>\n<\/ul>\n<h2>Limits of Cockpit&#8217;s Standard Features and the Hurdle of Installing Third-Party Plugins<\/h2>\n<p>Cockpit is a very lightweight and easy-to-handle foundation as a tool for easily managing Linux servers from a browser. However, in its default state, while Cockpit can visualize CPU and memory usage, disk I\/O, and network traffic, it lacks the functionality to view hardware &#8220;temperature&#8221; or &#8220;fan speed&#8221;.<\/p>\n<p>Furthermore, even when searching the official Ubuntu apt repositories, the temperature monitoring package (cockpit-sensors) is not officially included.<\/p>\n<p>Consequently, it is necessary to install <code>lm-sensors<\/code> on the OS side to retrieve motherboard and CPU temperatures, and then manually download a third-party plugin developed and published by the community on GitHub, correctly extracting and deploying it to Cockpit&#8217;s system directory.<\/p>\n<h2>Setup Procedure for Cockpit and cockpit-sensors<\/h2>\n<p>Starting from an environment where the installation of Ubuntu Server 26.04 is complete, we will proceed with setting up Cockpit itself and deploying the temperature monitoring plugin.<\/p>\n<h3>Installing and Enabling Cockpit<\/h3>\n<p>Install Cockpit from the official repository and enable socket activation so that the process starts only when accessed.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsudo apt update\nsudo apt install cockpit -y\nsudo systemctl enable --now cockpit.socket\n<\/pre>\n<p>If you have enabled a firewall such as UFW, open the web console&#8217;s listening port (9090).<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsudo ufw allow 9090\/tcp\n<\/pre>\n<h3>Installing lm-sensors and Auto-Detecting Sensors<\/h3>\n<p>To read temperature data from the hardware layer, install <code>lm-sensors<\/code> and automatically scan for hardware sensors.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsudo apt install lm-sensors -y\nsudo sensors-detect --auto\n<\/pre>\n<p>Once the scan is complete, verify whether temperature information is being retrieved normally in the terminal.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsensors\n<\/pre>\n<p>If temperatures for each CPU core (such as <code>Core 0: +50.0\u00b0C<\/code>) are outputted, the preparations on the OS side are complete.<\/p>\n<h3>Downloading and Manually Deploying cockpit-sensors<\/h3>\n<p>Obtain the release archive from the GitHub repository (ocristopfer\/cockpit-sensors) and place it in <code>\/usr\/share\/cockpit\/sensors<\/code>, which is the storage destination for Cockpit plugins.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# Download the release archive\nwget https:\/\/github.com\/ocristopfer\/cockpit-sensors\/releases\/download\/1.1\/cockpit-sensors.tar.xz\n\n# Extract the dist directory from the archive\ntar -xf cockpit-sensors.tar.xz cockpit-sensors\/dist\n\n# Deploy as the plugin directory\nsudo mv cockpit-sensors\/dist \/usr\/share\/cockpit\/sensors\n\n# Clean up the archive\nmv cockpit-sensors.tar.xz cockpit-sensors\/\n<\/pre>\n<p>After deployment, verify that the files within the directory are in a state where they can be correctly read by the web service.<\/p>\n<h2>Visualizing Temperature in the Web UI and the Challenge of Scrolling Discovered During Operation<\/h2>\n<p>Access the following URL from your browser and log in with a regular Ubuntu user account:<\/p>\n<p>https:\/\/&lt;Server IP Address&gt;:9090<\/p>\n<p>A new item named &#8220;Sensors&#8221; will be added under &#8220;Tools&#8221; in the left sidebar menu. Opening this tab displays the CPU temperatures retrieved via <code>lm-sensors<\/code> in a card format, allowing real-time monitoring of each core temperature from Core 0 to Core 3.<\/p>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/5b4864e5c10cc1d52b283e0ef106da61.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-5683\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/5b4864e5c10cc1d52b283e0ef106da61.png\" alt=\"CPU Temperature Display\" width=\"1167\" height=\"650\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/5b4864e5c10cc1d52b283e0ef106da61.png 1167w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/5b4864e5c10cc1d52b283e0ef106da61-300x167.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/5b4864e5c10cc1d52b283e0ef106da61-1024x570.png 1024w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/5b4864e5c10cc1d52b283e0ef106da61-768x428.png 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/5b4864e5c10cc1d52b283e0ef106da61-530x295.png 530w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/5b4864e5c10cc1d52b283e0ef106da61-565x315.png 565w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/5b4864e5c10cc1d52b283e0ef106da61-710x395.png 710w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/5b4864e5c10cc1d52b283e0ef106da61-725x404.png 725w\" sizes=\"(max-width: 1167px) 100vw, 1167px\" \/><\/a><\/p>\n<p>Without needing to log in via SSH and run the <code>sensors<\/code> command, we can now track CPU temperature trends simply by opening a browser, successfully realizing our target remote monitoring environment.<\/p>\n<p>On the other hand, when running the same plugin on another machine with a large number of sensors (such as PCH, battery, or configurations with multiple interfaces), a new issue came to light. When the detected cards were aligned vertically, a vertical scrollbar failed to appear within the Cockpit screen frame, resulting in sensor information placed at the bottom being cut off from view.<\/p>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/6431ab7f362544016017e77158666959.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-5682\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/6431ab7f362544016017e77158666959.png\" alt=\"Sensor Information Overflow\" width=\"1517\" height=\"907\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/6431ab7f362544016017e77158666959.png 1517w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/6431ab7f362544016017e77158666959-300x179.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/6431ab7f362544016017e77158666959-1024x612.png 1024w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/6431ab7f362544016017e77158666959-768x459.png 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/6431ab7f362544016017e77158666959-530x317.png 530w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/6431ab7f362544016017e77158666959-565x338.png 565w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/6431ab7f362544016017e77158666959-710x425.png 710w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/09\/6431ab7f362544016017e77158666959-725x433.png 725w\" sizes=\"(max-width: 1517px) 100vw, 1517px\" \/><\/a><\/p>\n<p>Since this is considered a display defect caused by CSS or container style specifications on the plugin side (such as overflow settings), we plan to cover code fixes to resolve this scrolling issue in detail in a future verification article.<\/p>\n<h2>Conclusion<\/h2>\n<p>Drawing from the lesson of past CPU thermal runaway caused by a fan failure, we introduced Cockpit and the third-party plugin <code>cockpit-sensors<\/code> to our Ubuntu Server 26.04 environment. By manually deploying a plugin not found in the official apt repository, we established an environment where we can remotely monitor the temperature of each CPU core in real time from a browser. Since an issue was identified where screens on certain multi-function machines could not scroll vertically and information was cut off, fixing the plugin&#8217;s display adjustments will be a future improvement task.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On our previously operated PT3 recording server, we experienced an issue where a sudden cooling fan failure ca [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":5683,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"https:\/\/donguri3.net\/?p=5681","footnotes":""},"categories":[1170],"tags":[51,52,105,10,131],"class_list":["post-5821","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-server-network","tag-git","tag-https","tag-linux","tag-server","tag-131","en-US"],"_links":{"self":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/comments?post=5821"}],"version-history":[{"count":1,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5821\/revisions"}],"predecessor-version":[{"id":5824,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5821\/revisions\/5824"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media\/5683"}],"wp:attachment":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media?parent=5821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/categories?post=5821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/tags?post=5821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}