Your web host may be virtual

Introduction

I recently wrote a post about putting phpBB in the Google Cloud. I learned that it’s not too hard to do if you have decent technical skills or even if they are more modest. There could be some serious upsides to putting your forum in a cloud like Google’s, Amazon Web Services (AWS) or Microsoft Azure. (There are other cloud vendors out there.) These could include lower costs, higher uptime, and scalability if you forum gets suddenly popular.

Most of us though contract with web hosts. For example, I use Siteground. Web hosts have server rooms somewhere where they keep all the equipment they need to host your forum plus lots of other websites. Most web hosts have multiple server rooms in various countries. The closer these are to their customers and their site viewers, the better. For example, Siteground has server farms in Chicago, London, Amsterdam and Singapore. They have incentive to organize their data centers to be fast and reliable because they control them. Siteground does this not only with four server farms, but by having an end-to-end solid state infrastructure. They figured out that although solid state drives (SSDs) were more expensive, they were heaps more reliable and faster than filling their server rooms with mechanical disk drives. It’s been key to their success as a company.

Virtual hosting

These days though some web hosts are figuring out they don’t need to bother with the actual hosting anymore. There are two ways they do this. One is old, the other is new.

The first way is to be a reseller. For example, ABC Hosting may actually rent servers in (hypothetically speaking) a Rackspace server room. Becoming a reseller is not hard. Siteground will let you be a reseller. Resellers are often people like me who have multiple clients and as a convenience to their customers also provide hosting. I don’t want to bother setting up a server farm, particularly if I can lease one. If I did, I would probably choose to become a Siteground reseller, since Siteground’s spiffy servers sold me on being their client. Siteground would provide a front end console for me to use, and consoles that my customers would use too to which I would apply my own logo and some custom pages. From the customer’s perspective, it looks like I have my own server room. The downside is that I would become responsible for any hosting issues. I would essentially be the support department, and I’m not available 24/7. I don’t want to get involved in the minutia of my client’s hosting, so I don’t expect to ever become a reseller, even though it would generate a good deal of passive income for my business.

The second way is that some web hosts are becoming virtual by using cloud providers. Who’s the number one host on the web? You probably don’t have to think too much: GoDaddy. You may be surprised to learn that in 2018, GoDaddy decided to move much of its hosting inside AWS. You can read why here. Basically, GoDaddy realized that AWS built a much better infrastructure. They can resell Amazon’s cloud services under their own label for less than they can maintain their own hosting centers. AWS has a sophisticated set of services and they have the fast connection and high reliability thing all figured out. This is not good news for GoDaddy’s hosting staff. Presumably most of them will be laid off at some point.

All this suggests that web hosting will be undergoing a fundamental transformation as hosts ditch their own hosting centers to find better reselling deals in the cloud. In short, your web host may become a virtual web host. If you host on GoDaddy, there’s a good chance it’s already virtual hosted on AWS.

Should you host in the cloud?

This does raise the question: why not just buy your hosting from a cloud vendor like AWS and skip a middle man? If you read my posts on cloud hosting, you’ll realize the main issue is that cloud hosting tends to be complicated to set up, maintain and troubleshoot, at least from the perspective of someone trying to get some web space without a lot of technical skills. Virtual web hosts like GoDaddy essentially become front ends for optimizing the hosting experience for people likely a lot like you who want the process to be simpler. So they offer 24/7 support, domain management and basic customer handholding while putting up a virtual front end that suggests they are doing all this themselves when in fact the technical infrastructure is outsourced to a major cloud vendor.

My bet is that at some point Siteground will do the same, in which case I will have less reason to use them. If I know a suite of virtual web hosts are all using AWS, for example, I can get choosier and choose a virtual host based on their support and the ease by which I can do things via their control panels. I can assume the reliability and speed will all be excellent since they are hosted in a professionally managed commercial cloud. Since I do have the technical skills to put my sites in a cloud like AWS, at some point I will probably just do that. I pay a premium primarily to call someone on the phone to resolve some technical issues. Right now the $20/month I pay for Siteground hosting for my domains is reasonable, even though I am guessing I could pay $10/month or less putting my sites in the cloud. I’d just have to fix any technical problems myself, and right now the cost difference doesn’t make it worth my time.

