{"id":7102,"date":"2026-02-12T15:00:32","date_gmt":"2026-02-12T13:00:32","guid":{"rendered":"https:\/\/xn--jyvskyl-7wae.hacklab.fi\/?post_type=wz_knowledgebase&#038;p=7102"},"modified":"2026-02-12T15:45:56","modified_gmt":"2026-02-12T13:45:56","slug":"octoprint","status":"publish","type":"wz_knowledgebase","link":"https:\/\/xn--jyvskyl-7wae.hacklab.fi\/en\/wikipage\/octoprint\/","title":{"rendered":"OctoPrint"},"content":{"rendered":"\n<p>Hacklab JKL has a 3D printing cabinet with a printer inside and a printer on top. These printers are used by members of the Hacklab for all sorts of projects, and the one inside the cabinet is available for printing remotely (via web). There is a fire alarm inside the 3D printing enclosure which is set up in such a way that in case of a fire, the power to the 3D printers will be shut off. <s>There is also an automatic timer that shuts of the power if 30 minutes passes without any printing going on (more accurately, if the computer is inactive for 30 minutes).<\/s><\/p>\n\n\n\n<p>As of 2026-02-12 the timed shutoff is disabled, since it was shutting down the system in the middle of multi hour print jobs. <\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>Note:<\/strong> It&#8217;s also possible to use the printers via the buttons on the 3D printers themselves should you wish to do so.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">OctoPrint<\/h2>\n\n\n\n<p>OctoPrint is a program that lets you print with 3D printers from a computer. That way you don&#8217;t have to fiddle around with the buttons on the 3D printer itself, which can be tedious.<\/p>\n\n\n\n<p>Octoprint is installed on the 3D printing computer in <code class=\"\" data-line=\"\">\/home\/octoprint\/octoprint-venv<\/code>.<\/p>\n\n\n\n<p>There are two instances of OctoPrint running on the machine.<\/p>\n\n\n\n<p><strong>Primary:<\/strong> Controls the printer inside the enclosure, and is available for remote printing<\/p>\n\n\n\n<p><strong>Secondary:<\/strong> Controls the printer on top of the enclosure, and is only available from the 3D printing computer<\/p>\n\n\n\n<p>The two instances of OctoPrint start when the machine boots, prompted by the services <code class=\"\" data-line=\"\">\/etc\/systemd\/system\/octoprint-primary.service<\/code> and <code class=\"\" data-line=\"\">\/etc\/systemd\/system\/octoprint-secondary.service<\/code>.<\/p>\n\n\n\n<p>The OctoPrint server is launched like so: <code class=\"\" data-line=\"\">\/home\/octoprint\/octoprint-venv\/bin\/octoprint -b \/home\/octoprint\/.octoprint-primary<\/code><\/p>\n\n\n\n<p>This command launches an instance of OctoPrint which reads configuration and reads\/writes data in the specified folder.<\/p>\n\n\n\n<p>The configuration\/data folders are <code class=\"\" data-line=\"\">\/home\/octoprint\/.octoprint-primary<\/code> and <code class=\"\" data-line=\"\">\/home\/octoprint\/.octoprint-secondary<\/code> for the primary and secondary instance of OctoPrint, respectively.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Changing the settings of OctoPrint<\/h2>\n\n\n\n<p>Sometimes you might want to change the settings of an OctoPrint instance.<\/p>\n\n\n\n<p>Perhaps we are replacing a 3D printer with another and need to change the printer profile and serial connection details, add some special GCODE instructions, etc.<\/p>\n\n\n\n<p>Configuring the OctoPrint instances can be done in two ways, via the GUI or config files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Via the GUI<\/h3>\n\n\n\n<p>1. Click the user button in the top right corner, click Logout<\/p>\n\n\n\n<p>2. Click on &#8220;Login&#8221; and log in as the admin user (credentials should be saved in Firefox)<\/p>\n\n\n\n<p>3. Click the spanner symbol to open the settings window.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Via the config files<\/h3>\n\n\n\n<p>The config files are located in <code class=\"\" data-line=\"\">\/home\/octoprint\/.octoprint-primary <\/code>and <code class=\"\" data-line=\"\">\/home\/octoprint\/.octoprint-secondary<\/code>, respectively. <code class=\"\" data-line=\"\">config.yaml<\/code> holds most of the settings, but there is also GCODE scripts in <code class=\"\" data-line=\"\">\/scripts\/gcode <\/code>and printer profiles in <code class=\"\" data-line=\"\">\/printerProfiles<\/code>, for example. Edit these files and then restart the octoprint instance with this command<\/p>\n\n\n\n<p><code class=\"\" data-line=\"\">systemctl restart octoprint-primary<\/code><\/p>\n\n\n\n<p><strong>Note<\/strong>: This command will switch off and on the power to both printers! Do not do this while someone is printing!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Settings<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Printer profiles<\/h4>\n\n\n\n<p>A printer profile is a configuration for a printer device defining fields such as print volume and bounding box for the movement of the axes. It can be configured under &#8220;Printer profiles&#8221; in OctoPrint or under<\/p>\n\n\n\n<p><code class=\"\" data-line=\"\">\/home\/octoprint\/printerProfiles<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Serial devices<\/h4>\n\n\n\n<p>The printers are identified by OctoPrint through a serial device id. This can be configured under &#8220;Serial Connection&#8221; in OctoPrint, or under the <code class=\"\" data-line=\"\">serial<\/code> field in <code class=\"\" data-line=\"\">\/home\/octoprint-primary\/config.yaml<\/code>. The printers are set up with symlinks so that they can be uniquly identified with a non-changing, human-readable identifier. At the time of writing this is <code class=\"\" data-line=\"\">\/dev\/prusa<\/code> (the i3 MK3S) and <code class=\"\" data-line=\"\">\/dev\/prusa-mk4<\/code> (the MK4).<\/p>\n\n\n\n<p>In order to list these devices, you can run this command:<\/p>\n\n\n\n<p><code class=\"\" data-line=\"\">ls \/dev\/ttyACM* \/dev\/prusa* -l<\/code><\/p>\n\n\n\n<p>If both printers are connected with USB you should see <code class=\"\" data-line=\"\">\/dev\/prusa<\/code> and<\/p>\n\n\n\n<p><code class=\"\" data-line=\"\">\/dev\/prusa-mk4<\/code> listed here. If not, try restarting them or unplugging\/pluggin the USB back in.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Adding a new serial device<\/h4>\n\n\n\n<p>If you have a new printer and wish to add such a symlink, first see if you can find it listed as <code class=\"\" data-line=\"\">\/dev\/ttyACM*,<\/code> where <code class=\"\" data-line=\"\">*<\/code> is a number.<\/p>\n\n\n\n<p>Then you can run this command to see more details:<\/p>\n\n\n\n<p><code class=\"\" data-line=\"\">udevadm info \/dev\/ttyACM1<\/code><\/p>\n\n\n\n<p>This will list a whole bunch of details about the printer. You will want to take note of the value listed as <code class=\"\" data-line=\"\">ID_SERIAL_SHORT<\/code>, such as <code class=\"\" data-line=\"\">91351875815-1231123<\/code><\/p>\n\n\n\n<p>In order to add a new symlink you need to edit to the <code class=\"\" data-line=\"\">\/etc\/udev\/rules.d\/80-octoprint.rules<\/code> file. Add a line like this:<\/p>\n\n\n\n<p><code class=\"\" data-line=\"\">ACTION==&quot;add|change&quot;, ATTRS{serial}==&quot;91351875815-1231123&quot;, SYMLINK+=&quot;my-printer&quot;, GROUP=&quot;octoprint&quot;<\/code><\/p>\n\n\n\n<p>After that your printer will be available as <code class=\"\" data-line=\"\">\/dev\/my-printer<\/code>. You can verify this by running<\/p>\n\n\n\n<p><code class=\"\" data-line=\"\">ls \/dev\/ttyACM* \/dev\/my-printer -l<\/code><\/p>\n\n\n\n<p>After that you can add the printer under the <code class=\"\" data-line=\"\">additionalPorts<\/code> field in <code class=\"\" data-line=\"\">config.yaml <\/code>or &#8220;Additional fields&#8221; under &#8220;Serial Connection&#8221; in the settings panel.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Power automation<\/h4>\n\n\n\n<p>The power to the cabinet is manipulated with the program <code class=\"\" data-line=\"\">\/home\/octoprint\/virta\/virta<\/code>.<\/p>\n\n\n\n<p>This can be called like so:<\/p>\n\n\n\n<p><code class=\"\" data-line=\"\">\/home\/octoprint\/virta\/virta stop<\/code><\/p>\n\n\n\n<p>It accepts three different arguments:<\/p>\n\n\n\n<p>&#8211; <code class=\"\" data-line=\"\">start<\/code><\/p>\n\n\n\n<p>&#8211; <code class=\"\" data-line=\"\">stop<\/code><\/p>\n\n\n\n<p>&#8211; <code class=\"\" data-line=\"\">init<\/code><\/p>\n\n\n\n<p>This program is called from various locations in order to turn on\/off the power to the power brick that the 3D printers are connected to.<\/p>\n\n\n\n<p>Notably, <code class=\"\" data-line=\"\">\/etc\/systemd\/system\/octoprint-primary.service<\/code> uses the virta program to turn on\/off power to the 3D printer cabinet.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Timed shutoff<\/h4>\n\n\n\n<p>The automatic shutoff of the power was unstable. It probably periocially checked for system activity, and was reported to shut off the power after 30 minutes, but repeated malfunctioning led us to disable that feature.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hacklab JKL has a 3D printing cabinet with a printer inside and a printer on top. These printers are used by members of the Hacklab for all sorts of projects, and the one inside the cabinet is available for printing remotely (via web). There is a fire alarm inside the 3D printing enclosure which is [&hellip;]<\/p>\n","protected":false},"author":34,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"wzkb_category":[193],"wzkb_tag":[268,269,157,97],"class_list":["post-7102","wz_knowledgebase","type-wz_knowledgebase","status-publish","hentry","wzkb_category-kerhohuone","wzkb_tag-3d-printing","wzkb_tag-prusa","wzkb_tag-tyokalu","wzkb_tag-tyokalut"],"acf":[],"_links":{"self":[{"href":"https:\/\/xn--jyvskyl-7wae.hacklab.fi\/en\/wp-json\/wp\/v2\/wz_knowledgebase\/7102"}],"collection":[{"href":"https:\/\/xn--jyvskyl-7wae.hacklab.fi\/en\/wp-json\/wp\/v2\/wz_knowledgebase"}],"about":[{"href":"https:\/\/xn--jyvskyl-7wae.hacklab.fi\/en\/wp-json\/wp\/v2\/types\/wz_knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/xn--jyvskyl-7wae.hacklab.fi\/en\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/xn--jyvskyl-7wae.hacklab.fi\/en\/wp-json\/wp\/v2\/comments?post=7102"}],"version-history":[{"count":5,"href":"https:\/\/xn--jyvskyl-7wae.hacklab.fi\/en\/wp-json\/wp\/v2\/wz_knowledgebase\/7102\/revisions"}],"predecessor-version":[{"id":7111,"href":"https:\/\/xn--jyvskyl-7wae.hacklab.fi\/en\/wp-json\/wp\/v2\/wz_knowledgebase\/7102\/revisions\/7111"}],"wp:attachment":[{"href":"https:\/\/xn--jyvskyl-7wae.hacklab.fi\/en\/wp-json\/wp\/v2\/media?parent=7102"}],"wp:term":[{"taxonomy":"wzkb_category","embeddable":true,"href":"https:\/\/xn--jyvskyl-7wae.hacklab.fi\/en\/wp-json\/wp\/v2\/wzkb_category?post=7102"},{"taxonomy":"wzkb_tag","embeddable":true,"href":"https:\/\/xn--jyvskyl-7wae.hacklab.fi\/en\/wp-json\/wp\/v2\/wzkb_tag?post=7102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}