Branding - change logo on web interface
Branding options are limited in the OpenVPN Access Server, and not present in the OpenVPN Connect Client products. But you can replace the logo you see when opening the client web service or the Admin UI's login screens of the Access Server. Additionally a description text string can be placed on the Admin UI so that administrators can easily identify which server they're working on when performing administrative tasks. When replacing the logo the best results are obtained with a picture of 340 pixels wide of file type PNG with transparent background (if any). JPEG is also supported but without transparency it may not look as good.
The file must be placed on the file system of the Access Server, you cannot reference an online picture. We recommend a program such as SCP or WinSCP to copy the file to a location on the file system of the Access Server. Most Linux operating systems nowadays want you to log on as a user with limited privileges and so you will most likely not be able to upload a picture directly to a folder in /usr/local/openvpn_as/. If you encounter this problem simply upload it in a directory like /tmp where the file will remain until you reboot the server. Then log on to the console or via an SSH session, obtain root privileges, and move the file from the /tmp directory to for example /usr/local/openvpn_as/etc/. The commands below are also assumed to be done as root user.
If you cannot log in directly as root user but must instead log in as an unprivileged user, and then sudo su to get root privileges, that's fine too.
Preparing the logo file
This tutorial will show you how to rebrand the web interface so it has your company logo instead of the default OpenVPN Technologies Inc. logo, like so:
In order to do this you will need a tool such as WinSCP to copy files to the Access Server if you are on a Windows system. If you have Macintosh or Linux there's SCP or GUI programs available as well. You will have to use a username and password that has console or SSH root access to the server. In this guide we will assume the OpenVPN Access Server can be reached via SSH on IP address 192.168.47.222 and we will be logging in as root using WinSCP in SCP mode.
Regarding the logo file itself; it can be in just about any format you like. It can be huge, it can be small, it can be JPEG, PNG, GIF, BMP, but we recommend PNG. We have a few pointers for you that will help you make the best result. First of all, the width is going to be a limiting factor since it tends to go outside of its boundaries when the width is over about 340 pixels. The picture doesn't center, it just aligns left and spreads out to the right. This can be ugly. Height is not so much an issue - it will just push the login field down a bit if you need more space. We kept it at 90 pixels and that looked fine. Since the client interface and the admin interface will both be using this picture, and they don't have exactly the same background colors, you will probably want to make it a .PNG file with a transparent background.
In short: make the picture a PNG file with 340 pixels width and anymore from 50 to 300 pixels in height and transparent background for best results.
Transfer the file to your server
The information below is for the benefit of Windows users. If you have a Linux system you can just use SCP directly to transfer the file. This goes for Macintosh users as well, although there are Macintosh GUI programs that do file transfers to Linux systems as well. For Windows users however we've created a short guide on how to use WinSCP to transfer the file to the Access Server. As mentioned earlier, it must be stored on the file system of the Access Server for this to work.
Please ensure that the filename contains no foreign characters and no spaces. Make the filename as SIMPLE as possible!
Log in through SSH and make the final changes
Log in to the Access Server's console or through an SSH session and obtain root privileges.
Use nano or another text editor to open the as.conf file for editing:
Locate the sa.company_name variable and add the extra logo variable as follows:
sa.company_name=OpenVPN Inc. sa.logo_image_file=/usr/local/openvpn_as/companylogo.png
Save and exit the file. Then restart the OpenVPN Access Server:
service openvpnas restart
Your Access Server's web interface should now show the logo. If it still shows the old logo you may need to refresh the web page forcibly or empty the browser cache. If the Access Server doesn't start up anymore after editing these parameters, then most likely a mistake in the filename or location has been made. You can correct the settings or undo the changes and restart the Access Server again to restore functionality.
Please note that the descriptive name entered after "sa.company_name" is only visible in the admin web UI. You could use this as an identifier so you can quickly see which server it is you have accessed and where it is located, for example. And if you really want text in the client interface, why don't you just edit it into the logo picture itself - that's a fairly easy solution. The result for the client web UI and the admin web UI looks like so:
Troubleshooting: now I can't reach my server's web UI at all!
This happens when there is a mistake in the file name or path in as.conf's directive for the company image logo. This is why we advise people to use as plain a filename as possible and to follow the guide closely so you get it right. You can easily undo the damage by either removing the two offending lines from as.conf and issuing a service openvpnas restart command again, or you can fix the problem by getting the file path and name exactly right. It also helps if you use a file name that doesn't contain any complicating characters such as spaces, extra dots, and so on. Keep it simple: companylogo.png for example.