For most of you, this is probably true too. Price is certainly important when you decide who to host with, but ready support, easy interfaces to managing your sites and fast page load speeds probably matter more. At some point you either won’t know or won’t care if your web sites are actually in a major cloud vendor’s facilities somewhere. Virtual web hosts aren’t probably going to advertise this either.

If interested in Siteground hosting, use my affiliate link

If you are intrigued about my discussion of Siteground for web hosting, learn more on my rehosting page. If you decide to host with Siteground, please use my affiliate link. You won’t pay anything extra and I will earn a small commission.

Installing phpBB in the Google Cloud

Introduction

In this post I’ll go through the steps for installing phpBB in the cloud, Google’s cloud in this case. More specifically, I will show how to do it using their Google Compute Engine, which offers Infrastructure as a Service (IAAS). In this example I use the prebuilt (and free) Bitnami solution. It won’t get into advanced topics, like fine-tuning phpBB to run on the Google platform.

If you haven’t read my two posts on cloud computing, you should before trying any of this.

Creating a virtual machine on the Google Cloud

The first step is to create a virtual machine on the Google Cloud. This is your personal web server, but it is virtualized so that you have complete control over it, but it’s actually on a machine shared with many others. To create a virtual machine on the Google Cloud, you first need to have a Google Cloud account. No sweat there. Google will give new users a $300 credit to play with its infrastructure. Or you can use a micro instance at no cost. Here I show installing a micro instance of a virtual machine.

  1. Go to Google Cloud at https://cloud.google.com/.
  2. Create an account on the Google Cloud platform if you haven’t already. You might want to click on the Get started for free button if you are new to the Google cloud. If you have an account already, then click on the Console link near the top right corner of the page.
  3. On the blue navigation bar near the top, if you have any projects defined you will see a list of them. Regardless, open the dropdown to the left of the search field. Then select New project.
  4. Enter a project name in the field. I entered “My phpBB forum”. This is only for your reference and isn’t seen by the public. You probably don’t want to attach the project to an existing project since you are probably new to the Google Cloud. If so, ignore the Organization field. Then press the Create button.

 

Creating a new project on the Google Cloud platform
  1. Generally it takes a minute or two to create the project. Eventually a dashboard page appears for your new project.
  2. Under Getting Started, select Deploy a Pre-built solution.
  3. In the search field, type “phpBB“. One or more pre-built solutions may appear. If you click on a prebuilt solution, it will give you the estimated cost per month to run the solution. The actual cost depends on the traffic your site gets, how much you use in the way of Google’s resources, and whether your prebuilt solution comes with a monthly charge. I suggest picking “phpBB Certified by Bitnami“. Note that Bitnami does not charge a monthly usage fee, so your costs are solely based on the resources you use. The package contents on the left shows you what is installed by the solution. The operating system should be Debian (a version of Linux) and phpBB should be the most recent version. You will get an Apache webserver, a recent version of PHP, a MySQL community edition database as well as a few other tools, most noticeably phpMyAdmin, which lets you manipulate the database directly.
  4. Click on the Launch on Compute Engine button. You will get a screen that lets you configure the instance of your virtual server, which will include phpBB.
  • The Deployment name doesn’t matter, but should be something you will recognize
  • Zone is where the server hardware is physically located. Generally pick a zone close to you or where you expect a majority of your users will be.
  • Machine type directly affects cost. This can be changed later. The default micro instance is fine for getting started but probably not sufficient unless your forum is very lightly trafficked. You can choose micro, small, or a number of variations based on the number of virtual CPUs you need.
  • Boot disk size defaults to 10GB for the micro instance
  • Change other settings if desired, but it’s likely that the defaults are okay.
  • Finally, click the Deploy button. It will take a while for your virtual server to be deployed, but it will be created with phpBB installed.
Deploying a virtual machine on the Google Cloud platform
Deploying a virtual machine on the Google Cloud platform

Accessing the forum

After deployment, a number of useful links are on the right sidebar. Your phpBB forum is installed, but is only accessible by an IP address, ex: http://35.245.145.32/. Click on the Visit the Site button to login to phpBB, which is in the web root folder. The username to use is probably “user” and is in the sidebar. The password is below it. Write these down. You can get into the Administration Control Panel with the same username and password.

Accessing the virtual terminal

