How to Protect your Web Server from a Power Outage

How to Protect your Web Server from a Power Outage

Introduction

The most important aspect of operating your own web server is to ensure that it is always running. That means keeping the operating system up-to-date by installing the latest pacthes. But also, you have to seriously consider how to protect your web server from a power outage.

You may think that a power cut will only make your websites unavailable for a short period of time and you can live with the outage. However, power cuts can cause more havoc than you may think.

in this article, I willl highlight the issues that power cuts can cause to your web server. I will also provide preventative solutions, so that you can protect your precious websites and hardware.

Invest in an Uninterruptable Power Supply (UPS)

An uninterruptable power supply is essentially a large battery that is connected to your server. It automatically activates and directs power to your server in the event of a power cut. This means you do not get a sudden loss of power and the problems that are assocoated with this loss.

Depending on the length of time that there is a power outtage, you may have to shutdown the server. This is primarily what UPS’s are designed to do. They are not designed to keep your server running indefinitely. Anyone who has worked in I.T. understands that the biggest risk to hardware and data is a sudden shutdown of the system – either from a power surge or an accidental shutdown.

When your UPS activates, then you should take this opportunity to shutdown your server normally. Or at the very least, be aware of how much battery power you have available and shutdown if you are approaching the limit of remaining battery power.

It is normal for UPS’s to offer power surge protection too. This ensures that an overload of power doesn’t destroy installed hardware in your server. But you can always invest in separate surge protectors.

Here are some of the most suitable UPS’s depending on the power requirements of your hardware.

Hardware Redundancy

Sometimes, despite our best efforts, a power cut can damage hardware in your server. There are some ways you can minimise the downtime.

Firstly, you can install the operating system on RAID drives. This is essentially 2 or more drives that are exact duplicates. However, this isn’t simply a backup of one drive to the other. Both these drives would be written to simultaneously as part of normal disk operations. If one of these drives fail, you can swap the broken drive out and still have all your data intact on the functional drive. The new drive will have all the original data written to it upon insertion.

If you have a business grade server, this process is even easier. This is because expensive servers like these support hot-swapping of hard drives, meaning you do not have to power-off the server to insert the new drive. Additionally, use server grade hard drives for better protection.

Keep Your Server Operating System Updated

Why should you worry about keeping your system updated if we are talking about power cuts? The answer is straightforward. It is not uncommon for an operating system to configure updates upon restarting the system. If you haven’t been keeping on top of updates then it is highly likely that you will have an even longer downtime than you would have just from powering down your system and restarting when the power is restored. However, if you have been frequently installing updates and restarting your server at quieter times when you have little traffic, then you minimise disruption.

Have a Mobile Internet Backup

Although the primary aim of using a UPS is to give you time to shut down your server safely. What if you use a low-power server, e.g. a Raspberry Pi, and know your UPS has enough battery power to run your server for days. In all likelihood, you will have lost your broadband during the power cut. However, if you use a backup 4G/5G router (also connected to your UPS), then you can connect to mobile data as a temporary measure to ensure there is no downtime whatsoever on your server. Mobile transmitters are usually miles away and not connected to the same electricity grid at your location.

Have a Backup Plan

Now that you know the damage that a power outage can cause, it is a good idea to have a backup plan for your data. You could either backup your data to a cloud service or you could back it up locally. If you backup your data locally, then you usually want to do this at regular intervals and always consider an offsite storage solution. A power outage isn’t going to ruin a backup but what if there is a flood, fire or theft in your premises? You’ll lose the backup.

Conclusion

If you maintain your own server then I highly recommend installing an uninterruptable power supply. Particularly, if you have high-traffic websites and/or run many websites on the same server. The peace of mind you will get from utilising a UPS, and perhaps even the revenue stream protected by not having your websites down for a poeriod of time, makes this investment worthwhile.

If for example, you run websites with adverts or affiliate links, any downtime means that you are no longer getting paid from any of these sources. When you consider that lost revenue, then the cost of a UPS isn’t particularly prohibitive. Considering the cheapest options start at less than £100 or $130.

Additionally, if you follow the other backup measures outlined in this article, it could save you a time and money in the long run. Nobody knows when disaster may strike your web server, so it is a good idea to be prepared for the worst.

Best Website Design and Development Software for Manjaro

Best Website Design and Development Software for Manjaro

Introduction

For many years, website designers have used Apple Macs and the Adobe Suite to create wireframes, site maps, and mock-ups of websites. Even those who use a Windows PC will likely still use the Adobe Suite. But what if there was a free software alternative? In this article, I will be highlighting the best website design and development software for Manjaro Linux.

You may be wondering why I have chosen Manjaro Linux, rather than Ubuntu Linux. The answer to that is very simple. It is my preferred Linux distribution. The main reason I love Manjaro Linux is that it is a rolling distribution. What does this mean? Unlike Ubuntu, which has full system upgrades every 6 months – or 2 years if you use the LTS version of Ubuntu – Manjaro does smaller upgrades more frequently. This matters to me, as more often than not when I have upgraded Ubuntu, it has caused a catastrophic error or affected system devices in a negative way. For example, the internet connection is lost.

Now that you know why I use Manjaro Linux, Let’s have a look at the best website design and development software for Manjaro.

Krita

Available from the official repository.

If you need an alternative to Adobe Photoshop then Krita is the application you want. For a free piece of software, it is surprisingly good. It has all the raster drawing tools you would expect and a vast selection of paintbrushes, so if you want to paint or draw you can do that. You can also touch up photos if painting isn’t your speciality.

GIMP is another popular paint program on Linux but I personally prefer Krita. it is more powerful and has a better laid out interface.

Inkscape

