# OpenVPN \[Easy]

## Entry

OpenVPN is one of the most popular and reliable private virtual network (VPN) solutions. This product provides a high level of encryption and customization flexibility, making it an ideal choice for both individual users and corporate networks.

{% hint style="success" %}
This instruction uses Ubuntu 20.04 The script works on all current versions of Ubuntu, Debian, AlmaLinux, Rocky Linux, CentOS and Fedora.
{% endhint %}

{% hint style="info" %}
Recommended Specifications.

CPU: 1 vCore\
RAM: 512 MB\
Storege: 1 GB\
Network speed: 100Mbps+\
\
This information is referenced and does not require much attention, as any available plan is appropriate for using OpenVPN on our virtual servers.
{% endhint %}

## Connect to the server

Connect to your server. If necessary, you can use our [detailed instructions](https://wiki.spacecore.pro/vds-dedicated/how-to-use-vps-vds#connect) to perform this operation.

## Installing OpenVPN

You may not have seen such an easy way to install OpenVPN 😎

It is enough to enter this command in the console of your server, after which the installation will be automatic.

```
apt-get update; rm openvpn-install.sh; wget https://mirror.spacecore.info/scripts/openvpn-install.sh && bash openvpn-install.sh
```

At the end you will see the following text.

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FjUT26CtgeLkbTC0CGbE8%2Fimage.png?alt=media&#x26;token=c96c27ca-e383-4001-9a36-7573ac4d344a" alt=""><figcaption></figcaption></figure>

The first configuration file created by default is called «**spacecore**.**ovpn**» and is located in the main directory. You can upload it to your device with sFTP. About how to connect via sFTP, in more detail in the section «[Data transfer via sFTP](https://wiki.spacecore.pro/vds-dedicated/how-to-use-vps-vds#connect)».

This configuration file is versatile and is suitable for adding a profile to any device that supports OpenVPN.

## Setting

### For Windows

You can download OpenVPN for Windows [from](https://openvpn.net/community-downloads/).

After adding the client, it is possible to follow the link and also using the file. For example, use the second option. It is enough to transfer or choose manually «**spacecore**.**ovpn**» file which you have downloaded from your server.

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FAVo1ycrsCBetUoGv0Blh%2Fimage.png?alt=media&#x26;token=7720db28-c354-4dc9-81a1-bdf265189019" alt=""><figcaption></figcaption></figure>

Next, make the connection. Great!

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2F8VtZhggSYa9G865fMmsZ%2Fimage.png?alt=media&#x26;token=1a57e102-2fbd-469b-a9e9-c29da361d69e" alt=""><figcaption></figcaption></figure>

### For IOS / Android

The connection is made using the OpenVPN mobile app, which is available in both the [App Store](https://apps.apple.com/us/app/openvpn-connect-openvpn-app/id590379981) and the [Play Market](https://play.google.com/store/apps/details?id=net.openvpn.openvpn).

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FDmfoQnEsJ341lLNDVCzx%2Fimage.png?alt=media&#x26;token=1e5af02c-b2d3-4e02-bcc7-d30f15d38667" alt=""><figcaption></figcaption></figure>

## Add users

How do I add other users to your VPN? To do this, I need to rerun the already loaded script.

```
bash openvpn-install.sh
```

You’ll see the message that OpenVPN is already installed and a list of possible actions. Enter «**1**», then enter the name for the new user, for example «**friend**».

{% hint style="info" %}
Send by button «**Enter**».
{% endhint %}

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FHiso86jEdmQuJKtE1qXO%2Fimage.png?alt=media&#x26;token=1fe58058-3662-47ae-8d1d-163f4e78af45" alt=""><figcaption></figcaption></figure>

Next, a new configuration file will be created. It should be used identically as the file that was generated the first time.

<figure><img src="https://287241268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyXvdNIxNLIOcexv7AfU2%2Fuploads%2FfOn4fbidW4KPjBzGxEgE%2Fimage.png?alt=media&#x26;token=aabd3a97-2633-4234-a839-39ef227cb119" alt=""><figcaption></figcaption></figure>
