Question

Not able to Edit server.conf file

I’m trying to install openvpn to my droplets . I have successfully installed both openvpn and easy-rsa

apt-get  install openvpn easy-rsa

But when it comes to editing the server.conf file, that’s where I get stuck. Once I run this command to open the server.conf with Vim editor:

vim /etc/openvpn/server.conf

I’m getting a black screen with blue ‘dashes’ (-) all the way to the bottom and E35: NO previous regular expression.

Kindly let me know where I’m going wrong.

Note: The problem started when I entered an SSH key on a different droplet.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Thanks. let me try that.

It looks like you’re missing a step here. You are currently seeing those dashes indicating that those lines don’t exist as you are creating a new blank file. The default install of openvpn does not create a server.conf file in /etc/openvpn. You’ll need to grab the sample config file from elsewhere in the filesystem where it is compressed.

gunzip -c /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz > /etc/openvpn/server.conf

This guide will assist you.