Jack Wallen shows you how to easily expose an internal Ubuntu server to the outside world with the help of PageKite.
So you have your data center up and running, and it's performing perfectly. What if your data center's primary purpose is to serve your internal network, and you find yourself needing to expose one server to the outside world? What do you do?
There are plenty of ways to make this happen. One such way is through the PageKite service. PageKite allows you to expose your LAN server IP to the outside world, where it is reachable via a specific domain. This is a solid solution for small companies that need to expose a server to, say, clients or employees— but not advertise that server to the public at large. Say, for example, you have an internal Nextcloud server you want available to the WAN. With PageKite that is possible.
I want to walk you through the process of installing and setting up PageKite on the Ubuntu Server 18.04 platform to expose an instance of Nextcloud. You should be warned, however, that PageKite isn't free. There is a 31-day-trial period, but after that trial is over, you'll have to purchase a plan. You will also need to sign up for the free trial before you install and use PageKite on your server. During that sign up, you will be asked for a kite name. This name will be prepended in front of the pagekite.me address (to access your server outside of your LAN).
SEE: Research: Cloud vs. data center adoption rates, usage, and migration plans (Tech Pro Research)
I will assume you already have your server up and running and only need to expose it to the WAN with PageKite. You don't need to have Nextcloud installed, as I am only using that as the example.
The first thing we must do is install PageKite. Fortunately, the installation process isn't quite as challenging as it once was. In fact, to install PageKite on Ubuntu Server, you only have to follow these steps:
- Open a terminal window.
- Issue the command sudo apt install pagekite
- Allow the installation to complete
Remember, you need to have your login credentials ready (email address and password used to sign up for the PageKite service). With that in hand, issue the command:
Where KITENAME is the kite name you used when signing up.
You will be asked a few questions:
- Use the PageKite.net service [Y/N].
- Email address for your PageKite account.
- Password for your PageKite account.
Once you've answered these questions (and your account successfully authenticates), your kite will be flying. You can then point your browser to KITENAME.pagekite.me (where KITENAME is the name used to sign up) to start using your server.
The Nextcloud caveat
If you're using PageKite to reach your Nextcloud service, you will get the untrusted domain error. To fix this you have to add KITENAME.pagekite.me (where KITENAME is the name of your kite) as a trusted domain. To do this, issue the command sudo nano /var/www/html/nextcloud/config/config.php. In that file you should see:
0 => 'SERVER_IP'
Where SERVER_IP is the IP address of your server. Add a comma to the end of the above line, and then add the following below it:
1 => 'KITENAME.pagekite.me'
Where KITENAME is the name of your kit.
Save and close that file.
At this point you should be able to reach your Nextcloud instance, via the PageKite domain.
Use with caution
Personally, I like the PageKite service. It's a great way to expose internal servers to the outside world. However, I suggest using this service with caution. I don't recommend exposing servers with sensitive company information with PageKite, as you don't have any control over the security of the connections. But for non-sensitive information, this reverse proxy service does an outstanding job.
- How to install the Sentrifugo HRM Solution on Ubuntu Server 18.04 (TechRepublic)
- How to Install ODOO Management Software on Ubuntu 18.04 (TechRepublic)
- How to manage zones on CentOS 7 with firewalld (TechRepublic)
- Use Ubuntu's snap to install Skype on any Linux desktop (ZDNet)
- How to create NGINX server blocks on Ubuntu 18.04 (TechRepublic)
- MacTel announces government cloud expansion (ZDNet)
- Microsoft PowerShell now available on Linux as an Ubuntu snap (ZDNet)