# Raspberry Pi

[Sinip](https://sinip.tech) enables you to remotely manage **Raspberry Pi** devices that don't have a public IP address.

## Pre-requisites

To remotely manage your *Raspberry Pi* devices you'll need:

* One or more Raspberry Pi devices to be used as `Remote Devices`
* A PC or Smartphone to be used as `Admin Device`
* A *key* (file with .ovpn extension) downloaded from you [Sinip account](https://my.sinip.tech)

{% hint style="danger" %}
Remember: *key* files allow you to connect devices to your *Sinip* network, don't give them to anyone!
{% endhint %}

## Connect a Raspberry Pi to your Sinip network

Connect to your Raspberry Pi via SSH (default user and pass are: "pi" / "raspberry"). On Windows you can use [putty](https://putty.org), on Linux or Mac use the command line:

```
$ ssh <IP del Raspberry Pi> -l pi
```

On the Raspberry Pi, run these commands:

```
$ sudo apt-get update
$ sudo apt-get install openvpn
```

Download an unused *key* from your [Sinip account](https://my.sinip.tech). Make sure that you're not currently using the same key in another device. Copy the *key* file to the Raspberry Pi with the command (on Windows, use *putty*):

```
$ scp <key_file_name>.sinip.ovpn pi@<IP del Raspberry Pi>:/home/pi/key.sinip.ovpn
```

Where `<key_file_name>` should be replaced with the name of the *key* file you've downloaded.

{% hint style="warning" %}
Each device must use a *key* that is not currently used by any other device in your *Sinip* network.
{% endhint %}

Then, connect the Raspberry Pi to your *Sinip* network by running the command:

```
$ nohup openvpn /home/pi/key.sinip.ovpn &
```

## Remotely manage a Raspberry Pi

Once your Raspberry Pi device is connected to you *Sinip* network, you can manage it using [putty](https://putty.org) on Windows or SSH on Linux and Mac. Use the *Sinip* IP address listed on your [Sinip account](https://my.sinip.tech).
