{"id":986,"date":"2024-02-26T15:18:42","date_gmt":"2024-02-26T14:18:42","guid":{"rendered":"https:\/\/www.homeserver.lu\/?p=986"},"modified":"2024-03-06T11:03:43","modified_gmt":"2024-03-06T10:03:43","slug":"install-cockpit-management-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.homeserver.lu\/?p=986","title":{"rendered":"Install Cockpit management on Ubuntu"},"content":{"rendered":"\n<p>If you want to install <a href=\"https:\/\/cockpit-project.org\/running.html\" target=\"_blank\" rel=\"noreferrer noopener\">cockpit<\/a> on your server, follow these steps:<\/p>\n\n\n\n<p>To install cockpit on Ubuntu, run the following command:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt install cockpit<\/code><\/pre><\/div>\n\n\n\n<p>Additionally, install the following package for more detailed metrics:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt install cockpit-pcp<\/code><\/pre><\/div>\n\n\n\n<p>Now there is a bug in Ubuntu, prohibiting cockpit to update the system through the webinterface (packagekit cannot refresh cache whilst offline). This seems to have to do with differences in <em>netplan<\/em> and <em>network manager<\/em>. To overcome this, you have to create a a placeholder file and a network interface:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>nano \/etc\/NetworkManager\/conf.d\/10-globally-managed-devices.conf<\/code><\/pre><\/div>\n\n\n\n<p>Add the following two lines to that file. Save the file ant quit the <em>nano<\/em> editor.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> &#91;keyfile]\n unmanaged-devices=none<\/code><\/pre>\n\n\n\n<p><strong>Optionally: <\/strong>If you run Ubuntu on an ARM system, you may need to install the following packages:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>sudo apt install linux-modules-extra-raspi<\/code><\/pre><\/div>\n\n\n\n<p>Now set up a dummy network interface:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>nmcli con add type dummy con-name fake ifname fake0 ip4 1.2.3.4\/24 gw4 1.2.3.1<\/code><\/pre><\/div>\n\n\n\n<p>Reboot your machine. Now you should be able to update the packages in the web interface.<\/p>\n\n\n\n<p>Cockpit should be starting automatically. If this does not happen, configure it to do so:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>systemctl start cockpit\nsystemctl enable cockpit<\/code><\/pre><\/div>\n\n\n\n<p>Access your cockpit installion under https:\/\/my.server.IP.address:9090<\/p>\n\n\n\n<p>Source: <a href=\"https:\/\/cockpit-project.org\/faq.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/cockpit-project.org\/faq.html<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Auto start issues?<\/h2>\n\n\n\n<p>If you happen to see the following error when enabling cockpit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>The unit files have no installation config (WantedBy=, RequiredBy=, Also=, Alias= settings in the &#91;Install] section, and DefaultInstance= for template units). This means they are not meant to be enabled using systemctl.<\/code><\/pre>\n\n\n\n<p>Than you have to edit the configuration file:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo nano \/usr\/lib\/systemd\/system\/cockpit.service<\/code><\/pre><\/div>\n\n\n\n<p>And add the following lines at the end, save and start the service:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>[Install]\nWantedBy=multi-user.target<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>systemctl enable cockpit.service\nsystemctl start cockpit.service<\/code><\/pre><\/div>\n\n\n\n<p>source: <a href=\"https:\/\/mj57.github.io\/2021\/03\/Installer-Cockpit\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/mj57.github.io\/2021\/03\/Installer-Cockpit\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to install cockpit on your server, follow these steps: To install cockpit on Ubuntu, run the following command: Additionally, install the following package for more detailed metrics: Now there is a bug in Ubuntu, prohibiting cockpit to update the system through the webinterface (packagekit cannot refresh cache whilst offline). This seems to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-986","post","type-post","status-publish","format-standard","hentry","category-cli"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/986","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=986"}],"version-history":[{"count":5,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/986\/revisions"}],"predecessor-version":[{"id":1002,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/986\/revisions\/1002"}],"wp:attachment":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}