Standalone installation pki error
[E] [certificates.go:127] open /etc/openvpn//pki/index.txt: no such file or directory [E] [certificates.go:116] open /etc/openvpn/pki/index.txt: no such file or directory
[E] [ovclientconfig.go:42] open /etc/openvpn/config/client.conf: no such file or directory
how can i change location at /etc/openvpn/easy-rsa/pki (and) /etc/openvpn/ccd/client.conf
Please Help
Hi @akselite, you need to go to the Configuration > OpenVPN-UI and update OpenVPN ConfigPath + EasyRSA ConfigPath there:
Then restart UI and it should take new parameters.
I've changed it, but when I do the client cert, it says it's not in the pki index.txt location
The pki and client issues are fine, but when creating Client Certificates, the exit status is 1, so I can't do it. Please help me
I was triying the project to add a cool web interface to openvpn servers but found that the pki path seems hardcoded to $OpenVPN_ConfigPath/pki and in my installations I have the pki folder under $OpenVPN_ConfigPath/easy-rsa/pki. Would be posible to add another config variable for the pki folder?.
As the servers are not containerized configured the openvp paths on the container volumes but as explained in my installations the pki folder is inside of the easy-rsa. Mitigated the problem with a symbolink link but a variable to change this path will be of great help.
I have the same problem too.
The pki folder is in /etc/openvpn/server/easy-rsa
> ls /etc/openvpn/server/easy-rsa
COPYING.md ChangeLog README.md README.quickstart.md doc easyrsa gpl-2.0.txt mktemp.txt openssl-easyrsa.cnf pki vars.example x509-types
I also have other mapping errors like:
open /etc/openvpn/server/config/client.conf: no such file or directory
The pki folder is in
/etc/openvpn/server/easy-rsa
@AntoninoBonanno if your pki directory is there, just need to set it in "Configuration" > "OpenVPN UI".
OpenVPN UI, using client.conf template to generate .ovpn , you could create there empty file which content would be updated via "Configuration" > '"OpenVPN Client"' menu.
For standalone installation there maybe other workaround which needs to be applied (every server may be different), you could have a look into the scripts used by OpenVPN UI to maintain everything in server backend, there are maybe some necessary customisations done as well.
If you could share more logs I could help to debug it.
the exit status is 1, so I can't do it.
Exit status 1 can be literally anything, it is general error. We need more logs.
You could run UI in dev mode to increase log level.
Or you could try to execute maintenance scripts manually, passing all the parameters and sharing the logs here.
fatal: destination path 'qrencode' already exists and is not an empty directory. Building and packing OpenVPN-UI
| ___
| |/ / ___ ___
| ___ \ / _ \ / _
| |/ /| /| /
_/ _| __| v2.1.0
├── GoVersion : go1.21.5 ├── GOOS : linux ├── GOARCH : amd64 ├── NumCPU : 4 ├── GOPATH : ├── GOROOT : /usr/local/go ├── Compiler : gc └── Date : Monday, 12 Aug 2024
| ___
| |/ / ___ ___
| ___ \ / _ \ / _
| |/ /| /| /
_/ _| __| v2.1.0
2024/08/12 16:09:32 INFO ▶ 0001 Packaging application on '/home/ubuntu/openvpn-ui'...
2024/08/12 16:09:32 INFO ▶ 0002 Building application (openvpn-ui)...
2024/08/12 16:09:32 INFO ▶ 0003 Using: GOOS=linux GOARCH=amd64
2024/08/12 16:09:35 SUCCESS ▶ 0004 Build Successful!
2024/08/12 16:09:35 INFO ▶ 0005 Writing to output: /home/ubuntu/openvpn-ui/openvpn-ui.tar.gz
2024/08/12 16:09:35 INFO ▶ 0006 Excluding relpath prefix: .
2024/08/12 16:09:35 INFO ▶ 0007 Excluding relpath suffix: .go:.DS_Store:.tmp:go.mod:go.sum
2024/08/12 16:09:35 INFO ▶ 0008 Excluding filename regex: ^vendor|^ace.tar.bz2|^data.db|^build|^README.md|^docs
2024/08/12 16:09:36 SUCCESS ▶ 0009 Application packed!
Building qrencode
internal/chacha8rand
/usr/local/go/src/internal/chacha8rand/chacha8_amd64.s:55: ABI selector only permitted when compiling runtime, reference was to """.block" asm: assembly of /usr/local/go/src/internal/chacha8rand/chacha8_amd64.s failed chmod: cannot access 'qrencode': No such file or directory Moving qrencode to GOPATH mv: cannot stat 'qrencode': No such file or directory All done.
I tried to install standalone on Ubuntu and facing issue not working i tried compose also for testing its not even connecting after creating the certificates Tried with UDP and TCP and changed all values at all points and standalone also not working
I have installed stand alone version and after some "research" most of the functionality openvpn-ui works for me. The installation was done on Debian 12 VM. I had to replace all openvpn certificates. Generally I follow instructions from ReadMe. My observations below:
- Openvpn-ui store most of data in database. So before first run put into conf/app.conf correct values for EasyRSAPath and OpenVpnPath. From my experience if you change this setting after first run, openvpn-ui will not see new values.
- Install openvpn-ui in /opt directory (/opt/openvpv-ui).
- Create /opt/scripts directory and copy there all files from build/assets directory from source
- Manually init pki on directory specified in p.1 as OpenVpnPath. In Debian I did: # cd /etc/openvpn # make-cadir easy-rsa/
- create symlink from easy-rsa/pki to OpenVpnPath directory. In my case i have been created symlink from from /etc/openvpn/easy-rsa/pki to etc/openvpn/pki. Create in this directory (if not exists) clients, config, staticclients subdirectories.
- Now run ./openvpn-gui and look at console output. If anything is marked as [E] in red, make necessary corrections.
- Log into openvpn-ui web page. Generate easy-rsa Vars from Configuration - EasyRSA Vars and save it.
- Go to Configuration - Maintenance and press: (look at console where you have run ./openvpn-ui for any errors) a) Copy RSA Vars b) Initialize PKI c) Build CA d) Build Sever e) Generate DH f) Generate CRL Generate TA was not working for me. I had to create this from Debian console.
- Now create server config from Configuration - OpenVPN Server and save it. One remark, anytime I change anything in server configuration in openvpn-ui my server service was killed. I had to start it manually from console.
- Start openvpn service. Check for any errors.
- Go to Configuration - OpenVPN Client. Put configuration settings for your clients and save it.
- Then go to Certificates and create certificates for Clients. When certificate is created, it should be visible in the client corticates list. If is not not visible, it will be not possible to download ovpn client file. Check output in console for any errors.
- Finally, if you want to see openvpn logs in openvpn-ui, create symlink from log directory to /etc/openvpn directory.
Last, you should create systemd service to start openvpn-ui during system boot. I have used information from this page: https://unix.stackexchange.com/questions/625605/run-a-binary-file-via-systemctl
Why I have been creating all certificates again? Because information about hem are also in db and openvpn-ui not saving anything about existing certificates in db.