# How to set up a remotely controlled 3D printer

## Introduction

With the availability of 3D printers swiftly increasing, more and more people have decided to start learning, experimenting, and working with 3D printers. The printers are often used as cost-efficient prototyping tools and supplement many home and office setups.

Leaving a 3D printer unattended can be considered a hazard. However, with adequate supervision, having remote access to your printer can make printing more time-efficient. By implementing [Meshnet](https://nordvpn.com/meshnet/) into your network configuration, you can forego [port forwarding](https://nordvpn.com/blog/port-forwarding/) and easily access your 3D printer while not being physically present.

This guide showcases how you can turn a Linux device into a remotely accessible 3D printer controller and how to remotely initiate print jobs using slicers over Meshnet.

## Before you begin <a href="#before-you-begin" id="before-you-begin"></a>

Make sure you have the following:

* A 3D printer
* A Linux device running a [supported distribution](/getting-started/how-to-start-using-meshnet/using-meshnet-on-linux.md#before-you-begin) that will function as the 3D printer controller
* Installed 3D printer firmware on the Linux device

An example device and firmware pair you may use could be a [Raspberry Pi](https://www.raspberrypi.com/) running [Klipper](https://www.klipper3d.org/) or [Octoprint](https://octoprint.org/).

{% hint style="info" %}
**Note**

For firmware installation instructions, refer to your selected firmware’s documentation.
{% endhint %}

## Setting up Meshnet <a href="#setting-up-meshnet" id="setting-up-meshnet"></a>

To enable secure remote connections to your device, you need to install NordVPN and enable Meshnet.

### Install NordVPN <a href="#install-nordvpn" id="install-nordvpn"></a>

Follow these steps to install NordVPN on your controller device:

1. Download and install the NordVPN Linux client by running the command below.\
   &#x20;

   <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">sh &#x3C;(wget -qO - https://downloads.nordcdn.com/apps/linux/install.sh)
   </code></pre>

   &#x20;
2. Log in to your NordVPN account.

### Log in to NordVPN <a href="#log-in-to-nordvpn" id="log-in-to-nordvpn"></a>

You can log in to your NordVPN account without the use of a graphical user interface (GUI) in two ways:

* By running the `nordvpn login` command with the `--token` flag
* By running the `nordvpn login` command with the `--callback` flag

Instructions for both methods are outlined below.

<details>

<summary>Log in using a token</summary>

1. On any device, log in to your [Nord Account](https://my.ndaccount.com/) dashboard and select the **Meshnet (by NordVPN)** card.

   <div align="left"><figure><img src="/files/SbXZ7hpBGcEogKOKWltB" alt="&#x22;Meshnet (by NordVPN)&#x22; card highlighted."><figcaption></figcaption></figure></div>

2. Under **Advanced settings**, select **Get access token**.

   <div align="left"><figure><img src="/files/Eznf4Fz6ethvZgiXa3K0" alt="Clicking the &#x27;Set up NordVPN manually&#x27; button."><figcaption></figcaption></figure></div>

3. Enter the verification code sent to your email address.

4. Under **Access token**, click **Generate new token**.

   <div align="left"><figure><img src="/files/yTnGkAmJvCL7tblVpF0h" alt="Clicking &#x27;Generate new token&#x27;."><figcaption></figcaption></figure></div>

5. In the dialog that appears, choose either a token that expires in 30 days or one that never expires, and then select **Generate token**.

   <div align="left"><figure><img src="/files/JRvc2iH3z596eQGJ79n8" alt="Selecting the token expiry option." width="563"><figcaption></figcaption></figure></div>

6. Select **Copy and close**.

7. On your controller, run the `nordvpn login --token <your_token>` command, replacing `<your_token>` with the copied token.\
   &#x20;\
   **Example**

   <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">nordvpn login --token 3fe460cefb8dcf1478c92e45908cec9f9bdbadf7a456a6dfb35dc2c58ee39d5b
   </code></pre>

You should now see a welcome message.

</details>

<details>

<summary>Log in using a URL</summary>

1. Run the following command:\
   &#x20;

   <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">nordvpn login
   </code></pre>

   &#x20;
2. Open the provided link on any device in your browser.
3. Complete the login procedure.
4. Right-click the **Continue** button and select **Copy link address**.
5. Run the `nordvpn login --callback "<URL>"` command, replacing `<URL>` with the previously copied link address.\
   &#x20;\
   **Example**

   <pre class="language-bash" data-overflow="wrap"><code class="lang-bash">nordvpn login --callback "nordvpn://login?action=login&#x26;exchange_token=MGFlY2E1NmE4YjM2NDM4NjUzN2VjOWIzYWM3ZTU3ZDliNDdiNzRjZTMwMjE5YjkzZTNhNTI3ZWZlOTIwMGJlOQ%3D%3D&#x26;status=done"
   </code></pre>

You should now see a welcome message.

</details>

{% hint style="success" %}
**Tip**

To preserve your token when logging out of the NordVPN app, use the `nordvpn logout --persist-token` command. Otherwise, your token will be revoked.&#x20;
{% endhint %}

{% hint style="info" %}
**Note**

If you encounter the error message “Whoops! Permission denied accessing /run/nordvpn/nordvpnd.sock,” enter `sudo usermod -aG nordvpn $USER`. Then, reboot your controller and log back in.
{% endhint %}

### Enable Meshnet <a href="#enable-meshnet" id="enable-meshnet"></a>

Upon logging in, you can [enable Meshnet on Linux](/getting-started/how-to-start-using-meshnet/using-meshnet-on-linux.md#enable-meshnet-on-linux) by typing this command:

{% code overflow="wrap" %}

```bash
nordvpn set meshnet on
```

{% endcode %}

To check your device’s Nord name and the Meshnet IP address, enter the following command:

{% code overflow="wrap" %}

```bash
nordvpn meshnet peer list
```

{% endcode %}

**Example**

<div align="left"><figure><img src="/files/4cFaB1jXswn5Ju7514jw" alt="Output of the &#x27;nordvpn meshnet peer list&#x27; command" width="563"><figcaption></figcaption></figure></div>

You will also see your Meshnet peer devices with their corresponding permissions.

## Setting up 3D slicer software <a href="#setting-up-3d-slicer-software" id="setting-up-3d-slicer-software"></a>

A slicer is an intermediary that transforms a 3D design file into [G-code](https://en.wikipedia.org/wiki/G-code) — a set of instructions that a 3D printer understands. While many printers come with their own slicers, there are various other options that you may choose to use.

This section covers the process of adding the remote Meshnet 3D printer controller using the following slicers on desktop devices:

* [UltiMaker Cura](https://ultimaker.com/software/ultimaker-cura/)
* [PrusaSlicer](https://www.prusa3d.com/)
* [Slic3r](https://slic3r.org/)

{% hint style="info" %}
**Note**

Certain firmware might limit controller access exclusively to its local network. In these situations, you will need to include the Meshnet IP range `100.64.0.0/10` as a trusted network within your controller's configuration. Refer to the firmware's documentation on how to make such changes.
{% endhint %}

<details>

<summary>UltiMaker Cura</summary>

### Set up Ultimaker Cura <a href="#set-up-ultimaker-cura" id="set-up-ultimaker-cura"></a>

Begin by preparing Ultimaker Cura for use on your device:

1. Download and install the latest version of [UltiMaker Cura](https://ultimaker.com/software/ultimaker-cura/) for your OS.
2. Launch **UltiMaker Cura**.
3. Follow the instructions provided in the onboarding dialog.

### Add your printer controller <a href="#add-your-printer-controller" id="add-your-printer-controller"></a>

For this part, a controller running Klipper is used. By default, such controllers are not recognized by Cura. Due to this, an additional plug-in must be installed.

1. In the upper-right corner, click **Marketplace**.
2. Search for `Moonraker` and install the **Moonraker connection** plugin.

   <div align="left"><figure><img src="/files/GqrQknkAk948x1ZkIfnf" alt="&#x22;Moonraker connection&#x22; plugin visible after entering &#x22;Moonraker&#x22; in the search field."><figcaption></figcaption></figure></div>

   &#x20;
3. Accept the license agreement and restart **Cura**.
4. From the menu bar, select **Settings** > **Printer** > **Manage printers**.&#x20;

   <div align="left"><figure><img src="/files/DSHhIZNuz5csXajmj98p" alt="Selecting &#x22;Manage printers&#x22;"><figcaption></figcaption></figure></div>

   &#x20;
5. In the **Preferences** window, click **Connect Moonraker**.
6. In the **Address (URL)** field, enter `http://`, followed by the Nord name or the Meshnet IP address of your controller, and click **Create**.\
   &#x20;\
   **Example**&#x20;

   <div align="left"><figure><img src="/files/BPtKeP5TraI3fHcj5kiz" alt="Clicking &#x22;Create&#x22; after entering the Nord name and the port number of the 3D printer controller."><figcaption></figcaption></figure></div>

The printer is now added. After uploading and slicing your model file, choose the **Upload to printer** option in the lower-right corner of the app to print over Meshnet.

</details>

<details>

<summary>PrusaSlicer</summary>

1. Download and install the latest version of [PrusaSlicer](https://www.prusa3d.com/) for your OS.
2. Launch **PrusaSlicer**.
3. From the main app screen, switch to the **Printer settings** tab and click the gear button.

   <div align="left"><figure><img src="/files/ULArj9riKLLKTjgn3uf9" alt="Clicking the gear button under the &#x22;Printer settings&#x22; tab."><figcaption></figcaption></figure></div>

   &#x20;
4. In the pop-up dialog, fill in the details of your 3D printer.
   * In the **Descriptive name for the printer** field, enter a custom name for your 3D printer.
   * From the **Host type** dropdown menu, select the firmware of your controller.
   * In the **Hostname, IP or URL** field, enter the Nord name or Meshnet IP address of your controller.\
     &#x20;\
     **Example**

     <div align="left"><figure><img src="/files/UrsZb9E2IuHOUsHhbZJh" alt="Custom name, firmware, and the Nord name of the 3D printer controller."><figcaption></figcaption></figure></div>

     &#x20;
5. Click **Test** to check whether the connection to the controller can be established successfully.
6. Select **OK** to save the changes and close the dialog.\
   &#x20;\
   Whenever you want to print over Meshnet, select your Meshnet printer option from the **Printer** dropdown menu on the right of the main app window.

   <div align="left"><figure><img src="/files/liVgfW0pI7AGJBCF3cOg" alt="Meshnet 3D printer selected from the &#x22;Printer&#x22; dropdown menu."><figcaption></figcaption></figure></div>

</details>

<details>

<summary>Slic3r</summary>

1. Download and install the latest version of Slic3r for your OS from the [Slic3r downloads page](https://slic3r.org/download/).
2. Launch **Slic3r**.
3. From the top menu bar, select **Settings** > **Printer settings**. Alternatively, you can click **Ctrl** + **3** on your keyboard.

   <div align="left"><figure><img src="/files/moD93ZpIIyhmxVAbypTM" alt="Selecting &#x22;Printer settings&#x22; from the &#x22;Settings&#x22; tab of the menu bar."><figcaption></figcaption></figure></div>

   &#x20;
4. Under the **Print server upload**, fill in the details of your 3D printer.
   * From the **Host type** dropdown, select the firmware of your printer’s controller.
   * In the **Host** **or IP** field, enter your controller’s Nord name or Meshnet IP address.\
     &#x20;\
     **Example**

     <div align="left"><figure><img src="/files/PnOPSCzvByWYnnjNdFQT" alt="Selected Octoprint as the host type and entered the Meshnet IP address of the 3D printer controller."><figcaption></figcaption></figure></div>

     &#x20;
5. Click **Test** to check whether the connection to the controller can be established successfully.
6. Under the **Printer settings** tab, click the **Save current printer settings** button, enter a custom name for the profile, and click **OK** to create the new profile.<br>

   <div align="left"><figure><img src="/files/6AAbObpvROP7JGip87BW" alt="Clicking the save button, entering a profile name, and selecting OK."><figcaption></figcaption></figure></div>

Whenever you want to print over Meshnet, select your Meshnet printer profile from the **Printer** dropdown menu on the right of the main app window.

![Meshnet 3D printer selected from the "Printer" dropdown menu.](/files/9dEbTc03Hgs9DFDJO40G)

</details>

With the slicer setup completed, you can securely manage your 3D printer without any network or distance restrictions using Meshnet.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://meshnet.nordvpn.com/how-to/remote-access/3d-printer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
