# 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](https://kb.rport.io/install-the-rport-server/change-the-fqdn-of-the-rport-server).

**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.](https://1574570054-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MekeI9EovpQqbUTQSdM%2F-Mj8dTPr7LBj7wXAN4-h%2F-Mj8gN6zF7tV3edgXnjE%2Fcloud-installer-finished.png?alt=media\&token=2caf31e0-3d1f-4190-8516-33af3275c5ba)

👉 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.

![](https://1574570054-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MekeI9EovpQqbUTQSdM%2F-MenhiMfubkUph5Odau5%2F-Met3f4u2zyUaN2RrFIQ%2Fimage.png?alt=media\&token=1b932d5c-1ef1-4cfc-8dc7-959447a2a1db)

### What's next?

After successfully starting your RPort server instance, you should

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