Available from the official repository.

This is the best free alternative to Adobe Illustrator that you’ll find on Manjaro. Unlike Krita which is a raster painting and drawing application, Inkscape is the tool you need for creating and editing vector graphics. If creating illustrations and logos is a big part of your workload then Inkscape is ideal for your needs.

Scribus

Available from the official repository.

Scribus is a desktop publishing tool. So why include it in a web designers list, you may ask? I will usually design website wireframes in Scribus because all I need for that is some lines and text. You could do this in Inkscape or Krita but I find I work faster in Scribus.

WordPress Desktop Client

Available from the official repository.

If you work with WordPress websites on WordPress.com, rather than using self-hosted websites, then the WordPress Desktop Client may be of use to you. It isn’t a website design tool exactly. It is a cut-down interface that is mainly aimed at writers and bloggers who simply want to publish articles. But if that is what you or your client needs then you can access it in Manjaro.

Darktable

Install via terminal: pacman -S darktable

If you take a lot of photos to use on websites then you probably need a way of organising your collection. Darktable is the best option to do this. However, it does more than simply organise your photos. You can manipulate raw image files, apply filters, embed metadata in photos and tag the images. I personally think it is the best app of its kind and it is free.

DaVinci Resolve

Available from the developer website – blackmagicdesign.com*

If you create videos for your website then look no further than DaVinci Resolve. It is a brilliant video editor and puts many of the paid solutions to shame. The only down point is you will need to download the source files from the developer website and build them via the terminal. However, when you register with the website and get your download, instructions will be provided.

If you want to avoid the complexity of installing DaVinci Resolve then you can use OpenShot. OpenShot lacks the many features of DaVinci but is fine for basic video editing. It is an easy installation from the Manjaro Software repositories.

VLC Media Player

Available from the official repository.

You’ll probably want to view videos you’ve made or edited. VLC Media Player is probably a name you’re familiar with. It is available for Manjaro.

Synfig Studio

Available from the official repository.

If you create 2D animation for your website then Synfig studio could be useful. It allows you to create vector 2D animation, has a clean interface, and runs fast in comparison to other animation applications.

Shutter

Available as a Snap app.

You may need a screenshot tool to add page layouts to your design portfolio or to show clients what you’ve created. Shutter can fill this need. It has tons of features that allow you to manipulate your images or grab portions of the screen. However, you do need to install it via the Snap repository, so you’ll need to install Snap first.

If you do not want to use the Snap repository, there is another screenshot app you can use. It’s simply called Screenshot. It’s a basic app but it can take a screenshot or grab a window, which may be all you need.

ReText

Available from the official repository.

This is my favourite markdown editor for Manjaro. I actually use this to write all my blog posts in markdown. I then export the markdown to an HTML file. Then I simply copy and paste it into the WordPress editor. I could write these posts in HTML but this just makes the process slightly quicker and has a simple interface, aimed at writers, with few distractions. If you know you want to write basic HTML, then this is the tool to use. Stick to Visual Studio Code for more complex HTML.

Vivaldi

Available from the official repository.

Vivaldi is a web browser built on open-source Chromium. It is my favourite web browser as it packs lots of features that you will not find in other browsers. Plus, it still has the web developer tools you find in Chromium. However, if you want to stick to a more familiar browser then Chromium and Firefox are both available in Manjaro too.

Visual Studio Code

Available from the official repository.

You probably already use Visual Studio Code if you write HTML mark-up and CSS on Windows. You might even use the plethora of plug-ins that allow you to write code in PHP, Python or C#. All that functionality can be yours in Manjaro as well. It is the best free code editor you can get. I personally think it is a far superior package to alternatives, such as Atom, Brackets and Sublime Text. Just ensure you search the official software store for ‘VSCode‘ as searching for its full name doesn’t display it. Or maybe that is just a glitch on my system.

PyCharm

Available from the official repository.

For those who make websites in Python – PyCharm is a Python IDE. You could also use Visual Studio Code but if you work exclusively with Python then this may be the better option.

FileZilla

Available from the official repository.

You will need an FTP client to upload website files to your web host. FileZilla does this job perfectly. I would be amazed if you were not already familiar with FileZilla. It has been the go-to FTP application for a long time.

VirtualBox

Available from the official repository.

You might want to create virtual machines for various development test servers. You can do this with VirtualBox. You can install Ubuntu Server, Windows Server, or any other operating systems. This is very handy if you do not want to clutter your Manjaro installation with a server install.

AMPPS

Download from the official AMPPS website

If you want a local server environment similar to XAMPP, then AMPPS may be what you need. It is actually very similar to XAMPP but has many more features. It isn’t officially supported on Manjaro but I managed to get it working fine by following these installation instructions on the AMPPS website.

Apache Server

Available from the official repository.

If you would prefer not to use AMPPS or VirtualBox, then you can install the Apache Web Server directly on to your Manjaro installation. To install multiple websites, you would need to configure virtual hosts. I cover this – and how to configure Apache – in my tutorial Running a Live Web Server on a Raspberry Pi from Home.

Putty

Available from the official repository.

If you run your own live web server then you may need a method of connecting to it to perform maintenance tasks. Putty is an SSH client that allows you to do this.

Conclusion

This is the complete list of applications I use – or have used – on Manjaro Linux. I personally install an Apache test server directly on to Manjaro, rather than using AMPPS. Although, AMPPS is a great application if you are looking for this type of app.

I also use a Windows Server virtual machine for when I occasionally dabble with coding in C#. The point is that you can pick and choose what software you like as there is such a vast choice. Maybe you will even find alternatives in the Software Manager than what I’ve listed here. That’s the beauty of Manjaro – there are so many choices.