SSH (Secure shell) access is provided, but it is rudimentary. Click on the SSH dropdown button. It will open a pop up terminal window. You can enter any Linux commands here to administer your virtual server, as well as upload or download a file using the little wheel icon at the top right corner of the window. This is a convenient way to issue commands on your virtual server for occasional use. Since you can only upload or download one file at a time, it’s not a very practical interface for daily use.

Setting up SSH remotely

To use FTP productively, you will need to access SSH more easily using a terminal application on your local machine. This video may help in setting up a SSH connection.

Using FTP with a FTP client

Once your virtual machine has a set of SSH keys, you can access SSH remotely from your machine. But also you can now use Secure FTP to transfer files. The attached screenshot shows Filezilla configured for my virtual machine instance. Notice I’ve linked it to a key file created in the last step. This assumes you set up a BitNami instance of phpBB. You will find phpBB in the /opt/bitnami/apps/phpbb/htdocs directory

Filezilla setup with Google cloud
Filezilla setup with Google cloud

phpMyAdmin access

You may need to directly manipulate your database. You can do this from SSH if you are Linux savvy with the mysql command.

It is generally more convenient to use phpMyAdmin, a web-based tool for accessing MySQL and MariaDB databases. It takes some configuration to use it remotely, however. This article shows how to set up remote access to phpMyAdmin using the key file you acquired in your last step. The approach requires a proxy command like this that seems to work only as long as the process remains active and will look similar to this example:

ssh -N -L 8888:127.0.0.1:80 -i google-cloud-phpbb google-cloud-phpbb@35.245.145.32

To access it, you use the localhost IP of 127.0.0.1, essentially http://127.0.0.1:8888/phpmyadmin. To login use the credentials in your forum’s config.php file. You will have to sudo su root in the Google console to see the contents of the file.

To kill your local process, type CTRL-C.

Getting a static IP address

You start out with an ephemeral IP address that could change. If you want to attach a good ranking domain which you can find on https://www.spamzilla.io to your IP address, you should convert your ephemeral IP address into a static IP address. This document describes how to do this.

Creating nameservers and attaching your server to your domain

Next, you need to create some nameservers for your virtual server. This video documents how this is done:

Once you have nameservers defined, you go to your domain registrar and point the domain name to the nameservers created in the Google Compute Console. Then wait a few hours until the changes are broadcast to your local DNS server.

Next steps

Generally at this point you want to get phpBB configured. I won’t document here how to do these steps. Some of these might be:

  • Moving phpBB into a subdirectory. This is pretty easy to do with SSH access if you know Linux commands. You will need to change phpBB’s server settings, and possibly the cookie settings as well.
  • Add styles
  • Add extensions
  • Create forums, permissions and policies. phpBB’s documentation is voluminous but will tell you what you need to know.
  • Set up HTTPS. You may have to pay a bit extra for this service. See this page.

If you want to move your existing forum now to the Google Cloud platform, I can help. At this point though I don’t consider myself competent at tuning the Google Cloud for phpBB.

Basically you need to move the files and the database. Use FTP to move the files and an extract of the database. phpMyAdmin can be used to load the database in many cases. There are things that can trip up this process, such as if the PHP version is not the same between systems. I am happy to help in the process. See my rehosting page.

There is more to using the Google Cloud platform in phpBB that I may cover in future posts.

Cloud service types and phpBB

Updated June 28, 2019

In a recent post I looked into putting phpBB in the cloud, the first in a series of related posts. In the first post I said that while it is possible to do it, phpBB is not a cloud-first software solution. There are advantages to putting phpBB in the cloud, such as scalability and potentially lower costs. But there are significant drawbacks for most forum administrators too, including almost no technical support and you must provide any system administration.

Cloud service are arranged around various service types. While the types can be breathtaking at times (look at Amazon’s many specialized web services) you can sort of lasso these into three types: IAAS (Infrastructure as a Service), PAAS (Platform as a Service) and SAAS (Software as a Service). As you will see, phpBB doesn’t fit neatly into any of these models.

IAAS (Infrastructure as a Service)

With IAAS, the cloud provider provides you with a set of basic tools and lets you have at it. The tools can be refined somewhat but generally you get an operating system (usually some variant of Linux), a web server (generally Apache) and a database (generally mySQL). The actual set of tools that you get depends on the package you select. In Amazon Web Services speak, this is the AMI (Amazon Machine Instance). Yes, there are AMIs for phpBB such as intuz’s and BitNami’s. However, these packages are not necessarily free. BitNami, for example, creates a “smart” integration of these tools along with other ones that are optimized for various cloud deployment patterns. You will probably be asked to pay for the privilege. A good package though it well thought out and cleverly integrated for maximum functionality and performance, and these phpBB AMIs should be finely tuned for phpBB. You might want to use one of these packages for an upfront cost and then rent it for a monthly fee.

