Are you looking for a simple but thorough guide on how to set up a Ubuntu Mail Server? Look no further!
Dive into our step-by-step guide on ‘How to Install Ubuntu Mail Server‘ and unlock the secrets to mastering your own email server today!
In this post we will walk you through the steps of installing and configuring Mailcow, a very popular email server for sending and receiving emails.
But first, let’s learn a little bit about Mailcow.
What is the Mailcow Email Server?
Mailcow is an open-source email server solution that makes setting up email services on Linux a breeze. It’s specifically designed for running inside containerized servers, integrating key components such as a mail transfer agent, a webmail client, and security features – all into one single system.
Mailcow is essentially a collection of Docker containers that run various mail server applications, including (but not limited to) SOGo, Postfix, and Dovecot. Each container represents a single application – and they are all connected in a bridged network.
It offers a modern and user-friendly web interface, known as the Mailcow UI, which provides a simple and easy interface for configuring nearly all settings and administrative tasks, such as enabling the easy creation of new domains and email addresses with just a few clicks.
All the data, such as emails and user data, is stored in Docker volumes. This setup makes Mailcow a robust and straightforward choice for those seeking a self-hosted email server solution.
How to Install SMTP Email Server in Ubuntu
Here are the step-by-step instructions for installing the Mailcow email server on a Linux server:
Prerequisites
If you don’t plan on sending too many emails, then you’re better off using a third-party email service as it’s generally cheaper than maintaining and running a private email server. We’ve already covered the topic of using third-party email servers in extensive detail in our previous posts, which you can jump to here:
If you are determined to set-up your own email server, we recommend installing it on a separate VPS from your websites. By doing it this way, if someone hacks into your website, they won’t be able to gain access to your emails and user data.
As we’ve mentioned, we will be using Mailcow as our email server, so begin by making sure your machine meets the following minimum requirements so that the installation process goes smoothly:
CPU: 1 GHz
RAM: Minimum 6 GiB + 1 GiB swap (default config)
Boot Disk: 20 GiB (without emails)
Architecture: x86_64, ARM64
You can provision your server from any cloud provider that meets these requirements. In this tutorial, we will be using a Ubuntu 22 instance on Hetzner. Once your machine is up and running, you need to log in to your server via the command line and install Docker.
Some providers may block outgoing ports to prevent spam, so make sure you configure your firewall settings to allow incoming TCP connections on all of the following ports: 25, 465, 587, 143, 993, 110, 995, 4190, 80, and 443.
On Hetzner, you’ll need to submit a special request to unblock port 25 and 465 by going to your server settings and switching to the networking tab. On this screen, you will see a button labeled ‘Request Unblocking Ports’.
When you click on the ‘Request Unblocking Ports’ button, you will see a dialog box which will require you to justify the need for this action. In the provided textbox, explain why you need an email server and submit the request – most requests are automatically approved within a minute.
Dashboard Domain Setup
Once you have a server up and running, it’s time to set up your DNS records. Although this action can be left until later, we recommend doing this first because DNS propagation takes time.
Go to your DNS registrar’s dashboard and add the relevant A/AAAA records for the dashboard of your email server to point this domain to your machine. After setting up the mail server, your users will need to visit this website to send and read emails.
Note: This domain can either be a completely separate fully-qualified domain name, or it can be a subdomain of your existing domain – it doesn’t matter.
If you’re using RunCloud, you can easily set up and configure your DNS records using the DNS manager right from your RunCloud dashboard.
Log in to your server with root privileges and start the process of installing Mailcow by running the following commands:
cd /opt
git clone https://github.com/mailcow/mailcow-dockerized
cd /opt/mailcow-dockerized
./generate_config.sh
The above commands will download and store the necessary files for starting the installation on your server. If you executed the above commands correctly, the command line will prompt you to enter the domain name that you configured in the previous step. After entering the domain name, you will be asked to specify some basic settings such as timezone and the development branch.
Enter your timezone, or just press ‘Enter’ to use the default settings. Next, press ‘1’ to use the stable version and then press ‘Enter’ – this will download the necessary files for starting the installation. Finally, execute the following commands to download and run the docker containers:
docker compose pull
docker compose up -d
After executing the above Docker commands, you will see that all the necessary containers have been started.
Dashboard Setup
Once your Docker containers are up and running, you can visit your Mailcow dashboard main page in your browser using the domain name that you specified earlier. On this screen, you will see a login page for the default admin account – the admin credentials are admin and moohoo.
When you log in to your dashboard for the first time, you will see a statistics page for your server that shows basic diagnostic information such as CPU usage, memory usage, and all the currently running services.
Inbox Domain Setup
In your Mailcow dashboard, you can now start adding different domain names for your email inboxes. Click on the Email dropdown and select Configuration. In the domains tab, you can click on “Add domain” and follow the instructions on screen to set it up.
After filling in all the information, you will be asked to configure the DNS records for this domain. Go to your DNS registrar’s dashboard and create all the required records using the values provided by Mailcow.
Setting up these DNS records correctly is necessary for sending and receiving emails via your mail server. Read our post titled DKIM – What Is It & Why Your Emails Need It to understand this better.
User Setup
After adding an inbox domain to your mail server, you can start using it immediately by creating new user accounts. Switch to the users tab and click on “Add User” to create a new account.
On the next screen, you can fill in your username, full name, a login password, and configure other email settings such as the rate limit or the protocol that can be used to access your email address.
Webmail Setup
After adding users to your server, you can open your SOGo dashboard by clicking on the Apps > Webmail. Once you click on Webmail, it will show you a login form, where you can enter the email address and password that you just created.
Once you log in to your email account, you can start using it to send and receive emails normally.
Wrapping Up
Setting up an email server on Ubuntu can be a complex task, but with the right tools and guidance it becomes entirely manageable. We’ve walked through the process of installing a Mailcow email server, which offers a robust and straightforward solution for those seeking a self-hosted email server.
However, it’s important to note that if you’re planning to send fewer emails, using a third-party email service might be a more efficient and cost-effective solution. These services often provide better deliverability, simplified scalability, and dedicated support – which can save you a lot of time and effort in the long run.
Lastly, for managing and deploying web applications to the cloud, we highly recommend using RunCloud. It’s a powerful and user-friendly platform that simplifies the process of managing, configuring, and deploying applications, making it an excellent tool for developers of all skill levels.
Ubuntu does not have a mail server of its own, but it supports several mail servers, such as Postfix, Sendmail, and Exim.
How to create an SMTP server in Ubuntu?
To create an SMTP server in Ubuntu, you can install Postfix, which is a popular and powerful SMTP server. Here are the steps: Update your package list using sudo apt-get update. Install Postfix using sudo apt-get install postfix. During the installation, a prompt will appear asking for the type of mail configuration. Select ‘Internet Site’. Enter the fully qualified domain name (FQDN) for your server. Once the installation is complete, you can edit the configuration file located at /etc/postfix/main.cf as per your requirements.
How to set up Sendmail in Ubuntu?
Setting up Sendmail in Ubuntu involves a few steps: Install Sendmail using sudo apt-get install sendmail. Configure /etc/mail/sendmail.mc by defining SMART_HOST. Run make in /etc/mail to implement the changes. Restart the Sendmail service with sudo service sendmail restart.
What is the difference between Ubuntu and CentOS mail servers?
The primary difference lies in the package management and the associated configurations. Ubuntu uses apt for package management, while CentOS uses yum. Therefore, the installation and configuration commands will differ. However, both can run the same mail servers such as Postfix or Sendmail.
Why do I need a mail server in Linux?
A mail server in Linux allows you to control your mail data, apply extensive customizations, integrate with other applications in your environment, and more. It’s particularly useful for businesses that require extensive control over their email.
What is the default Linux mail server?
There isn’t a default mail server for all Linux distributions.
Should you use Sendmail or Postfix?
Both Sendmail and Postfix are robust and reliable mail servers. Postfix is often favored for its ease of configuration and better security track record. However, some might prefer Sendmail because of its wide usage and extensive online resources.
How do I run a local SMTP server?
To run a local SMTP server, you can use tools such as Postfix or Sendmail. After installing them, you need to configure the mail server to run on your local machine, usually by setting the inet_interfaces parameter to localhost in the configuration file.
Do you want to download multiple files from a Linux server? Or maybe you want to store the logs to comply with regulations?
In either case, you should compress the files into a RAR archive. In this post, we will show you how to create and extract RAR archives in Linux.
But before we get started, let’s quickly understand what a RAR archive is.
What are RAR Files?
RAR is an acronym for Roshal Archive, which is a type of compressed file format used to reduce the size of files or groups of files. The RAR format offers several advantages over uncompressed files:
Reduced Storage Space: Compressing files into a RAR archive can significantly decrease the amount of disk space they occupy.
Faster Transfer Speeds: Smaller file sizes mean quicker upload and download times, especially over the internet.
Improved Data Management: It’s easier to manage and organize a single RAR file than multiple smaller files.
Data Integrity: RAR files can include error checking and recovery records to repair minor corruptions.
Security: RAR files can be encrypted with passwords, providing an additional layer of security for sensitive data.
It’s clear that RAR files can be pretty useful, so now let’s see how to use them via command line on Linux servers.
Installing RAR Tools
Before you can work with RAR files in Linux, you need to install the necessary tools. Here’s how you can do it:
Step 1: Update System Repositories
Connect to your server via SSH and enter the following command to update your system’s package list:
sudo apt-get update
This ensures that you have the latest information about available packages and their versions.
Step 2: Install unrar & rar Packages
To handle RAR files, you’ll need to install unrarfor extracting RAR files, and rarfor creating RAR files.
Use the following command to install necessary packages:
sudo apt-get install unrar rar -y
After installation, you can start using these command line utilities to manage RAR archives.
Working with RAR Files
With the necessary tools installed, you can now create and extract RAR files using the following steps:
Creating RAR Files
Step 1: Navigate to the Directory
Change to the directory containing the files you want to archive:
cd /path/to/directory
You can use the pwd command to check your current working directory and the ls command to see the list of all the files and directories present in the current directory.
Step 2: RAR File Creation Command
Once you are in the correct directory, use the rar command to create a new RAR archive:
rar a archive_name.rar file1 file2 file3
Replace archive_name.rar with your desired archive name, and file1 file2 file3 with the files you want to include. If you want to include all the files in current directory, then you can enter * instead of file names.
In the above example, we can see that the rar utility created a new archive called myData.rar and added all the files listed that were specified in the command line arguments.
Extracting RAR Files
If you have downloaded a RAR file, then you can easily extract this file using the following steps:
Step 1: Locate the RAR File
Before we get started, make sure you know the exact path to the RAR file you wish to extract. You can either use the absolute path (from root) to the file, or the relative path (from the current location).
For example, in the above screenshot, we have an archive in the current directory. For this file, the relative path would be myData.rar and the absolute path would be /tmp/test123/myData.rar.
Step 2: Extraction Command
After you have noted the path to your archive, you can extract its contents using the following command:
unrar x archive_name.rar
Replace archive_name.rar with the path of your RAR file.
In the above example we can see that we are working in a different directory (test234) and used the absolute path of the archive to extract it into the current working directory.
Step 3: Directory Structure Preservation
By default, unrar preserves the directory structure of the archived files. If you want to extract the files to a specific directory, you can specify the new path as a command line argument:
unrar x archive_name.rar /path/to/destination
Replace /path/to/destination with your desired directory path.
In the above example, we can see that the /tmp/test345 directory is empty in the beginning. We use the unrar command to extract data from the archive in the specified directory. After this, we use the ls command once again to check the contents of the /tmp/test345 and confirm whether the file was extracted successfully.
Advanced RAR Operations
Listing Contents
To view the contents of a RAR file without extracting them, you can use the following command:
unrar l archive_name.rar
This will list all the files and folders contained within the RAR archive.
Adding Files to an Archive
The process of adding files to an existing RAR archive is similar to creating a new archive. You can use the following command to add a file:
rar a archive_name.rar file_to_add
Replace file_to_add with the name of the file you wish to add to the archive_name.rar archive.
Setting Passwords to RAR Archives
If you are working with sensitive data, you can create a password-protected RAR file. To do this, you can use the -p option when creating the archive:
rar a -p archive_name.rar file_to_archive
After entering this command, you’ll be prompted to enter and verify a password for the archive. Keep in mind that when you type your password, it will not be displayed on the screen.
Opening RAR Archives With A Password
The process of opening a password protected archive is similar to opening a simple file. Just use the following command to open the archive and enter your password when prompted:
unrar x archive_name.rar /path/to/destination
After typing your password, press ‘Enter’. If your archive has more than one file, you will be prompted to enter a password for each file – simply press the ‘a’ key on your keyboard to use the same password for all files.
Splitting RAR Archives
When working with extremely large files you sometimes need to split them into multiple parts. This is useful when you want to copy them over a network or store them in a smaller storage space.
To split a large RAR file into smaller parts, you can use the following command:
rar a -vsize archive_name.rar file_to_archive
Replace size with the maximum size for each split file (e.g., 10m for 10MB parts).
In the above example, we can see that the -v10m parameter was used when creating the archive. This made sure that all the archive files were smaller than 10MB. On the other hand, if we had created a single archive, it would have resulted in a much larger file size.
Conclusion
Throughout this guide, we’ve explored the vast capabilities of RAR files within the Linux ecosystem. From creating and extracting archives to advanced operations such as encryption and splitting files. We encourage you to discover new ways to use these utilities and streamline your workflow.
And if you’re looking to take your server management to the next level, consider using RunCloud.
RunCloud simplifies server management tasks, saves you time, and lets you focus on what’s truly important – building great applications.
With RunCloud, you can automate the tedious aspects of server management, ensuring that your Linux servers are running smoothly and efficiently.
If you’ve ever used a command line interface to access a computer, then you may have noticed a name at the start of each line – the system hostname:
Have you ever wondered what it is, and why it’s there? If so then you’re in the right place. In this post, you will learn everything you need to know about hostnames in a Linux environment, and how to change them. But first, let’s understand what a hostname actually is.
What is a Hostname?
A hostname is a unique name that identifies a computer or device on a network. It can be used to communicate with other devices, access shared resources, or identify the owner or purpose of the device. A hostname can be any alphanumeric string – for example: laptop, server, or runcloud.io.
When accessing a resource over a network, it’s not immediately obvious what computer is being used. If you have a graphical user interface, you can make a good guess by looking at the wallpaper or the time of the device, but it is very difficult when using a command line interface – and this problem only gets worse as the number of computers increases in the network.
Having a hostname makes it possible to distinguish one computer from another. Here are some examples where hostname is useful:
When you connect to a wireless network, your device’s hostname may appear on the router’s client list or other devices on the same network. Changing the hostname to something more descriptive can help you identify your device easily and avoid confusion with other devices that may have similar default hostnames.
When you use remote access tools such as SSH or VNC to connect to your device from another computer, you may need to enter the hostname or IP address of your device. Changing the hostname to something more memorable can make it easier to remember and type the address, especially if your device has a dynamic IP address that changes frequently.
When you use file sharing or streaming services such as Samba or DLNA to share or access media files on your device, your device’s hostname may appear as the name of the server or the source of the files. Changing the hostname to something more meaningful can help you organize and find your files more quickly and conveniently.
How is Hostname Different from MAC Address and IP Address?
You may be wondering why we need hostnames when we already have MAC addresses, and IP addresses – both of which are different ways of identifying a device on a network. They serve different purposes and operate at different layers of the network – let’s see how.
What is a MAC Address?
A MAC address, also known as a hardware address, is a physical address that is assigned by the manufacturer of the network interface card (NIC) of the device. It is a 48-bit hexadecimal number that uniquely identifies the device at the data link layer (layer 2) of the network. It looks something like 00:E0:4C:18:89:3B and it is used by switches and other devices to forward data packets to the correct destination based on the MAC address of the sender and the receiver.
A MAC address cannot be changed easily and it doesn’t depend on the network configuration or location of the device. Moreover, if your computer has more than one way to connect to a network then it will have a separate MAC address for each of them. For example, many laptop computers can connect to a network via both Wi-Fi and wired connections.
What is an IP Address?
An IP address is a logical address that is assigned by the network administrator or the internet service provider (ISP) of the device. It is a 32-bit (IPv4) or 128-bit (IPv6) number that uniquely identifies the device at the network layer (layer 3) of the network. For example, 192.168.100.1 and fe80::1 are IPv4 and IPv6 addresses.
It is used by routers and other devices to route data packets to the correct network or subnet based on the IP address of the sender and the receiver. An IP address can be changed dynamically and it depends on the network configuration and location of the device.
How is the Hostname Different?
A hostname is a human-readable name that is assigned by the user or the system administrator of the device. A hostname can be changed easily and it doesn’t depend on the physical or logical address of the device. We need hostnames because they are easier to remember and use than MAC addresses or IP addresses, which are long and complex numbers.
Hostnames also allow us to access devices or websites using meaningful names rather than numerical addresses. For example, it is easier to type www.google.com than 172.217.160.78 in the browser. Hostnames also enable us to change the physical or logical address of the device without affecting the name of the device or the service it provides. For example, if a server crashes, you can immediately spin up a new server with the same hostname and if everything is configured correctly, nobody would notice the crash.
Is Hostname the Same as Domain Name?
A hostname and a domain name are both labels used to identify and locate resources on the internet, but they are not exactly the same. A hostname is a name assigned to a specific device or server on a network, while a domain name is a name assigned to a website or a group of servers.
Additionally, hostname is supposed to be unique in a network, but you can have more than one computer with the same hostname. However, domain names are globally unique, – you have to pay money to a domain registrar such as Namecheap or Cloudflare to register and use a domain name.
For example, www.example.com is a domain name that represents a website, and www is a hostname that identifies a specific server within the domain. A domain name can have multiple hostnames, but a hostname can only belong to one domain name. A hostname can also be a domain name if it is registered as such. For example, google.com is both a hostname and a domain name.
How to Check the Current Hostname on Linux
To check the current hostname, you can use the hostname command in the terminal. It will display the name of the device as configured in the system:
hostname
In the above example, we can see that my-server is the hostname of the computer.
How to Set or Change the Hostname Temporarily
To set or change the hostname temporarily, you can use the hostname command with a new name as an argument. This will change the name of the device only for the current session, and it will not affect other devices on the network.
hostname newname
In the above example, we can see that when we execute the hostname command with superuser privileges, we can change the hostname of the computer.
How to Set or Change the Hostname Permanently
To set or change the hostname permanently, you need to edit two files: /etc/hostname and /etc/hosts. The /etc/hostname file contains the name of the device, and the /etc/hosts file contains the mapping between the name and the IP address of the device. You need to have root privileges to edit these files.
If you are not sure how to edit files via terminal, we recommend you read our in-depth post on editing files via Nano.
sudo nano /etc/hostname
# change the name to newname and save the file
sudo nano /etc/hosts
# change the line that starts with 127.0.0.1 to include newname and save the file
For example, if you change your hostname to runcloud-sandbox then your hosts file should look like this:
127.0.0.1 localhost runcloud-sandbox
Wrapping Up
In this post, we have learned how to set or change the system hostname in Linux. We have also learned what a hostname is, and how it differs from a MAC address and an IP address.
We have limited our discussion to Linux computers only. However, you should know that other devices such as Windows and Android phones also have hostnames, but they may use different methods to set or change them.
For example, Windows allows you to change the hostname from the System Properties dialog box, while Android requires you to use the terminal or edit the system files. Some devices may also have additional names or identifiers, such as Bluetooth name, device model, or network name, that are not the same as the hostname.
If you’re looking for a way to make managing servers much easier and save time, we recommend you take a look at RunCloud.
RunCloud is a cloud server management platform that allows you to deploy, configure, and manage your web applications on any cloud provider.
With RunCloud, you can easily set up your server, install your web stack, secure your server, monitor your performance, and automate your tasks. RunCloud supports various web applications such as WordPress, Laravel, Drupal, Joomla, and more. RunCloud also supports various cloud providers such as DigitalOcean, AWS, Google Cloud, Azure, and more.
In this article we’ll be explaining what these terms mean, why they’re important, and answering a common question – how to list Linux users and groups in Ubuntu with the command prompt.
It doesn’t take long once you’ve dived into Linux systems before you encounter words such as ‘root’ and ‘sudo’, which aren’t at first glance entirely easy to understand.
But first, let’s discuss the difference between root user, system user, and regular user on Linux.
What are the 3 types of users in Linux?
Most people are familiar with two types of user accounts on Linux, but did you know that there are actually three different types of users? Let’s see what each one of them does:
Root User: The root user, also known as the superuser, has the highest level of access to the system. This user can read, write, and execute any file, and can perform administrative tasks such as creating, deleting, or modifying accounts, changing ownership of files, and managing system-wide settings. For example, the root user can use the sudo command to execute commands with administrative privileges.
System Users: System users are created by the operating system during installation for running system processes and services. These users have fewer privileges than the root user and are typically used to run non-interactive or background processes. For instance, the www-data user in Ubuntu is a system user that runs the Apache web server.
Regular Users: Regular users are the standard users who use the system for daily tasks. They have the least privileges and can only read, write, or execute files in their home directory. These users can’t access other users’ files or system files without appropriate permissions. For example, a regular user can create and edit files in their home directory, but cannot modify system files located in /etc or /var.
What is the /etc/passwd File in Linux?
The /etc/passwd file is a key file in Linux that contains information about different user and system accounts present on that system. Each line in the /etc/passwd file represents a single user account and contains seven fields separated by colons (:). Here’s a brief overview of these fields:
Username: This is the name of the user. It should be unique and is used for logging in.
Password Indicator: In modern Linux distributions, this field is usually set to x. The actual hashed password is stored in the /etc/shadow file, which has stricter access controls.
User ID (UID): This is a unique numerical ID assigned to the user. The root user always has a UID of 0.
Group ID (GID): This is the numerical ID of the user’s primary group. The group details are stored in the /etc/group file.
Comment/Description/User Info: This field is optional and can contain extra information about the user, such as their full name.
Home Directory: This is the absolute path to the user’s home directory, where their personal files are stored.
Shell: This is the absolute path to the shell that is started whenever the user logs in.
As we mentioned above, the /etc/passwd file contains a list of all the users on a Linux computer, and since this file can be read by any user, we can open it using various tools to see a list of all the users in Linux.
Method 1: List Users Using the cat Command
The cat command in Linux prints the entire contents of a file in the Linux terminal, and so you can use the following command to display the content of /etc/passwd file:
cat /etc/passwd
Method 2: List Users Using “less” or “more”
The “less” and “more” commands are very similar – they both allow you to peek inside a file without actually printing its contents in the terminal. If the list of users is long, you can use either the less or more command for easier navigation:
less /etc/passwd
more /etc/passwd
Method 3: How to List Users Using the awk Command
The awk command provides you with the option to perform pattern matching and processing on the specified file. You can use this utility to list users by filtering the /etc/passwd file using the following command:
awk -F: '{ print $1}' /etc/passwd
Method 4: List Users Using the getent Command
The getent command displays entries from databases configured in the /etc/nsswitch.conf file, including the passwd database which contains user information. To get a list of all users, you can use the following command:
Simply put, a group is a collection of Linux users that makes it easier to collectively manage the permissions and privileges for each user in the group.
In Linux, each user can belong to one or more groups, and when a user is part of a group, they inherit the permissions and privileges of that group. This system allows administrators to manage multiple users’ permissions simultaneously.
Let’s try to imagine a Linux system as a large office building to understand the concept of groups. In this building, there are different departments such as HR, Finance, Marketing, etc. Each department is like a group in Linux.
Now, each department will have employees working in it, and these employees correspond to a user in Linux. An employee can belong to multiple departments, just like a user can belong to multiple groups in Linux.
In this building, each department has its own resources and access permissions. For example, only HR employees can access HR files, only Finance employees can access financial data, and so on. This is similar to how file permissions work in Linux – when a user is part of a group, they inherit the permissions of that group.
This way, Linux groups help in managing permissions and access control efficiently, especially in environments where there are many users.
There are multiple ways to list groups in Linux, let’s take a look at each one of them:
Method 1: Use the groups Command
In Linux, you can list all the groups that the current user is a member of by simply using the groups command (without any options) as shown below.
groups
Method 2: List all Groups Using the /etc/group File
As the name describes, the /etc/group file contains information about all the groups on the system. You can use the cat command to display its content:
cat /etc/group
Method 3: List All Group Names Using The cut Command
The cut command in Linux provides simple tools to view and process certain sections of a text file and display its contents to the terminal. You can use the cut command to display only the group names from the /etc/group file:
cut -d: -f1 /etc/group
Method 4: List All Groups Using The getent Command
As we mentioned before, the getent command displays information from databases configured in /etc/nsswitch.conf file, including the group database which contains group information. To view a list of all the groups present on a Linux computer, you can use the following command:
In this post, we’ve explained how Linux users and groups work, as well as how organizing the accounts in a logical structure makes it easier for the administrators to manage and maintain the permissions.
While it is easy to grant permissions to any user on your system, it’s important to keep in mind that misuse of user privileges, especially the root user, can lead to system instability or security vulnerabilities. Therefore, we recommend you only grant the level of access necessary to perform a task.
While managing the accounts and permissions in Linux might sound complicated, you don’t need to be a Linux expert to do so. RunCloud simplifies the process, making it easy to manage your website and server with a single click.
To create a group, use the groupadd command followed by the name of the group. For example, to create a group named ‘developers’: sudo groupadd developers To delete a group, use the groupdel command followed by the name of the group. For example, to delete the ‘developers’ group: sudo groupdel developers
What is the chmod 777 command?
The chmod 777 command changes the permissions of a file or directory to be fully open to all users. The three digits represent the permissions for the owner, group, and others, respectively. Each digit is the sum of read (4), write (2), and execute (1) permissions. So, ‘7’ gives full permissions. chmod 777 filename
What is getent command in Linux?
The getent command in Linux is a tool that helps users retrieve entries from a number of important text files called databases; this includes the passwd and group databases, which store user information. Here are some examples of how to use the getent command: To fetch the list of user accounts on a Linux system (stored in a database known as passwd), you can use the command getent passwd. If you want to fetch details for a particular user, for example, a user called naman, then you can use the command getent passwd naman. If you want to fetch a list of group accounts on a Unix system (stored in a database called group), then you can use the command getent group.
Which command lists all users currently on the system in Linux?
The who command can be used to list all users currently logged into the system: who
What are Linux system users?
In Linux, there are a few user accounts that are automatically created by the system to perform background tasks. These users don’t have a password and can’t log in to interact with the computer – they are only used to grant a specific set of privileges to a particular tool or process.
How do I know if I am a root user?
You can use the whoami command to check if you are the root user: whoami If the output is ‘root’, then you are the root user.
What is the sudo code?
In Linux, sudo is a command that allows users to run programs with the security privileges of another user (by default, the superuser). It stands for “superuser do”. For example, to run the ls command as superuser: sudo ls
Redis has long been one of the most admired in-memory databases – fast, flexible, and widely adopted across modern applications. In 2024, however, the company behind Redis moved the project away from its long-standing open source roots, triggering widespread concern in the developer community and sparking forks like Valkey.
In May 2025, Redis reversed course.
The release of Redis 8 introduced a new open source license (AGPLv3), reintegrated Redis Stack features into core Redis, and reaffirmed the company’s commitment to the open source ecosystem.
In this post, we’ll briefly cover what Redis is and why in-memory databases are so useful. Then we’ll walk through the recent licensing changes and what they mean for developers. Finally, we’ll highlight several powerful alternatives you might want to consider, whether you’re sticking with Redis or exploring something new.
What is Redis?
Redis, which stands for Remote Dictionary Server, is an open-source, in-memory data structure store – which means that instead of storing the data on your hard disk, it stores it in the RAM.
It’s primarily used as a database, cache, and message broker, and supports various data structures, including:
Strings
Hashes
Lists, sets
Sorted sets with range queries
Bitmaps
Hyperloglogs
Geospatial indexes
Streams
All of which makes it very flexible and versatile for a wide range of applications.
Advantages of In-Memory Databases
If you know a little bit about web applications, you might have already heard of traditional database systems such as MySQL and MariaDB – but what makes in-memory databases special?
Speed: In-memory databases use RAM instead of hard disk drives (HDD) or solid-state drives (SSD) to store data, drastically reducing the latency of reading and writing data. Using an in-memory database can deliver extremely fast read and write operations, making them suitable for scenarios where low-latency is critical.
Real-Time Analytics: These databases are ideal for applications that process a lot of data, such as advanced planning, simulation, and analytics.
Scalability: In-memory databases are simpler to scale up and down compared to other databases, because of how they store data.
Redis Licensing: From Restriction to Open Source Again
In early 2024, Redis changed its license from the permissive BSD license to a dual model: RSALv2 (Redis Source Available License) and SSPLv1. The move was designed to prevent cloud providers from monetizing Redis as a managed service without contributing back.
While the change didn’t affect most users running Redis in their own environments, it had a major impact on providers like AWS, Google Cloud, and DigitalOcean, sparking concerns across the open source community and leading to the launch of Valkey, a fully open fork backed by several tech giants.
In May 2025, Redis responded to this shift by releasing Redis 8 under the OSI-approved AGPLv3 license, re-establishing its open source status. The release also unified Redis Stack features (like JSON, Time Series, and probabilistic data types) into core Redis and delivered major performance improvements.
The licensing reversal signals Redis’ renewed commitment to the open source community, but the landscape has already shifted. Forks like Valkey have gained traction, and many developers are still evaluating which long-term direction best suits their infrastructure and licensing preferences.
Top Alternatives to Redis
If you’re looking for other in-memory database solutions to replace Redis, then we recommend considering the following Redis alternatives.
Valkey, a fork of Redis, is a new project that aims to resume development of the formerly open-source Redis project. It aims to be a high-performance data structure server primarily serving key/value workloads, hence the name val-key.
The fork was triggered by Redis Labs’ licensing changes, which made Redis incompatible with the standard definition of “open source.” The large cloud vendors had profited from the open source Redis version and, as a result, Valkey is backed by major tech players including AWS, Google, Oracle, and Snap Inc.
Just like Redis, it supports a wide range of native structures, and has an extensible plugin system for adding new data structures and access patterns. However, At the time of writing, Valkey is still not a polished product, and things are evolving. While it serves as a drop-in replacement for Redis, users should be aware of its ongoing development and potential rough edges.
Dragonfly is a powerful in-memory data store that offers extreme performance, reliability, and scalability. It is fully compatible with Redis APIs, making it a seamless drop-in replacement for Redis – you can use the same SDKs and tooling without any code changes.
It’s optimized for modern cloud computing, ensuring sub-millisecond reads and real-time experiences for your customers, and claims to deliver 25x more throughput compared to legacy software. Unlike traditional in-memory data stores, Dragonfly makes efficient use of memory during snapshotting which reduces the risk of out-of-memory outages.
A single Dragonfly instance can handle workloads of up to 1TB, which means you no longer need to maintain complex distributed clusters. Additionally, it natively supports an eventually consistent primary-replica model, i.e. if the primary node fails, Dragonfly automatically fails over to the replica.
Memcached is a free and open-source, high-performance, distributed memory object caching system designed to speed up dynamic web applications by alleviating database load. It’s useful for caching small arbitrary data (such as strings or objects) from database results, API calls, or page rendering.
It follows a Client-Server Architecture where clients are given a list of available Memcached servers, and are then able to choose a server based on the “key.” Servers store values with their keys in an internal hash table, and evict old data (if out of memory) or reuse memory. The server doesn’t care about the data’s structure, it only stores a key, an expiration time, optional flags, and raw (pre-serialized) data.
It’s optimized for speed and lock-friendliness, and therefore queries execute in well under 1ms on slow machines – and serve millions of keys per second on high-end servers. It also uses a least recently used cache by default, i.e., items expire after a specified time, ensuring low latency and efficient memory usage. Its simplicity and efficiency make it a popular choice for caching data.
Hazelcast Platform is a unified real-time data platform that allows companies to take instant action on real-time data. It combines high-performance stream processing capabilities with a built-in fast data store, enabling businesses to automate, streamline, and enhance critical processes and applications.
Hazelcast offers high-speed caching, resulting in improved throughput and lower latency – this allows you to process data quickly and efficiently. It also provides a high-performance, distributed, and parallelized environment that reduces the need for low-level infrastructure management.
KeyDB is a fully open-source database that serves as a faster drop-in alternative to Redis. It’s backed by Snap Inc., and is designed for scalability and high performance which allows it to handle heavy workloads – benchmarking at over 1 million ops/sec.
KeyDB supports various data structures, including:
Strings
Hashes
Lists
Sets
Sorted sets
Bitmaps
Hyperloglogs
Geospatial indexes
Streams.
To store the data on disk, you can either periodically dump the dataset to disk, or append each command to a disk-based log.
KeyDB scales both vertically (single node) and horizontally (active-replication or sharded cluster-mode) to meet larger workloads. You can set-up active-replica nodes to simplify high availability setups without requiring sentinel nodes for failover. Additionally, its multithreaded architecture outperforms Redis on a per-node basis.
MongoDB offers an in-memory storage engine that allows for more predictable latency of database operations by avoiding disk I/O. Unlike other storage engines, the in-memory storage engine doesn’t maintain any on-disk data, including configuration data, indexes, or user credentials, which makes it comparable to other in-memory databases.
To use the in-memory storage engine, you can either specify –storageEngine inMemory as a command-line option, or include the storage.engine: inMemory in the YAML configuration file. Additionally, you need to specify the data directory (–dbpath or storage.dbPath) even though the in-memory storage engine doesn’t write data to the filesystem.
By default, the in-memory storage engine uses 50% of physical RAM minus 1 GB, and if a write operation would exceed the specified memory size, MongoDB throws an error. Since the in-memory storage engine for MongoDB doesn’t persist data after process shutdown, it should only be used for scenarios where data persistence is not required.
RethinkDB is an open-source, JSON database specially built from the ground up for the realtime web with scalability and performance in mind. It has a unique approach where, instead of polling for changes, the developer can configure RethinkDB to continuously push changes and update query results to applications in real-time. This push architecture dramatically reduces the time and effort necessary to build scalable realtime apps.
In RethinkDB, every database process uses memory to store intermediate results and maintain internal state. The memory used varies significantly depending on the type of queries run, and the size of documents stored in the database. However, RethinkDB’s page cache keeps recently used data in memory to minimize disk access.
Amazon MemoryDB for Redis is a powerful in-memory database service that provides ultra-fast performance and durability for low-latency applications. It maintains compatibility with Redis, allowing you to use the same flexible data structures, APIs, and commands without worrying about the underlying infrastructure.
MemoryDB stores your entire dataset in memory, resulting in microsecond read latency and single-digit millisecond write latency. It is built with enhanced IO Multiplexing to improve throughput and latency at scale that allows it to handle over 13 trillion requests per day, and support peaks of 160 million requests per second.
It also supports horizontally scaling databases by building clusters, or vertically scaling by adjusting the machine type. You can store your data across multiple availability zones for fast failover, and take advantage of its distributed transaction log for data durability, consistency, and recoverability.
SAP HANA (High-performance Analytic Appliance) is a multi-model database that stores data in its memory instead of on a disk. Similar to other databases discussed in this post, HANA offers split-second response times – which is useful for applications requiring fast compute speed and the ability to handle large spikes in traffic.
It supports column-oriented in-memory design which allows running advanced analytics alongside high-speed transactions in a single system. Moreover, it supports both structured and unstructured data, and offers advanced search, analytics, and data integration capabilities.
It is ACID complaint, i.e., one transaction either fails completely or succeeds – there is no-inbetween. You can use it to either host multiple tenant databases in one system to pool resources, or distribute your database across multiple machines in a cluster to scale it up without compromising on security.
Wrapping Up
In this post, we have discussed some of the popular in-memory Redis alternative databases available for building web applications. Each database has its own strengths and weaknesses, so the choice depends on specific use cases and requirements.
Running your own Redis alternative? Don’t let server management slow you down.
If you’re testing or deploying Valkey, Dragonfly, or any other in-memory database, you’re likely juggling SSH sessions, tweaking config files, and firefighting performance issues.
That’s where RunCloud steps in.
With RunCloud, you can:
Spin up and manage servers on any major provider without touching the command line
Deploy your apps using Git or your workflow of choice
Monitor system resources and process logs with built-in tools
Automate routine tasks like SSL setup, security updates, and backups
Whether you’re building side projects or production-grade infrastructure, RunCloud simplifies the entire ops layer – so you can stay focused on your code.
Building a modern web application from scratch can feel like trying to build a car by hand. But what if you had a high-end assembly line and a team of expert engineers ready to help you?
You can do this by using Laravel.
Laravel has become the gold standard for web development because it turns complex, repetitive coding into a clean and elegant experience. Whether you’re a curious beginner writing your first line of PHP or a developer looking to scale a massive enterprise project, Laravel provides the tools you need to build faster and more securely.
In this guide, we’ll break down exactly what Laravel is, explore the “magic” behind its core features, and show you why it’s the top choice for developers in 2026.
TL;DR
Feature
Description
What is Laravel?
Laravel is a free, open-source PHP web framework based on the MVC architecture.
What is Laravel best for?
Laravel is best for building full-stack web applications, from simple sites to complex enterprise systems.
What are the key features of Laravel?
The key features of Laravel include Eloquent ORM, Blade Templating, Artisan CLI, Built-in Authentication, and MVC Architecture.
What are the main advantages of Laravel?
The advantages of Laravel include speeding up development with elegant syntax and a rich set of pre-built components
Let’s imagine you’re building a house. You wouldn’t mix your plumbing, electrical wiring, and interior design into one big pile. You’d keep them separate, so the plumber can work without tripping over the electrician. In the world of web development, the Model-View-Controller (or MVC) architecture does the same thing for your code.
The primary goal of this architecture is to separate the application’s logic from its presentation. Let’s break down what each part does:
The Model (The Brains for Your Data) The Model is your direct link to the database. We can think of it as the part of your app that’s responsible for handling all the data. If you have a table of users, you’ll have a “User” model that can fetch, update, and create new users in that table. It manages the rules and relationships of your data. For example, the model ensures an email address is always saved in the correct format.
The View (The Face of your application) The View is what your users actually see. In Laravel, views are simple files that contain your site’s presentation code. Their only job is to display the data they are given. They don’t know where the data came from; they just know how to make it look good. This separation means your designer can work on the look and feel without ever touching the core application logic.
The Controller (The Traffic Director) The Controller acts as the intermediary between the Model and the View. When a user visits a URL on your site, Laravel’s routing system sends the request to a specific controller. The controller then processes the request. It might ask the Model to fetch some data from the database, handle user sessions, or perform some calculations. Once it has the data it needs, the controller passes it to the View, which then displays the final page to the user.
By keeping these three parts separate, Laravel makes your application easier to build, debug, and maintain.
Laravel comes with a suite of powerful tools that make it easier to build professional web applications faster and more enjoyably:
Artisan CLI
The Artisan CLI (Command-Line Interface) is one of Laravel’s most beloved features. Instead of manually creating files and folders for new components, you can just tell Artisan to do it for you. You can run simple commands in your terminal to handle complex tasks. For example:
php artisan make:controller ProductController: Instantly creates a new controller file named ProductController with all the boilerplate code ready to go.
php artisan make:model Product: Creates a new Eloquent model for your products table.
php artisan migrate: Runs your database migrations, which are like version control for your database, allowing you to easily build and modify your table structure.
RunCloud further streamlines development by allowing you to execute php artisan commands directly from its dashboard. This feature eliminates the need to manually log in to your server via SSH every time you need to clear the cache, run migrations, or perform other common maintenance tasks.
Writing HTML and PHP together can get messy. The Blade template engine cleans it all up. Blade is Laravel’s way of letting you write clean, readable templates that are then compiled into plain PHP. Blade also provides simple directives for loops, conditional statements, and more, making it incredibly easy to build dynamic views.
Built-in ORM
Interacting with a database requires writing complex SQL queries. Laravel simplifies this with the Eloquent ORM (Object-Relational Mapper). Eloquent allows you to work with your database tables as if they were simple PHP objects.
For example, instead of writing an SQL query to get all users from your database, you can just write:
$users = User::all();
Eloquent handles the underlying SQL for you, which makes your code more readable and less prone to errors.
Built-in Authentication & Security
Building a secure login and registration system from scratch is difficult and risky. Laravel provides built-in authentication systems right out of the box. With just a few Artisan commands, you can scaffold a complete user login, registration, and password reset system.
Using a built-in mechanism ensures you’re protected against common vulnerabilities such as SQL injection and cross-site scripting (XSS). For password security, Laravel uses the strong Bcrypt hashing algorithm by default, ensuring that user passwords are never stored in plain text and are safely encrypted.
When you choose a web framework, you are making a decision that will impact your entire development process. Here are some of the reasons why developers and businesses choose Laravel:
You Will Build and Launch Faster
Laravel is designed for developer productivity. Its expressive syntax allows you to write clean, readable code that is easy to maintain. As a premier MVC framework, its organized structure removes the guesswork from building applications, allowing you to focus on creating features instead of reinventing the wheel.
Additionally, Laravel’s modular packaging system and its integration with Composer give you access to thousands of pre-built packages. Need to integrate a payment gateway or connect to a third-party API? You can pull in a package and get started immediately, dramatically shortening your development cycle.
Laravel provides out-of-the-box protection against the most common web vulnerabilities, including SQL injection, cross-site request forgery (CSRF), and cross-site scripting (XSS). Its Eloquent ORM uses PDO (PHP Data Objects) parameter binding to prevent SQL injection attacks, and the framework automatically includes a CSRF token on every request to protect your application from malicious users.
You Can Scale Your Application as You Grow
Your application’s needs will change over time, and Laravel is built to scale with you. Its architecture supports the development of everything from simple hobby projects to large-scale enterprise applications handling millions of requests.
The framework also includes built-in support for distributed caching systems such as Redis and a powerful queue system that offloads time-consuming tasks, ensuring your application remains fast and responsive even under heavy load.
In addition to the core framework, Laravel provides a world-class ecosystem of tools, resources, and community support that allows developers to build, deploy, and manage applications with ease. This rich ecosystem is one of the primary reasons developers commit to the framework for the long term.
Seamless Deployment and Management
Laravel takes the pain out of deploying your application. With official tools such as Laravel Forge, you can provision and manage high-performance servers on providers including AWS, DigitalOcean, and Vultr without ever leaving a web dashboard.
While Laravel Forge provides an excellent official deployment solution, many developers choose alternative platforms for server management.
One popular choice is RunCloud, a server panel that simplifies the setup, deployment, and management of PHP applications, including those built with Laravel, on various cloud providers.
RunCloud offers features that are highly beneficial for Laravel developers:
Atomic Deployment: Ensures zero downtime during code deployments.
Security Hardening: Automatically secures your server with firewalls and other best practices.
Resource Management: Tools to monitor and manage server resources.
The biggest strength of a modern framework is in its package management, and Laravel uses Composer to manage its dependencies. Composer is a popular PHP package manager that provides access to a vast library of open-source packages on Packagist.
The Laravel team also provides a suite of official packages that offer powerful functionality with minimal setup. For example:
Socialite: Provides a fluent, expressive interface for authenticating with OAuth providers like Google, Facebook, and Twitter.
Prompts: A library to build user-friendly CLI applications.
A Thriving and Supportive Community
When you build with Laravel, you’re never alone. It has one of the most active and welcoming developer communities in the world. You can find answers to your questions through Laracasts (an extensive video tutorial platform), official documentation, and vibrant online forums.
The RunCloud Community is a vibrant platform where you can connect with other developers and Laravel experts. Whether you have a complex deployment question, need advice on optimizing your Laravel application’s performance, or just want to share your latest project, you can start a new thread or chime in on existing conversations to get support directly from people who use Laravel and RunCloud every day.
Final Thoughts
Throughout this guide, we’ve explored why Laravel has earned its reputation as the most popular PHP framework in the world.
Whether you’re a novice developer writing your first “Hello World” or an enterprise architect building a global platform, Laravel provides the scalability, security, and speed you need to succeed.
Once you’ve built your Laravel application, the next big challenge is getting it online. For many developers, managing a server (handling security updates, configuring PHP versions, and setting up SSL certificates) is a time-consuming task that takes focus away from what really matters: your code.
This is where RunCloudcomes in.
The best way to deploy your Laravel applications is through a managed panel that understands the framework’s specific needs. RunCloud allows you to connect your own server (from providers like AWS, DigitalOcean, or Vultr) and automates the entire setup process.
With RunCloud, you benefit from:
Automatic SSL (Let’s Encrypt) setup.
Atomic deployments (zero downtime when you push new code).
Server-level security and optimization right out of the box.
Laravel is one of the most popular and easy-to-learn frameworks for web development. It has a clear and elegant syntax, a well-designed structure, and a comprehensive documentation. It also has a friendly and supportive community that can help you with any questions or issues. If you have some basic knowledge of PHP, HTML, CSS, and JavaScript, you can start learning Laravel in no time.
What is the best way to learn Laravel?
The best way to learn Laravel is by doing. You can follow the official Laravel documentation, which guides you through the basics of the framework and shows you how to create a simple blog application. You can also watch online tutorials, read books and blogs, and join online courses that teach you Laravel. But the most important thing is to practice and build your own projects with Laravel. This will help you improve your skills and confidence, and also give you a portfolio to showcase your work.
Can I learn Laravel without PHP?
Laravel is a PHP framework, which means it is built on top of PHP and uses PHP as its main programming language. Therefore, you need to learn PHP before you can learn Laravel. PHP is a widely used and powerful language for web development, and it is not very difficult to learn. Once you have a basic grasp of PHP, you can move on to Laravel and enjoy its benefits.
Is Laravel front-end or back-end?
Laravel is primarily a back-end (server-side) framework. It handles the “behind the scenes” work, such as communicating with the database, processing user data, and managing security. However, Laravel is a full-stack capable framework. This means it can also manage your front-end by serving HTML templates with its Blade engine or by seamlessly integrating with modern JavaScript frameworks, such as Vue or React, via tools like Inertia.js.
Is Laravel good for beginners?
Yes, absolutely! While it offers many features, Laravel is famous for its best-in-class documentation. If you have a basic understanding of PHP, you can follow the official “Getting Started” guide and have an app running in minutes. Beginners often struggle with the “magic” (things happening automatically), but resources such as Laracasts (the “Netflix for developers”) make learning every concept incredibly visual and simple.
How does Laravel compare to Symfony or CodeIgniter?
Think of it like this: Symfony is like a high-end toolkit for building complex, enterprise-level engines. In fact, Laravel actually uses several Symfony components under its hood. CodeIgniter is a lightweight, “no-nonsense” framework that is very fast and simple, but it doesn’t offer as many built-in features as Laravel. Laravel is the “middle ground” that provides the power of Symfony with the ease of use of CodeIgniter. It comes with “batteries included,” meaning most things you need (like login systems) are already built in.
What is the purpose of Composer in Laravel?
Composer is the tool that “gets” parts (packages) for your Laravel project. Without Composer, you wouldn’t be able to install Laravel or add new features (like payment processing or image resizing) created by other developers.
I’m seeing a “Permission Denied” or “500 Error”. What did I do wrong?
This is the #1 trouble for beginners! Most of the time, this happens because Laravel needs write permissions to certain folders. Another common issue is forgetting to create your .env file (your environment configuration). Always ensure you’ve run php artisan key:generate to set your application’s security key, which “unlocks” the framework for use.
Do I need to be a PHP expert to use Laravel?
You don’t need to be an expert, but you should understand the basics of Object-Oriented Programming (OOP). Laravel uses classes and objects heavily. If you know what a “variable,” an “array,” and a “function” are, you are ready to start. Laravel’s expressive syntax is actually designed to read like English, which often helps beginners learn better PHP coding habits as they go.
Out of the top one million websites globally, 293,000 are powered by WordPress. And with 500+ new WordPress sites built every single day, it’s fair to say it’s a popular choice as a CMS. In fact, as of July 2023, WordPress holds a 64.2% market share of CMS sites.
One of the factors that makes WordPress such a popular choice is the ability to almost endlessly customize and personalize it, through themes, plugins, and editors.
But this can come at a price, since plugins, themes, and images all consume resources, and this can seriously impact your site’s speed and responsiveness.
And this is bad news for two reasons.
Of course, your user experience is going to rapidly decrease, which will certainly harm your business. But Google’s assessment of your site will also be impacted, with your Core Vitals and Lighthouse score spiraling into the oblivion that is lurking way down in the bowels of the search results pages no one ever finds.
So, what’s the secret to keeping WordPress fast and responsive?
In this article, we’ll reveal the techniques, strategies, and methods you can use to make sure your WordPress site puts performance back at the top of the agenda. We’ll identify the specific factors that affect speed, and exactly how you can optimize your WordPress site to keep both your visitors and the search engines happy.
Ready to supercharge your website? Then, let’s get started!
The Importance of WordPress Speed Optimization
Regardless of whether you have a basic blog or an e-commerce store, it’s essential to pay attention to user experience and loading speed.
How long do you think it takes for a visitor to form an opinion about your website? A minute? 20 seconds? 5 seconds?
In fact it takes the average visitor to make up their mind about a website in just 0.05 seconds. And if your site takes 3 seconds to load, then 40% of visitors will leave. The fact that bounce rates are between 41%-55% is perhaps an indication of either how slow many websites are, or how impatient we as internet users have become.
With 51.3% of traffic now coming from mobile devices, visitors are increasingly looking for information on the fly, and demanding results almost instantly.
Here’s the problem:you may not even consider your website to be especially slow. But those statistics should be enough to make any website owner take notice – and take action. What may have once been considered fast, is no longer acceptable.
Measuring Your WordPress Loading Speed
To truly gaugе thе spееd pеrformancе of your WordPrеss sitе, using a reliable page testing tool is imperative. Thеsе tools not only providе insights into thе actual loading timеs of your sitе, but also offеr invaluable recommendations to help increase your site’s sрееd.
Sеlеcting a Tеsting Tool
Thеrе’s a wide range of frее tеsting tools availablе. Some of the industry favorites include:
WеbPagеTеst: Offers a detailed performance analysis with a visual representation of your site’s loading process.
GTmеtrix: Gives a combined report using Google PagеSpееd Insights and YSlow scorеs, with actionable recommendations.
Googlе PagеSpееd Insights: Dirеctly from thе tеch giant itsеlf, this tool providеs insights into both dеsktop and mobilе vеrsions of your sitе, with suggеstions for improvеmеnts.
Analyzing Your Data with Prеcision
Dеvicе Tеsting
Always ensure you test for both desktop and mobile devices. Thе usеr еxpеriеncе can vastly differ due to variations in both dеvicе responsiveness and іntеrnеt spееds.
Gеographic Rеlеvancе
Choosе tеst locations based on where your core audiеncе is based. If your sitе catеrs to a global audiеncе, use multiplе tеst locations for a better undеrstanding.
Connеction Spееd
Consider testing using various connection speeds, ranging from high-spееd broadband to slowеr connеctions. This gives you insights into thе actual еxpеriеncе of a broader segment of your audience.
Kеy Mеtrics to Focus On
The ultimate goal is to enhance the usеr еxpеriеncе, which is directly linkеd to how quickly thеy can accеss thе primary contеnt. Therefore, an essential mеtric to track is thе Largеst Contеntful Paint (LCP). This measures thе timе taken for the main contеnt of your sitе to bе fully visiblе, giving you an idea of the initial user еxpеriеncе on your site.
In еssеncе, optimizing your WordPrеss sitе’s spееd isn’t just about fast loading timеs – it’s about ensuring a seamless еxpеriеncе for all users, irrespective of their dеvicе, location, or intеrnеt connection.
You should aim for a loading time of not more than 2.5 seconds, particularly if you’re managing an ecommerce business.
To achieve a faster loading time, pay close attention to the Largest Contentful Paint metric. This is a load speed metric indicating how quickly visible page content can be displayed, even when the website is still loading. Google uses LCP time as one of its major SEO ranking factors, and from this Google directly encourages developers to achieve an average load time of 2.5 seconds or less.
16 Ways To Optimize WordPress Page Load Speed
Sometimes, the changes you make when building a WordPress site directly cause page loading speeds to decrease. Here’s a 16-point checklist that can help you squeeze out every last bit of performance.
#1 – Use A Page Speed Diagnostic Tool
To еnsurе an optimizеd, sеamlеss, and high-performing WordPress wеbsitе, it’s essential to make data-driven decisions. This requires understanding your website’s basеlinе pеrformancе, and thеn carefully and accurately assessing the impact of each change you make. Using a reliable pagе spееd diagnostic tool makes sure that you are able to make the right decisions and take the right action at each step in the process.
Before implеmеnting any optimization stratеgiеs, you must assess your website’s current speed. This initial assessment forms the bedrock, allowing you to gauge thе effectiveness of the changes you make.
While tools such as WеbPagеTеst, GTmеtrix, and Google PagеSpееd Insights are highly recommended, it’s essential to select one that aligns with your spеcific nееds. Consistеncy is crucial: stick with your chosen tool for subsequent assessments to ensure the comparisons are meaningful.
Plugins, thеmе ovеrhauls, and major contеnt rеvamps can dramatically influеncе load timеs. Evеry timе you introducе such changеs, revisit thе diagnostic tool to assess the impact on performance.
The beauty of most modеrn diagnostic tools lies in thеir simplicity. Typically, entering your website’s URL provides you with a whole heap of data points, with clear recommendations that allow you to addrеss any idеntifiеd performance issues.
The addition of new themes or fresh content can also impact your website’s performance. A diagnostic tool provides clear feedback on this by calculating thе anticipated page load time after you’ve finished making the changes.
If your diagnostic tool flags slow loading timеs or othеr pеrformancе mеtrics arе off-kiltеr, taking immediate action is essential. Divе dееply into both thе intеrnal and visiblе parts of your website. Identify the key bottlenecks, and carry out the necessary optimizations to ensure your audience enjoys a seamless browsing еxpеriеncе.
#2 – Choosing Reliable WordPress Hosting
An effective way to improve your page speed is to choose a reliable and high-performing WordPress hosting company. You’ll need either to sign up or secure a subscription plan to help you manage your WordPress site. There are three popular types of WordPress hosting available – shared hosting, DIY-VPS, and managed hosting. Your final choice will depend on your budget, the comprehensiveness of the hosting service, and the customer care experience.
Shared hosting is often the initial choice for start-up WordPress developers, or those with limited resources. While you can save a lot from low-priced subscription packages, you will eventually experience inevitable problems in the future, since you’re sharing the server space with other paying subscribers. As a result, you may encounter 500 errors, suspensions or – even worse – page downtime, all because the hosting company has to set certain limitations on their resources. Aside from slowness and overcrowding issues, you may also encounter hidden charges related to migration, SSL certificates, and domain registration.
In a DIY-VPS hosting, referred to as Do-it-yourself on Virtual Private Server, you can optimize and manage data without too much restriction. You can directly rent servers from cloud providers such as UpCloud, Vultr, and Hetzner to host your website. With the help of tools such as RunCloud, you don’t even need to have server management skills, because RunCloud makes managing your server very easy.
With managed hosting, you can rent your own server, and manage your data without sharing the server with other site owners. The hosting company will handle all of the backend server-related work, since they only deploy service professionals assigned to handle all your CMS needs. Popular examples of managed hosting businesses include Kinsta, WP Engine, Pressidium, Flywheel, Pressable, and Media Temple.
#3 – Deleting Unnecessary Plugins, Themes and Media Files
Ensuring your WordPress sitе operates efficiently oftеn involves decluttering unnecessary components. Rеdundant plugins, thеmеs, and mеdia filеs, even when inactive, can reduce your site’s speed and reliability by consuming precious sеrvеr space. To remove these unnecessary files, follow the following steps:
❌ Plugins:
Navigatе to ‘Plugins’, dеactivatе thе unwantеd onеs, thеn dеlеtе these from the inactive list.
❌ Thеmеs:
Undеr ‘Appеarancе’, identify and dеlеtе unwanted thеmеs, keeping both your active theme, and a default theme (just in case your main theme ever develops a problem).
❌ Mеdia Filеs:
Visit ‘Mеdia Library‘, usе the ‘Unattachеd’ filtеr, and rеmovе unusеd filеs.
Optionally, you can choose to usе the Media Cleaner plugin for automating this kind of clean-up.
It’s important to be proactive when it comes to keeping your WordPres site lean and efficient. Make sure you periodically assess every plugin and thеmе, and check your media files. This practice of carrying out a rеgular audit and cleanup guarantees better site performance – and a morе sеcurе website too.
#4 – Using A Content Delivery Network
Using a Contеnt Dеlivеry Nеtwork (CDN) can greatly improve your WordPrеss site’s loading time by caching its contеnt across a global nеtwork of sеrvеrs. This means that when a visitor accеssеs assеts from your sitе, the request is met by a geographically nearby еdgе sеrvеr, rathеr than taxing your main sеrvеr. This enables a quicker information exchange – and improved loading speed.
Among thе wide range of CDN providеrs, Cloudflarеhas carved out a reputation for reliability and efficiency, becoming a prеfеrrеd choicе for a large number of web developers. It offers a range of plans and services, each offering various features and capabilities.
Onе standout sеrvicе from Cloudflarе is thе Automatic Platform Optimization (APO) sеrvicе, which substantially improves WordPrеss sitе pеrformancе by caching both static and dynamic contеnt at Cloudflare’s еdgе sеrvеrs. This reduces the burden on origin servers, making sure that both images and dynamically generated pages are sеrvеd rapidly, improving the usеr еxpеriеncе.
Cloudflarе’s Pro Plan delivers additional pеrks, such as enhanced security via Web Application Firewall (WAF), optimized delivery through features such as Polish and Mirage, and round-thе-clock customеr support – making it a comprehensive solution for businesses with a larger wеb prеsеncе.
It’s essential to considеr thе diffеrеncеs when optimizing various typеs of wеbsitеs, from simplistic brochure sitеs to complex ecommerce platforms. For simple, largely static sitеs, Cloudflarе provides full-pagе caching, allowing thе entire sitе to be cached and delivered directly from its еdgе sеrvеrs worldwidе. This makes sure that visitors receive a fast delivery of content, improving the user experience.
In contrast, еcommеrcе websites represent a more complex challenge due to their transactional nature, and thе necessity for real-time data processing, such as order processing and user account management. Cloudflarе addresses this increased complеxity by providing a range of configurations, enabling developers to cachе contеnt that is static, whilе also еnsuring that dynamic contеnt (such as shopping carts and usеr profilеs) is served in real-time – all without impacting on either the usеr еxpеriеncе or data accuracy.
#5 – Clear Out Your Database
Your WordPrеss sitе’s databasе is used to store your contеnt, sеttings, and plugins. As you carry out content revisions, plugin installations, and updatеs, your WordPress site gradually accumulates resources on the server. Whenever a visitor carries out a search query, accesses a resource, or downloads a file, the server has to keep diving into the database to access the necessary information. If the database is cluttered, this will require additional processing time, slowing down the user’s experience.
In some cases it’s even possible that, where multiple revisions of old posts are carried out, new resources on the server are built on existing resources, and eventually this progressive build up of changes, updates, and modifications clutters the database, and slows the whole site down.
To restore your sitе’s loading speed to pre-clutter speeds, carrying out regular databasе clеansing is essential. Ensure you completely remove unused files, spam commеnts, and old rеvisions. You can manually clеar out such unwanted data entries via PhpMyAdmin, although this will require a certain level of technical knowledge in order to avoid impacting the site, or even taking it down.
If you’d rather not risk using PhpMyAdmin then you could consider using plugins that are designed to streamline this process. Plugins such as Advancеd Data Clеanеr, WP-Optimizе, and WP Sweep are popular choices for removing old, redundant data from servers, helping to improve the efficiency of the database, and thereby boost the site’s speed and responsiveness.
#6 – Enable Caching
If you’re using a Content Delivery Network (CDN), it will automatically cache the static assets on your site such as images and CSS files. However, you can take this one step further by enabling both object caching and full-page-caching in WordPress.
Page caching is the process of storing the HTML code of a page in a cache, and is essential to maintain the speed performance of your WordPress site – especially if you’re serving a lot of traffic.
Whenever a visitor submits a search query or requests a file download, the server needs to assemble the entire page from scratch using PHP, and this involves retrieving the information in your database before the finished HTML page can be delivered to the visitor’s browser. Regardless of whether your WordPress site needs to build one page or simultaneous pages, page caching will definitely help improve your page speed.
Once you enable Redis caching, you can either check the HTTP headers of your site, or use tools such as Browser Caching Checker to evaluate the cache settings of your site.
You can also check the cache headers via the DevTools menu – just go to the Network tab and right-click, then in the menu that appears, find “ResponseHeaders”, and make sure “CacheControl” is enabled. This will add a new column to your screen that will display the cache headers for all requests.
#7 – Consider Using Lazy-Loading On Long Pages
If your homepage is long and contains a lot of images, you should definitely consider lazy-loading images. This optimization method allows you to load some visible content, but temporarily delays the loading of content appearing in the bottom portion of the page. This is very helpful for when visitors have a slow bandwidth.
Many WordPress themes automatically add lazy loading to images – check the documentation of your theme to find out how to enable it. If your theme doesn’t add lazy loading functionality, you can use plugins such as Lazy Load Image Filter to add this functionality to your site.
#8 – Optimizing JavaScript And CSS
When you use a page testing tool, you’ll likely encounter recommendations that suggest you should remove JavaScript. When you use popular tools such as Pingdom or WebPageTest, you will notice the number of JavaScript files before you reach the “Start Render” line. This enables your WordPress site to perform necessary tasks such as launching a pop-up, or rotating images in a slideshow.
But these actions won’t load until the entire content is completely loaded. In order for the loading time to not slow down, you need to temporarily delay the JS files with the help of plugins such as WP Critical CSS.
Minificationis another popular optimization technique used to speed up your WordPress platform. This involves reducing the file size of HTML, CSs and JS code, since they can consume valuable database resources over time.
For example, you can minify CSS codes by eliminating line breaks, white spaces, excess characters, and unnecessary comments. CSS Compressor is a popular choice for simplifying CSS code, and is readily accessible from hosting providers. Use tools such as CSS Delivery Test to quickly find out if your WordPress theme compresses CSS.
You can also use Tree shaking algorithms to reduce the size of your JavaScript files. However, this is only useful if you have the source code of the JavaScript file.
You can also combine CSS files to reduce the number of separate HTTP requests, and make information transfer more efficient. Consider using performance plugins such as Autoptimize or WP Rocket to perform the necessary optimization process.
The end goal of minification is to reduce the amount of data that needs to be transferred, and help speed up file movement within the website.
#9 – Choosing Lightweight WordPress Theme
The choice of your WordPress theme really matters when it comes to customer engagement and traffic generation. However, you can’t ignore that themes also accumulate database resources over time.
Although it might be tempting to have an endless selection of Google fonts, icons, sliders and parallax scripts, most websites won’t use all these features.
It might be a better idea to use a lightweight theme and build-off from that. Some examples of lightweight options include GeneratePress, OceanWP and Astra – all of which will allow you to preview your work before publication.
As a precaution, take note regarding the page builder plugins which come as part of theme brands, such as OceanWP and Astra, especially if you will access their theme library. A theme library often consumes additional resources as developers need to generate corresponding CSS and JS files for page builders to work on your site. For every theme you explore, make sure to run a page test to find out if any changes will have a significant effect on loading speed.
#10 – Controlling Your Blog Feeds
If you have a homepage that you use for blog feeds, consider reducing thumbnails and other media icons to speed up the loading time, even though the homepage is one of the most valuable pages of your website. The page loading becomes more efficient when the site processes fewer requests.
#11 – Compress Images
Image compression is one of the easiest WordPress optimization methods you can use. Research has found that over 34% of the total page weight is generated by images. Large images especially tend to slow down your site, which may result in poor user experience and high bounce rate.
To combat this, you can compress images to reduce the file size, while keeping the balance between quality and compression rate in check. You can use popular image editing tools such as Adobe Photoshop or Affinity Photo, or you can use WordPress plugins such as Optimole, Imagify and WP Smush that automatically do this for you.
However, if you compress your images too much, they won’t look as good on big screens. When formatting the images, experiment a little to find the right balance between quality and the lowest compression rate. A generally acceptable file size may range somewhere between 100 and 200KB. You can use tools such as Image Delivery Test to assess the images on your site.
We also recommend you explore newer encoding formats such as WebP and Avif to encode your media files. These newer formats provide better compression, while maintaining the same quality. However, some older browsers don’t support these, so your visitors might have a hard time browsing your site.
You can also compress your HTML, JavaScript, and CSS files during transmission to save bandwidth and reduce the load times. GZIP compression can greatly reduce the size of your website’s files and speed up your website’s load times. This is enabled by default on most web servers – you can check the HTTP headers of your site, or use tools such as GZIP Compression Test to know if your site does employ this.
#12 – Paginate The Comments
When a WordPress site displays hundreds of comments, it shows that the page is highly interactive and engaging. Unfortunately, when excessive comments are displayed on a page, it hurts the page loading speed.
Breaking the comment section into multiple pages is recommended, especially if the older comments don’t provide any value to the visitor. This will reduce the memory consumption and improve the loading time. To do this, go to your WordPress Admin dashboard, click on Settings, look for Discussions,and then select Break comments into pages, before setting up the maximum number of comments per page.
#13 – Disabling Trackbacks and Pingbacks
While receiving trackbacks and pingbacks is an indication that a blog or external website has linked to you, this may take up memory resources and fill your page with additional spam and irrelevant queries later on.
To turn this off, go to Settings, look for Discussion,and then disable link notifications from other blogs to stop receiving pingbacks. You can use plugins such as No Self Pings, which is a free plugin that disables self-generated pingbacks.
You should also reduce the number of redirects on your website. Redirects can slow down your website by adding additional HTTP requests. Minimize the number of redirects on your website, and use 301 redirects instead of 302 redirects wherever possible.
#14 – Clearing Out Old Posts
WordPress enables you to draft and revise your content when you need to release an updated version. Rolling back to your previous posts becomes easier, since all published posts are usually stored on the platform. However, for every revision you make on each post, you will need a corresponding space on the server – something you need to pay attention to once the loading speed of your site has slowed down.
You can limit the number of revisions you can make per post. Consider releasing a new post once you have reached a set number of revisions, and then delete the old post. Access the wp-config.php file and add the following code to set the number of revisions to 10:
define ('WP_POST_REVISIONS', 10);
#15 – Use A Transactional Email Service
If you need to send emails, using your own server may seem like a cost-effective option, but it can have serious consequences on email deliverability. WordPress servers are not designed for mass email sending, and their IP addresses can easily get blacklisted by email providers if they aren’t configured correctly. This can lead to emails being marked as spam – or not delivered at all.
Moreover, sending emails from your own server can also impact the performance of your website or application. Sending large volumes of emails can consume significant server resources, which can slow down your website or even crash it during peak periods.
By using a transactional email delivery service, businesses can take advantage of specialized infrastructure and expertise to handle email sending reliably and efficiently. Using an email service also ensures that your emails are delivered promptly, and provides insights on user interactions.
If you’re looking to squeeze out every last bit of performance from your server, then you need to identify and resolve performance bottlenecks. Here are three key methods for identifying performance bottlenecks:
Using Infrastructure Monitoring: You can monitor your server infrastructure and keep an eye on resource usage to identify what can be improved. We recommend using New Relic, a popular application performance monitoring (APM) tool that can help you identify performance bottlenecks on your WordPress site. You can use it to get real-time insights into your site’s performance which can help you identify slow queries, memory usage, and other performance metrics.
Using the Query Monitor plugin:Query Monitor is a popular WordPress plugin that provides a detailed overview of your site’s database queries, hooks, HTTP requests, and other important performance metrics. This plugin can help you pin-point slow queries and other bottlenecks that are affecting your site’s performance.
Check error logs: WordPress logs errors and warnings to a debug log file. By enabling WP_DEBUG mode, you can see these errors and warnings on your site’s front end or by checking the debug log file. This can help you identify any coding or configuration issues that are impacting your site’s performance.
Benchmark Performance to Quantify Improvements
Performance testing is an essential step in identifying issues and improving the speed and overall performance of your website. You should avoid making changes blindly without first understanding their impact on your site’s performance. While some changes, such as adding caching or switching to a different web server, may have a positive impact on your site’s performance, others may have no effect – or even a negative impact.
By conducting performance tests, you can benchmark the current state of your site and measure the impact of any changes you make. Here are two key steps to consider when conducting performance tests:
Establish a baseline: Before making any changes, it’s important to establish a baseline for your site’s current performance. This can be done using either simple tools such as Google PageSpeed Insights or more specialized tools such as Loader.io and Grafana k6.
Test before and after changes: Whenever you make changes to your site, run the performance tests again. It’s important to conduct performance tests before and after the changes – this will help you determine whether the changes made a positive or negative impact on your site’s performance.
Performance Difference Between OpenLiteSpeed and NGINX
OpenLiteSpeed and NGINX are both popular web servers that can be used to run WordPress websites, and in terms of WordPress performance and speed, both are highly capable servers.
OpenLiteSpeed is designed to handle a large number of concurrent connections with low resource consumption. It uses an event-driven architecture that allows it to handle thousands of simultaneous connections without consuming excessive server resources.
On the other hand, NGINX is also a highly performant web server that is used by many websites worldwide. It is known for its ability to handle high traffic loads with low resource consumption.
We compared OpenLiteSpeed and NGINX in real world settings, which you can read about in our report, “OpenLiteSpeed vs. NGINX vs. Apache – Which is the Fastest Web Server?”. In general, our results showed that both OpenLiteSpeed and NGINX are equally performant when caching is enabled.
Conclusion
Optimizing your WordPress site for speed is crucial for providing a better user experience and improving search engine rankings. This guide has provided valuable insights on how to optimize your site for speed, including using a fast web host, optimizing images, using a content delivery network, and reducing the number of redirects.
To make server management easier and more efficient, we highly recommend using RunCloud (yep, that’s us!), a server management tool that offers features such as caching, SSL certificates, and automated backups. By using RunCloud, you can optimize your site for speed while minimizing the time and effort needed to manage your server.
RunCloud is built for developers that want to focus on shipping great work, not on managing their infrastructure.
RunCloud provides you with one-click WordPress installations and painless server configuration, so you don’t need to spend hours figuring it out. Get started with RunCloud today & get up and running in minutes.
Leaking customer data is never a good look for a business – in addition to the damage to your business’s reputation, it can result in serious legal penalties. In this post, we will discuss some ways to protect your VPS from an attacker, but first let’s understand what a VPS is.
What Is a Virtual Private Server (VPS)?
A VPS is a virtual machine that provides virtualized server resources on a physical server shared with other users. Unlike shared hosting, where resources are pooled among multiple users, a VPS offers dedicated server space with reserved resources.
Here are a few reasons why people pick VPS:
Isolation: Each VPS operates independently, ensuring that activity in one VPS doesn’t affect others. If one website is attacked or infected, it won’t impact other secure VPS instances.
Dedicated Resources: A VPS allocates its own CPU, memory, and storage – if one VPS consumes a ton of resources, then it will not affect any other servers.
Customization: VPS allows custom security features tailored to your needs, such as advanced firewall configurations and intrusion detection systems.
In March 2023, a staggering 41.9 million records, including drivers’ licenses, passport numbers, and financial statements, were compromised worldwide due to cyberattacks.
If you are hosting your website on RunCloud, then you’ll likely already have a few servers up and running. It’s essential to keep these servers secure and locked down for several reasons:
Cyber Threats: Default configurations, outdated services, and weak access controls can leave your VPS vulnerable to unauthorized access, data breaches, and cyber-attacks.
DDoS Attacks: A robust security solution will protect against Distributed Denial-of-Service (DDoS) attacks that overwhelm your server with traffic, causing downtime.
Phishing and Malware: Implementing security measures prevents phishing attempts and malware infections.
Data Protection: If your server gets hacked, then your sensitive data could be stolen or held to ransom.
How Can a VPS Server Be Hacked? – Common VPS Vulnerabilities
It is well-known that when running a server which is connected to the internet, hackers will try to exploit it.
Let’s take a look at some of the ways bad actors try to compromise servers:
Website Vulnerabilities: Websites are public to the entire world, and attackers exploit vulnerabilities in web applications to gain unauthorized access or manipulate data. This vulnerabilities can be caused due to several reasons:
Running outdated software exposes security flaws.
Poorly written code may have vulnerabilities.
Incorrect server settings can lead to exploitation.
Server access via SSH: When you log in to a server via SSH, you gain complete access to that server’s file and all its resources. Due to this, hackers run an army of bots which constantly tries to SSH into servers on the internet using several techniques. (Read our guide on SSH service hardening to learn how to stop it.)
Compromised Hosting Provider: If you are renting your VPS from a hosting company, then it is important to note that a physical server is still present somewhere in a datacenter. If the hacker is able to physically access the server, then it would be very hard for you to stop the hacker.
VPS Security Tips to Protect Your Server
If you’re running a server on the internet, it is essential to stay updated with the latest cyber threats and security practices.
Let’s take a look at some ways to protect your server on the internet:
1. Use Strong Passwords and 2 Factor Authention
It is absolutely essential to create complex passwords with a mix of uppercase and lowercase letters, numbers, and special characters for all administrative accounts. Moreover, you should enable two-factor authentication (2FA) for an additional layer of security.
If you are using RunCloud, you can take advantage of our password generator utility which automatically generates unique and random passwords for each login.
2. Use Passkeys instead of Passwords
Passkeys are a form of passwordless authentication which allow you to sign in without using a typical plaintext password. This method of authentication is considered more secure as it relies on public key cryptography.
3. Switch to SSH Keys for Server Login
Wherever possible, replace the password-based SSH authentication with SSH keys and configure your SSH server to allow key-based authentication only.
On RunCloud, you can take advantage of our key vault functionality to seamlessly log in to your servers in a secure manner.
4. Set Up Website Firewalls
If your cloud provider offers a firewall service at the network level, then you should configure it to block incoming traffic on all ports which are not in use. If you don’t have access to a firewall service, you can also install and configure iptables (built-in firewall service in Linux) and create rules to filter incoming and outgoing traffic based on your requirements.
On RunCloud, you can easily manage and update your firewall rules directly from the Security tab.
5. Use SFTP Instead of FTP
FTP relies on older technology and lacks encryption, making it vulnerable to sniffing attacks. If you’re still using FTP to transfer files, then you should switch to SFTP, a newer and more secure option.
6. Implement Fail2Ban for Brute force or DDoS
Although using a strong password will prevent robots from easily guessing your password, it will not stop them from trying to make incorrect guesses. Even if a hacker is not able to log in to your server, submitting an incorrect password still consumes resources on your server. This technique can be used to launch Denial Of Service attacks. To stop this, you can configure Fail2Ban, a service that monitors system logs and blocks IP addresses after multiple failed login attempts.
If you have a team of people who access your servers, then it is recommended to give each one of them their own login credentials with limited access. Moreover, we recommend creating a separate user account on your RunCloud server whenever creating a new web application to keep it isolated.
8. Keep Your Applications & Software Updated
One of the most common ways hackers gain access to sensitive information is by exploiting known vulnerabilities in softwares. Updating your applications regularly will address these security issues and close any backdoors that could be exploited by cybercriminals. We recommend reading the following posts to learn more about updating your servers:
As we mentioned earlier, if an attacker is able to gain physical access to your server, then it becomes very easy for them to compromise your server. Although this seems far-fetched, these things do happen in real life. In 2023, Cloud Nordic lost all of their customers’ data because hackers were briefly able to access the servers during transportation.
Therefore, it is absolutely essential to pick a hosting provider with a good reputation and robust security practices.
10. Use a Secure Secure Cloud Server Manager
A safe and easy way to secure your website is by using a secure cloud service manager that takes care of your websites for you. RunCloud is a robust cloud server management tool that prioritizes security and implements best practices to ensure the safety of your server and website. Here’s how RunCloud enhances your server’s security:
SSH Key Authentication: RunCloud supports public and private key authentication, which is generally considered more secure than password-based authentication.
Permission Levels: You can assign different privileges to different users or teams within an app, enhancing control over user access.
Password and Credential Storage: RunCloud enforces a complex password standard and stores credentials in hash form.
Firewall Control: RunCloud allows you to fully control your firewall configuration.
Free SSL Installation: RunCloud offers 1-click installation of free SSL/TLS by Let’s Encrypt.
Strict Port Control: By default, only necessary ports are opened, reducing risks for attack.
IP Whitelisting: You can whitelist IPs for unrestricted access to your dashboard.
Automated Server Configuration: RunCloud automates server configuration with the best industry practices.
By using RunCloud, you’re not only opting for a tool that simplifies server management but also choosing a solution that prioritizes security. This makes RunCloud an excellent choice for managing your VPS in 2024.
Wrapping Up: Securing Your Server with RunCloud
Securing a server is no small feat, but it’s absolutely essential – whether you’re running a personal blog, an e-commerce site, or a complex web application, safeguarding your server ensures data integrity, privacy, and reliability.
RunCloud simplifies server management across various cloud providers (AWS, DigitalOcean, Google Cloud, etc.) and provides an intuitive dashboard for deploying, monitoring, and securing your servers.
With RunCloud, you can focus on your applications while benefiting from robust security features such as automatic security updates, web application firewall (WAF) rules, SSL certificate management, and much more.
Yes, each VPS is isolated from others on the same physical server, ensuring that your resources are not shared with other users. However, it’s essential to configure security settings properly to maintain this privacy.
Should I encrypt my VPS?
Encrypting your VPS is good practice because it protects your data from unauthorized access, especially if someone gains physical access to the server. Disk encryption ensures that even if someone breaches the server, they cannot access the data without the encryption key.
Is VPS safer than shared hosting?
VPS offers more security than shared hosting, because with VPS you have dedicated resources, isolation from other users, and control over server settings. Shared hosting, on the other hand, shares resources among multiple users, which can pose a security risk under certain conditions.
How much traffic can a VPS handle?
The capacity of a Virtual Private Server (VPS) can vary based on several factors. First of all, each provider has its own infrastructure, network, and resource allocation policies, so a VPS across two different providers would have very different capacity. Moreover, content-heavy websites with large images, videos, or dynamic elements require more resources.
How to secure SSH on VPS?
To secure SSH on your VPS: change the default SSH port, disable root login, limit authentication methods, set up a firewall, and use strong passwords or SSH keys.
Are VPS encrypted?
VPS itself is not inherently encrypted; however, different cloud providers may offer varying encryption options – consult your provider’s documentation for specific instructions.
Facing technical glitches like the dreaded HTTP Error 503 Service Unavailable can be frustrating, disrupting the seamless flow of online activities.
In this comprehensive guide, we delve into effective solutions to tackle this issue head-on. From understanding the root causes to implementing step-by-step fixes, empower yourself with the knowledge to swiftly resolve the HTTP Error 503 and ensure uninterrupted access to your online services.
Let’s dive in and conquer this challenge together!
What is HTTP Error 503 Service Unavailable?
HTTP Error 503, also known as ‘Service Unavailable,’ indicates that a website cannot be reached at the moment. This error is part of the HTTP status code family, specifically within the 5xx range, which denotes server-side errors.
It means that the server is temporarily unable to handle requests, and it is commonly caused by server overloads, maintenance activities, or other temporary disruptions in the server’s operation, such as misconfiguration in the firewall or an unsuccessful backup.
If you visit a website and see this error, then there isn’t much you can do apart from notifying the server administrator.
Web servers are complex systems, and there are a number of things that need to function exactly how they are supposed to in order for it to work. Let’s see some of the common reasons for HTTP 503 errors.
One of the primary culprits is server overload, a situation that arises when a server’s resources are stretched to their limits, often due to unforeseen traffic spikes or malicious DDoS attacks, thereby causing a service disruption.
2. During Server Maintenance & Upgrades
Another common cause is server maintenance, a necessary but disruptive process that can temporarily take a server offline. If the website administrator is upgrading the servers or applying a security patch, then this can inadvertently trigger a 503 error for the duration of the maintenance.
3. Coding Syntax Issues in .htaccess File
Syntax issues, particularly errors in the .htaccess file, can also cause HTTP errors and cause your WordPress website to become unavailable. If you recently edited a configuration file, then you might have placed an extra character somewhere where it was not supposed to be.
DNS configuration problems are another potential source of 503 service unavailable errors. The DNS, or Domain Name System, is responsible for converting website addresses into the corresponding IP addresses.
If you have recently edited your DNS records, or if you are using a dynamic IP address for your website, then it’s possible that your website is pointing to someone else’s server – and since your website is not hosted on that server, it is showing an error.
5. Database Connectivity Issues due to Misconfiguration
Database connectivity issues can prevent basic tasks such as logging in to the dashboard and fetching information about products, leading to website unavailability. It is essential to monitor and maintain database connectivity to ensure seamless website functionality and user experience.
6. Poorly Configured wp-config.php File
Misconfiguration in the wp-config.php file can cause WordPress and WooCommerce to throw HTTP 503 errors because this file contains essential settings for the WordPress installation.
As noted above, there are many reasons for the service unavailable error. Here are the recommended steps that you can take to try to fix 503 Server error:
Method 2. Check for Ongoing Maintenance Or Upgrade Running
If your server is showing an HTTP 503 error, then it is possible that the server is being updated in the background. If this disruption is caused by an automatic update, then it usually resolves itself within a couple of minutes. But if you want to, you can update your WordPress manually.
Method 3. Verify for High Resources Consuming Active Processes
If there are a lot of background tasks on your server, then terminating some of the processes can relieve an overwhelmed server.
Method 4. Reset Your Server, Network, or Web Application Firewall
Incorrect firewall configurations or proxy settings can cause 503 errors. If you recently edited some firewall settings, then you should revert them and see if that fixes the issue.
If you don’t want such a headache in the future, you will be pleased to know RunCloud provides an easy-to-use firewall with an intuitive graphical user interface that automatically blocks threats.
Method 5. Check Website Server Logs and Amend the Fixes
Server logs can provide valuable insights into what’s causing the error. Read your HTTP access logs to quickly detect and fix programming errors that might be causing the outage.
Method 7. Restart Your Server and Networking Equipment
Sometimes, gremlins cause a server crash. If you can’t find any explanation for your server crash, then a simple restart of your server and networking equipment can resolve the issue.
Dealing with an HTTP 503 error and other server-related issues can be quite technical and may require a good understanding of server management. However, RunCloud can greatly simplify this process while still providing full control over your servers.
RunCloud offers an intuitive dashboard that allows you to manage your servers efficiently, set up error reporting, and resolve common errors like 502 and 503 with ease.
Whether you’re a seasoned developer or just starting out, RunCloud can help you streamline your server management tasks, so you can focus more on development and less on maintenance. 🚀
Frequently Asked Questions on HTTP Error 503 Service Unavailable
How to enable error reporting in Nginx?
To enable error reporting in Nginx, you can configure the error_log directive in the Nginx configuration file (nginx.conf). Set the path to the error log file, and set the logging level. For example: error_log /var/log/nginx/error.log warn; This will log warning, error, critical, alert, and emergency level messages to the specified file. To learn more about logging in Linux, check out our in-depth article that explains what are application, system, event, and service logs.
What is the “HTTP error 503 server has been shutdown” error?
HTTP error 503 indicates that the server is currently unable to handle the request because it has been shut down for maintenance or is not operational. This is often a temporary state and may require a server restart or debugging code.
What is the difference between HTTP 500 and 503?
HTTP 500 is an Internal Server Error indicating a general problem with the website’s server. In contrast, HTTP 503 is a Service Unavailable error indicating that the server is temporarily unable to handle the request, often due to maintenance or overload.
What is the difference between HTTP 502 and 503?
HTTP 502 is a Bad Gateway error indicating that the server, acting as a gateway or proxy, received an invalid response from the upstream server. HTTP 503, on the other hand, means the server is not ready to handle the request, typically due to temporary overloading or maintenance.
What is the HTTP code for maintenance?
The HTTP code for maintenance is 503 – it should be used when the server is down for maintenance and cannot handle requests. This informs clients that the condition is temporary and the service will be restored soon.
What is error 503 first byte timeout?
Error 503 first byte timeout occurs when the server does not send a response within the timeframe set for the first byte timeout, which is typically 15 seconds by default. This error commonly occurs when the CDN is not configured properly.
What is error 503 service unavailable in cPanel?
In cPanel, error 503 service unavailable often results from PHP-FPM or Apache becoming overloaded with requests. Adjusting the PHP-FPM pool limits or increasing the max_children setting in the WHM MultiPHP Manager can help resolve this issue.
If you have a server in the cloud, then the only way to connect to it is via an SSH connection. But occasionally, if you mistakenly mistype your password, or simply forget it, then the login process may result in a “Too Many Authentication Failures” error.
If this happens to you then – don’t worry! In this post we will discuss different ways to avoid this problem in the future.
Let’s get started!
What are “Too Many Authentication Failures”?
If you make multiple consecutive login attempts on your server, either using a wrong password or an SSH key, then you are likely to see the following error message:
Received disconnect from host: 2: Too many authentication failures for root
”Too many authentication failures” is an error message commonly encountered in SSH (Secure Shell) services. This is a security measure to prevent unauthorized access and prevent bots from repeatedly spamming your server.
3 Ways to Fix Too Many Authentication Failures
In this section, we will explain how using SSH keys can help in avoiding the “Too many authentication failures” error, but before we start, make sure that you have added the public SSH key on your server.
A quick and easy way to avoid authentication failures is by using an SSH key and specifying the path of this SSH identity file directly in the login command to avoid any ambiguity.
By doing so, you bypass the SSH agent and force the use of the specified key, which can help resolve connection issues related to key confusion or agent problems.
Here’s how you can do it:
Restrict the Permissions for SSH key: Before using the identity file, make sure it has the correct permissions set. This can be done with the following command:
chmod 600 /path/to/your/identity_file
This command restricts the file so that only the owner can read and write to it, which is the recommended setting for SSH keys.
Specify Identity File in SSH Command: When connecting to the server, you can specify the identity file using the -i option in the SSH command:
Replace /path/to/your/identity_file with the actual path to your SSH private key, username with your username, and hostname with the server’s hostname or IP address.
Method 2: Use Unique SSH Key for Each Server (Recommended)
As we have discussed in our SSH service hardening guide, it is recommended to use a different key when connecting to different servers via SSH. Using a unique SSH key for each server can prevent cross-contamination between servers, and reduce the risk of accidentally leaking credentials for all the servers.
If you are using RunCloud, you can easily add a unique SSH key for each user account on your server using the “SSH” tab in your server settings page.
When using a new key for each server, it can be difficult to determine which key belongs to which server. To solve this problem, you can specify the keys in the ~/.ssh/config file on your local machine along with other necessary information.
Here’s how you can manage multiple connections by specifying an identity file and username for each server:
Open the ssh configuration file (located at ~/.ssh/config) on your local machine in a text editor. You can use any text editor such as notepad, VS code, or even a CLI-based editor such as nano. In that file, paste the following example:
# Server 1
Host server1
HostName server1.example.com
User myuser1
IdentityFile ~/.ssh/id_rsa_server1
# Server 2
Host server2
HostName server2.example.com
User myuser2
IdentityFile ~/.ssh/id_rsa_server2
In the configuration above, Host is an alias for the server, HostName is the actual hostname or IP address, User is the username for the SSH connection, and IdentityFile is the path to the private key file used for authentication.
Edit the example configuration and replace the dummy values with the actual values – the values for hostname, user, and identifyFile will be their respective values, but you can set the Host variable to anything descriptive.
In the above example, we have added a server in our configuration file and named it server1. To connect to this server we can simply specify its name in the SSH command, and your computer will automatically use the correct credentials for logging in.
ssh server1
In the above example, server1 is the name of the server that we specified in the configuration file.
This is the recommended way to do this, because by using the config file you streamline the process of connecting to various servers, making it more efficient and less prone to mistakes. System administrators and developers who frequently access multiple servers prefer this technique for the following reasons:
Simplified Connection Commands: Instead of typing long SSH commands with usernames and key paths, you can connect to a server with a simple ssh server1 command.
Organized Credentials: Each server has its own entry, making it easy to manage different usernames and keys for each connection.
Enhanced Security: By using unique keys for each server, you reduce the risk of a compromised key affecting multiple servers.
Automated Connection Parameters: The SSH client automatically uses the correct username and key when connecting, reducing the chance of errors.
Ease of Maintenance: Updating a server’s credentials or connection details is as simple as editing the corresponding entry in the config file.
Although you shouldn’t need to, you can optionally choose to change the number of allowed failed attempts by modifying the MaxAuthTries variable in the server configuration.
Here are the step-by-step instructions to increase the MaxAuthTries value in the SSH daemon configuration:
First, you need to connect to the server with the necessary privileges.
On the server, open the SSH daemon configuration file located at /etc/ssh/sshd_config with a text editor of your choice. You will need superuser privileges to edit this file. For example, you can use nano:
sudo nano /etc/ssh/sshd_config
Next, you need to locate the MaxAuthTries directive. If it’s commented out (preceded by a #), you will need to uncomment it by removing the #.
Change the value of MaxAuthTries to a number that suits your needs. The default is usually 6. Increasing it allows more authentication attempts before disconnecting.
MaxAuthTries 10
Save the Configuration File. After making the changes, save the file and exit the text editor. In nano, you can do this by pressing CTRL + X, then Y to confirm, and Enter to save.
Restart the SSH Service Apply the changes by restarting the SSH service. The command to restart the service may vary depending on your system’s init system. Here are two common methods:
#Using systemctl command
sudo systemctl restart sshd
#Using service command
sudo service sshd restart
By following these steps, you will have successfully increased the MaxAuthTries value, allowing more authentication attempts and potentially resolving issues with multiple keys in your SSH agent. Remember to use this setting judiciously, as allowing too many authentication attempts can be a security risk.
Although this method works well for most people, if you want additional security and flexibility, we recommend configuring Fail2ban to automatically block IP addresses which repeatedly login using incorrect credentials.
Wrapping Up
Navigating the complexities of server management and SSH authentication can be daunting. By implementing the methods outlined in this article, you can effectively resolve the “Too many authentication failures for user root” error, and streamline your server management process.
A secure and efficient server setup is crucial for smoothly managing web applications, but you don’t need to be a Linux expert anymore to deploy websites on the internet.
With RunCloud, you can effortlessly control your server environment, allowing you to focus on building your application without the backend worries. And if you ever encounter any server issues, our professional technical team is always ready to assist you.
Join RunCloud today and experience the peace of mind that comes with one-click web application installations.