d3vilh / openvpn-ui

Web User Interface for OpenVPN
MIT License
169 stars 39 forks source link

possible to use the UI on existing vpn server installation ? #48

Closed dberardo-com closed 2 months ago

dberardo-com commented 4 months ago

i see that the project comes with its own docker image which i assume contains also the ovpn server part. but it is possible to use it on an existing environment that runs outside docker? and if so, should those 2 environments share the same filesystems or can the 2 run on separate machines (ie. gui on server 1 and ovpn legacy env on server 2 ) ?

cheers

d3vilh commented 4 months ago

Hi @dberardo-com, Yes it is possible. You could clone repo, then go into ~/build/ directory and run ./standalone-install.sh script for standalone build and installation. The issue #26 has installation steps and logs. Please be aware that standalone installation is currently supports Debian linux only.

Post installation and UI start you have to go into "Configuration > OpenVPN UI" and set "OpenVPN ConfigPath" and "Easy-RSA ConfigPath" options accordingly.

Note that UI, at the moment takes server.conf and client.conf from /etc/openvpn/config subdirectory, so you have to copy files there and adjust server start config accordingly. In version 1 I'll update UI to take config just from the /etc/openvpn dir.

As for the different servers - this may work with OpenVPN server configuration and EasyRSA pki dir mounted over NFS to the server where OpenVPN UI is running. However, it was never tested. If you would test, please let me know results.

thomas2108 commented 4 months ago

There are several minor issues, I discovered, when installing this on my standalone vpn server. If I remember right, this where

but - cool project and really useful! Thanks d3vilh!

d3vilh commented 4 months ago

Hi @thomas2108 thank you for the reporting. I'll keep the issue open until documentation update in main branch.

jav-12 commented 4 months ago

I am also interested in this. I already have a working OpenVPN server with multiple users. I need a user interface to manage them properly.

d3vilh commented 4 months ago

I already have a working OpenVPN server with multiple users.

Hi @jav-12 do you mean different server instances running on the same server? If so, you could run different OpenVPN-Ui instances as well for every server instance you have. All you need is to change ports and paths in openvpn-ui/conf/app.conf accordingly.

jav-12 commented 4 months ago

Yes. I want to use the GUI on the server already used for the VPN.

d3vilh commented 3 months ago

If you have Docker env available on the server, you could run just openvpn-ui container as Dockerfile or Docker-compose with volumes: setup towards your server and easyrsa configuration files.

Alternatively is to build ui with ./standalone-install.sh script. It will build binaries for your arch and distro version, then you can use those binaries to run as a service or as application without any issue.

For both cases it is better to use some test environment before applying the solution on Prod environment.

null-p01ntr commented 3 months ago

If you have Docker env available on the server, you could run just openvpn-ui container as Dockerfile or Docker-compose with volumes: setup towards your server and easyrsa configuration files.

Alternatively is to build ui with ./standalone-install.sh script. It will build binaries for your arch and distro version, then you can use those binaries to run as a service or as application without any issue.

For both cases it is better to use some test environment before applying the solution on Prod environment.

hello, im also trying to install just the web UI. I have installed OpenVPN with PiVPN with default settings. Where and how should I set up the volumes exactly?

d3vilh commented 3 months ago

hello, im also trying to install just the web UI. I have installed OpenVPN with PiVPN with default settings. Where and how should I set up the volumes exactly?

Hi @null-p01ntr , You have to follow the standalone installation guide . Be precise with username and password vars.

Then just login and modify openvpnUI parameters to set where your openvpn server config dir is and easyrsa home directory.

I don't use PiVPN and Rspberry-Gateway is neat even on PiZero boards.