Some packages/AMIs are free and come from a common library provided by the cloud vendor. You might want to install one of these instead. They likely won’t come as well integrated, but they will get the job done.

As much as an intelligent package/AMI helps, you still don’t get much in the way of handholding. You will generally get the most basic of control panels provided by the cloud provider and some SSH and database credentials. You are expected to know how to use SSH, FTP and relational databases. Of course as time goes on, your operating system, web server and database software will need updating. Generally, operating system and security upgrades are handled for you in the background. But you may be expected to figure out how to do this by yourself, so make sure you understand what will and won’t be done for you. It’s hard to escape doing some of your work using SSH and the Unix prompt.

If none of this intimidates you, IAAS is a great choice and probably cheaper than using a web host. But basically you are trading your own time and expertise to lower hosting costs, but as a bonus you should get a scalable cloud service to handle high and low demand periods, that is if you set it up right. There is an art to fine-tuning cloud service as you need to balance between potential high usage spikes and your budget.

PAAS (Platform as a Service)

In general, PAAS cloud services are oriented around developers. If you want to be the next Facebook, for example, PAAS will provide you not just with infrastructure as a service but also a set of development tools finely optimized for you to develop unique cloud services. They tend to be oriented around one or more programming languages, such as Java or PHP, and one or more deployment engines, such as Kubernetes. The nice thing about PAAS is that you don’t manage much. Should the Java J2EE engine need an update, that will be handled for you. Consequently, PAAS tends to cost more than IAAS. You and your development team are then free to focus on developing that next Facebook.

phpBB of course is a prepackaged software solution. You shouldn’t be developing anything, unless perhaps you are an extension developer like me. But if you are an extension developer like me, you don’t need to develop your extension using PAAS because phpBB is not typically deployed in the cloud. Instead, you have a local web development environment and do your development there. You might want to test it on a web server connected to the Internet, but you don’t need PAAS to do that.

So basically, using the PAAS cloud service type for phpBB makes no sense.

SAAS (Software as a Service)

In the SAAS model, you use a cloud provider to provide a software solution in the cloud. Perhaps the best known SAAS provider is Office 365. Why install Microsoft Office on a PC when you can run it as a cloud service instead? It’s a popular model that is making some companies like Adobe (and its Adobe Creative Suite) or Salesforce.com tons of money. They’ve already figured out an optimal solution and they are happy to rent it to you for a fixed cost per month. If you don’t need it anymore, you cancel your contract. In some cases, you do actually download some software on your PC that works optimally with these services in the cloud. Many developers using PAAS are actually hoping to market their solutions as SAAS. Since SAAS is deployed in the cloud, it is presumably finely engineered for optimal performance in all kinds of workloads.

The thing is, you can sort of get phpBB as SAAS already. phpBB has a knowledge base article on how to do it with Microsoft Azure. There are also a number of sites that allow you to create phpBB forums on their servers, which are often for free for low usage sites, sort of how you can host a blog on wordpress.com for free under a subdomain like myblog.wordpress.com. And if you have web hosting already, there is usually a scripting center that allows you to install phpBB. But are these really providing software as a service? They arguably don’t because once you install phpBB you generally don’t want to use it “out of the box”. You want to change the style, or add extensions, or do all sort of fine-tuning. If you don’t need to do these things, then maybe these “SAAS” services are what you need. They just aren’t really SAAS, since you can’t give your site this degree of customization, because there is no way to do this other than to use phpBB. And if you use phpBB you will need to be able to upload and edit files on your phpBB instance.

Conclusion

With a better understanding of the cloud service types, you should now understand why phpBB is so rarely placed in the cloud. At its root, it’s because phpBB is not a cloud-first product, and probably never will be. In a future post, I’ll look into deploying phpBB using IAAS to give you some idea of what you might be getting into.

 

Should I host phpBB in the cloud?

