# Install RPort on any virgin cloud VM

{% hint style="danger" %}
The following guide assumes you are going to install the RPort server on a virgin virtual machine, running Debian or Ubuntu on a public cloud.&#x20;

**✋ Do not use this guide for installing RPort on servers inside an intranet where NAT (network address translation) is used.**

To install RPort on a intranet host, follow this [guide](https://oss.rport.io/docs/#install-and-run-the-rport-server).
{% endhint %}

{% embed url="<https://vimeo.com/794618006>" %}

### Update your VM first

It's always a good habit to apply all pending updates before installing the application. Also, reboot the machine to have the latest kernel with all security updates running.

```
apt-get update && apt-get -y dist-upgrade && reboot
```

Log in again using SSH and make sure 👉 **you are the root user**.

### Install the RPort server

{% embed url="<https://vimeo.com/579102154>" %}
Install RPort on any virtual machine on the cloud. Damn simple.
{% endembed %}

The installation of the RPort server consists of several steps. We compiled a handy script that does everything for you. 🪄 Fire it and let the magic begin.

{% hint style="danger" %}
RPort **open-source has been dicontinued** 2023-09-20. The RPort installer and the server executable will require a **valid license**.
{% endhint %}

```
export RPORTD_LICENSE_ID=<YOUR-ID>
export RPORTD_LICENSE_KEY=<YOUR-KEY>
curl https://get.rport.io -o rport-install.sh
bash rport-install.sh
```

⏱️ The script needs approximately 2 minutes to finish. If all goes well, you will get a URL and a random password for the login to the graphical user interface.&#x20;

> 💁 **Insider tip**
>
> You can start the installation with your own FQDN, \
> for example `bash rport-install.sh --fqdn rport.example.com`. \
> The FQDN must exist and it must reolve to the public IP address of your server.
>
> If you ommit the FQDN a random hostname of the \*.user.rport.io space will be created. You can [change it later](/install-the-rport-server/change-the-fqdn-of-the-rport-server.md).

**Security advice:** Exporting your licence key to an environment variable via the export command can be insecure because the key could be extracted from the process list by currently logged in none-root users. To prevent this, create a text file, e.g. `rportd-license-key.txt` that contains the line `export RPORTD_LICENSE_KEY=<YOUR-KEY>`. Load the environment variables from the file with `. ./rportd-license-key.txt` and delete the file securely afterwards, e.g. using `shred rportd-license-key.txt`.

{% hint style="success" %}
You will be asked for your email address. **Your email address is required because two-factor authentication is enabled by default.** Tokens are sent via email. Your email address is stored only in the local database of your server.
{% endhint %}

![The cloud-installer has finished. Your rport server is ready.](/files/-Mj8gN6zF7tV3edgXnjE)

👉 Point your browser to the URL of your RPort server and log in with the user `admin` and the randomly created password. Check your inbox and grab the token for the two-factor authentication.

![](/files/-Met3f4u2zyUaN2RrFIQ)

### What's next?

After successfully starting your RPort server instance, you should

* 👉 [Connect your first client](/connecting-clients.md)
* 👉 [Test the remote access](/using-the-remote-access.md)
* 👉 Invite your team
* 👉 Perform regular backups


---

# 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://kb.rport.io/install-the-rport-server/install-rport-on-any-virgin-cloud-vm.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.