So I’ve been playing with cloud providers, most recently looking at the Google Cloud in context with a WordPress group that I belong to. But over the years I’ve also studied Amazon Web Services, the original cloud provider. There are other cloud providers but really the only other major player is Microsoft Azure. Host on another cloud and you may find out that it won’t last in the long term, or is not a real cloud service. My goal is to eventually demonstrate how to run phpBB in the cloud, starting with the Google Cloud that I am currently exploring, and bring you along for the ride.

Characteristics of cloud services

There are lots of definitions of cloud services and cloud computing. From the perspective of someone who owns and manages a forum, all you probably really want to know about it what makes these services different than your typical web host like Siteground or GoDaddy. You will get lots of answers. Last year I helped move a big forum to Amazon’s EC2 cloud service. I got some preliminary answer from that work. Some differences:

  • Cloud services are scalable. If you have a host like GoDaddy and you outgrow the resources you are allowed to use inside the scope of your contract, you will get a little leeway. But generally you will be asked to move up to a higher class of hosting. This contrasts with cloud services. Its architecture lets your site grow seamlessly, at least if you set it up right, scaling up by a factor of 100 or more as needed, and maybe dropping back down after demand eases. So if you expect to have a forum that will get suddenly very, very popular, hosting with a cloud service should be a big selling point. Whereas, moving to a higher class of hosting at GoDaddy is potentially a lot of hassle.
  • You don’t get handholding with cloud services. Don’t expect to have a support hotline or a phone number that you can call to reach someone to help you struggle with technical issues. You either brings these skills with you or pay someone to leverage them for you.
  • Cloud services are not for cheapskates. It’s not that cloud services are inherently more expensive than traditional hosts. In many cases, cloud hosting is the better buy because you pay for what you use. Cloud services are elastic to scale on demand, so sometimes your costs will go way up for a given month. That’s because you are getting a lot more traffic or are using a lot more space or require additional virtual CPUs. Very tech savvy people who have small sites might be able to host for free in “micro instances” of these cloud services. Here’s a video that shows how a tech savvy person can spin up a site on a cloud service for less than a dollar a month, providing you know your site’s usage will be minimal. But you really have to know what you are doing. 

Why to not use a cloud service

  • You’re not a techie and want to stay that way. If you are paying $20 a month to Siteground, for example, it will seem like a rip off if you can do the same thing for $1 a month on the Google Cloud and it fits in a micro instance. But in most cases, it’s not. With web hosts, someone else is managing the infrastructure, providing 24/7 support and they provide a host of tools like cPanel to easily do things like manage files, create backups and create email addresses. You are free to concentrate more on what matters: your site and its content, and leave the heavy lifting to a company which is probably doing it for hundreds of people using the same machine you are. Someone else worries about security patches, system upgrades and site vulnerabilities. Yes, often if you manage a phpBB forum, you do have to put your hands into the soil, so to speak. You might have to create email addresses or tweak something in a database, generally in a control panel like cPanel or Plesk. But that’s a whole lot easier than trying to upgrade a Linux kernel or managing an email server’s firewall rules.
  • You prefer fixed costs. You don’t like surprises, particularly financial surprises. With a contract and a good web host, you know what you are paying for, for how long, and what you can expect while you host with the provider.
  • You don’t need to worry about your site getting quickly popular. Your forum is not the next Instagram. It may grow some during the year and there may be some spikes in traffic here and there, but it’s manageable.
  • You like having tech support on speed dial. Hosts of course vary in the quality of the technical support they provide, but knowing you can call a technical person on the phone or chat with them online about some weird problem you are having is comforting.

With phpBB in particular, while it can be made to work in the cloud, it is not a cloud-first product. In truth, cloud-services are mostly for developers and large organizations. Generally they want the reliability and high “up time” that cloud services provide. Organizations use cloud services to mitigate their risks and lower costs; maintaining their own servers and technical support staff is expensive. Most of these organizations though do have developers. They are writing or maintaining systems or services to handle lots of needs, and most of these are proprietary, not using off the shelf software like phpBB. The exception is the Software as a Service model. Some companies like salesforce.com offer their solutions as services you can rent, and put their services in either a public or a private cloud of their own.

In my next post, I’ll look at the other two models cloud services offer, Platform as a Service and Infrastructure as a Service and explain why neither is a great match for phpBB. That said, sometimes you might want to put phpBB on one of these service types anyhow. We’ll explore why and the tradeoffs involved.