Category: Server Management

  • How UptimeRobot Can Save Your Website from Downtime Disasters

    How UptimeRobot Can Save Your Website from Downtime Disasters

    Website monitoring is the process of checking the availability, performance, and functionality of a website.

    It’s an essential, and on-going task for web developers and owners to ensure that their websites are always online, fast, and user-friendly.

    Effective website monitoring can help detect and resolve issues, prevent downtime, improve user experience, and optimize website performance.

    UptimeRobot is a service that monitors your website’s uptime and alerts you when it goes down. By integrating UptimeRobot with RunCloud, you can monitor all of your websites hosted on RunCloud servers, and access a number of features and benefits from both.

    In this article, we will show you how to use UptimeRobot and RunCloud together for website monitoring. We’ll cover the following topics:

    Understanding UptimeRobot

    UptimeRobot is a service that monitors your website’s uptime and alerts you when it goes down.

    It achieves this by sending requests to your website at regular intervals and checking the response status code, response time, and keyword presence. If the response is not satisfactory, UptimeRobot will notify you via email, SMS, webhook, or other method of your choice.

    UptimeRobot has several features and benefits that make it a popular choice for website monitoring. Some of them are:

    • Free and paid plans: UptimeRobot offers a free plan that allows you to monitor up to 50 websites with 5-minute intervals, and 2 alert contacts. You can also upgrade to a paid plan that gives you more websites, shorter intervals, more alert contacts, advanced settings, and premium support.
    • Multiple types of checks: UptimeRobot supports different types of checks for your websites, such as HTTP(S), ping, port, keyword, and heartbeat. You can choose the type of check that suits your website’s needs – and customize the settings accordingly.
    • Various notification methods: UptimeRobot can alert you via various methods should your website go down or come back up. You can choose from email, SMS, voice call, webhook, Telegram, Slack, Discord, Pushbullet, Pushover, and more. You can also set different alert contacts for different websites and scenarios.
    • Status pages: UptimeRobot allows you to create public or private status pages for your websites. You can display the uptime and performance data of your websites on these pages, and share them with your visitors or clients if you wish. You can also customize the look and feel of your status pages with your own logo, domain name, colors, etc.

    Different Monitor Types

    UptimeRobot supports different types of monitors to check the availability, performance, and functionality of websites or web services. Here is a brief explanation of each type of monitor:

    • HTTP: This type of monitor sends an HTTP or HTTPS request to a website, and checks the response status code and response time. If the status code is not 2xx (success) or 3xx (redirection), or if the response time exceeds a certain threshold, the monitor will alert you that the website is either down, or slow.
    • Keyword: This monitor also sends an HTTP or HTTPS request to a website, but it checks the presence or absence of a specific word or phrase in the response body (typically HTML or JSON). You can choose to be alerted if the keyword is either found or not found on the website. This can help you verify the content or functionality of your website.
    • Ping: This type of monitor sends an ICMP ping packet to an IP address or a domain name, and checks both the response time and packet loss. If the response time is too high, or if there is no response at all, the monitor will alert you that the device is unreachable or slow. This can help you check the network connectivity and availability of your servers or devices.
    • Port: This type of monitor sends a TCP or UDP packet to a specific port on an IP address or a domain name, and checks if the port is open and listening. If the port is closed or filtered, the monitor will alert you that the service is down or inaccessible. This can help you check the status and performance of various services running on your servers or devices, such as email, database, FTP, SSH, etc.
    • Heartbeat: This type of monitor requires you to send an HTTP request to a specific URL provided by UptimeRobot at regular intervals from your own server or device. If UptimeRobot does not receive a request within a certain time frame, the monitor will alert you that the server or device is down or malfunctioning. This can help you monitor recurring background jobs or intranet devices connected to the internet.

    You can choose the type of monitor that suits your website’s needs, and customize the settings accordingly.

    Setting-up UptimeRobot

    To use UptimeRobot to monitor your websites, you’ll need to follow these steps:

    1. Sign up for a free or paid account on UptimeRobot, and log in to your dashboard. On the top left corner, click on “Add New Monitor” to create your first monitor.
    1. Provide a suitable name for your monitor, and enter the URL of your website that needs to be monitored. Here you can also specify the frequency of your tests and other basic configuration.
    1. Next, configure the alert settings by selecting the notification methods and contacts for each monitor. If your website experience crashes, these notification channels will be used to notify the specified contact(s).
    2. Optionally, you can create status pages for your monitors by choosing the template and options. Status pages are public pages that you can display to your customers or other stakeholders to track the health of your service.

    After you have performed the above steps, you can enjoy peace of mind – UptimeRobot will now keep an eye on your websites, and notify you if anything goes wrong.

    Understanding UptimeRobot Teams

    Team member functionality on UptimeRobot is a feature that allows you to add your team members to your UptimeRobot account, and assign them different levels of access and notification.

    You can use this feature to collaborate with your team members on website monitoring, and keep them informed of any issues or updates.

    There are two types of team members that you can add on UptimeRobot:

    1. Read or write access: These are team members who can log in to your UptimeRobot account with their own credentials and perform actions such as adding, editing, or deleting monitors, alert contacts, or status pages. You can choose to give them read-only or read-write access depending on their role and responsibility. You can also choose which monitors, alert contacts, or status pages they can access or manage.
    2. Notify-only: These are team members who cannot log in to your UptimeRobot account but can receive notifications via email, SMS, or voice call when your monitors go down or come back up. You can add them as alert contacts and assign them to specific monitors. You can also customize the notification frequency and content for them.

    Dos and Don’ts For Using UptimeRobot

    Here are some tips and best practices for website monitoring with UptimeRobot and RunCloud:

    Choose the right type of check and interval for your website

    Depending on the nature and purpose of your website, you may want to use different types of checks and intervals to monitor its uptime and performance.

    For example, if your website is a static HTML page, you may use a simple HTTP(S) check with a 5-minute interval. But if your website is a dynamic web application that relies on a database or an API, you may use a keyword or a heartbeat check with a 1-minute interval.

    Use multiple alert contacts and methods for different scenarios

    You may want to notify different people or teams when your website goes down or comes back online. For example, you may want to alert your web developer via email and SMS when your website goes down, but only alert your marketing manager via email when your website comes back up.

    You can also use different notification methods for different urgency levels. For example, you may want to use a voice call for critical issues, but only use a webhook for minor issues.

    Create status pages for your websites and share them with your clients

    Status pages are a great way to communicate the uptime and performance of your websites to your visitors or clients. These pages can help you build trust and transparency with your audience, and reduce the number of support requests.

    You can create public or private status pages for your websites using UptimeRobot, and customize them with your own logo, domain name, colors, etc.

    Don’t rely on a single type of monitor, or a single alert method.

    You may miss some issues or receive false positives if you only use one type of monitor or one alert method. You should use multiple types of monitors and alert methods to cover different scenarios, and ensure that you receive timely and accurate notifications.

    Don’t set unrealistic expectations for your website uptime

    You should understand that no website can achieve 100% uptime or perfect performance all the time. There are many factors that can affect your website’s availability and speed, such as network issues, server issues, code issues, traffic spikes, etc.

    You should set realistic and reasonable goals for your website uptime and performance, and measure them against industry standards and best practices.

    Final Thoughts

    Website monitoring is a vital part of your web development and maintenance strategy. It can help you ensure that your websites are always online, fast, and user-friendly. By using website monitoring tools such as UptimeRobot, you can detect and resolve issues, prevent downtime, improve user experience, and optimize website performance.

    But wait, there’s more! If you are looking for the best cloud hosting service provider for your websites, look no further than RunCloud.

    RunCloud is a platform that allows you to easily manage your web servers and web applications on any cloud provider.

    RunCloud lets you choose from a variety of cloud providers such as AWS, Google Cloud, DigitalOcean, Vultr, Linode, etc. and connect them to RunCloud with just a few clicks. You can then enjoy the benefits of RunCloud’s optimized web stack, backup, deployment, team collaboration, analytics, optimizer, and much more.

    What are you waiting for? Join RunCloud today and take your website hosting to the next level!

  • Synthetic Monitoring 101: How Datadog Can Help You Test and Optimize Your Web Services

    Synthetic Monitoring 101: How Datadog Can Help You Test and Optimize Your Web Services

    Is your website suffering from frequent outages and unexpected downtime? If yes, then you should look into Synthetic monitoring.

    Synthetic monitoring is a proactive way to monitor the performance and availability of your web applications and services by simulating user requests and actions from different locations. Synthetic monitoring helps you to:

    • Detect issues before they affect your real users
    • Ensure consistent user experience across devices and browsers
    • Measure service level agreements (SLAs) and objectives (SLOs)
    • Optimize your web performance and reliability.

    RunCloud allows you to manage your cloud servers with ease, and you can also integrate RunCloud with Datadog to monitor your server metrics, logs, and events.

    Datadog is a cloud-based platform that provides synthetic monitoring solutions for API, browser, and mobile tests. You can create and manage different types of synthetic tests with Datadog, such as API tests, multistep API tests, browser tests, or private locations.

    In this post, you will learn how to use Datadog and RunCloud together to monitor your web applications and servers with synthetic monitoring. You will also see how to create and manage synthetic tests with Datadog, analyze and troubleshoot synthetic test results with Datadog, and set up alerts, dashboards, and reports for your synthetic tests with Datadog.

    Let’s get started!

    Setting up Datadog and RunCloud

    Before you can use Datadog and RunCloud for synthetic monitoring, you’ll need to create an account on both platforms, and install the Datadog agent on your RunCloud server. Here are the steps to do that:

    • Creating an account on Datadog: Go to the Datadog website and click on the “Get Started” button.
    • Logging in to your server via SSH: You need to connect to your server with superuser privileges to install the monitoring agent. Read our guide on configuring SSH to learn more.
    • Install the Datadog agent on your RunCloud server: The Datadog agent is a tool that collects and sends metrics, logs, and events from your server to Datadog. To install the Datadog agent, follow these steps:
      • Go to the Datadog dashboard and click on the “Integrations” button.
      • Select “Datadog Agent” from the list and click on the “Ubuntu” tab to view the installation command.
    • Copy the Installation Script and paste it in your terminal. This will start the installation process – wait for the installation to complete.

    You have successfully set up Datadog and RunCloud for synthetic monitoring. After installation, the agent will start sending data within a few minutes. Once you get the message “Your first Datadog Agent is reporting. Congrats!”, you can click on the “Finish →” button to complete the installation.

    In the next section, you will learn how to create and manage synthetic tests with Datadog.

    Creating and managing synthetic tests with Datadog

    Synthetic tests are simulated user requests and actions that you can create and run with Datadog to monitor the performance and availability of your web applications and services. Datadog supports three types of synthetic tests: API tests, multistep API tests, and browser tests.

    • API tests: API tests are HTTP requests that you can send to your API endpoints and verify the response status code, body, headers, or latency. You can use API tests to check the functionality, performance, and reliability of your API endpoints. You can also chain multiple API tests together to create multi step API tests.
    • Multistep API tests: Multistep API tests are sequences of API tests that you can use to simulate complex user journeys or workflows involving multiple API calls. You can use multistep API tests to check the end-to-end functionality, performance, and reliability of your web applications and services. You can also extract variables from one API test and use them in another API test within the same multi step test.
    • Browser tests: Browser tests are user interactions that you can record and replay with a headless browser to monitor the performance and availability of your web pages. You can use browser tests to check the functionality, performance, and reliability of your web pages. You can also add assertions, variables, screenshots, or video recordings to your browser tests.

    In addition to this, you can also run tests from private locations. Private locations are dedicated machines that you can use to run synthetic tests from your own network or infrastructure. You can use private locations to monitor internal or private web applications and services that are not accessible from the public internet.

    To create tests with Datadog, follow these steps:

    • On your Datadog dashboard, click on “UX Monitoring” tab and go to the “Synthetics” page.
    • Click on the “New Test” button and choose the type of synthetic test you want to create: API test, multistep API test, or browser test.
    • Follow the instructions on the screen to configure your synthetic test settings, such as the test name, URL, frequency, locations, assertions, variables, screenshots, video recordings, etc.
    • Click on the “Save Test” button to save your synthetic test. After you have created a synthetic test with Datadog, it will be executed automatically according to the specified interval.

    Analyzing and Troubleshooting Synthetic Monitoring Results

    You can use synthetic test results to identify and resolve issues that affect your web performance and reliability. To access and interpret synthetic test results with Datadog, follow these steps:

    • Click on the synthetic test that you want to analyze. You will see the Test Details page, which shows the latest test result, and the historical test results for that synthetic test.
    • On the Test Details page, you can see various information about your synthetic test result, such as the test status, duration, response time, latency, errors, screenshots, video recordings, APM traces, etc. You can use this information to evaluate the performance and availability of your web applications and services. You can also compare different test results over time or across locations to identify trends or anomalies.
    • If your synthetic test result shows an error or a failure, you can use the Error Panel to see the details of the error or failure, such as the error message, stack trace, screenshot, video recording, APM trace, etc. You can use this information to troubleshoot and fix the issue that caused the error or failure. You can also click on the “Share” button to share the error details with your team or stakeholders via email or Slack.
    Synthetic monitoring dashboard Datadog

    Summary

    Synthetic monitoring is a proactive way to monitor the performance and availability of your web applications and services by simulating user requests and actions from different locations. In this post, you have learned how to use Datadog and RunCloud for synthetic monitoring.

    By using Datadog and RunCloud together, you can monitor your web applications and servers with synthetic monitoring in a simple and efficient way. You can also benefit from the features and capabilities of both platforms to improve your web performance and reliability.

    If you want to start using RunCloud for your web hosting needs, you can sign up for a free trial. RunCloud makes server management easy by providing you with a user-friendly interface, a powerful script installer, a robust security system, and a flexible backup system.

  • Using Dynatrace to Monitor RunCloud Servers

    Using Dynatrace to Monitor RunCloud Servers

    In today’s digital landscape, the smooth operation of web applications is crucial to business success, and the performance and reliability of your server infrastructure cannot be overstated.

    Server monitoring protects your applications against unexpected downtimes and performance bottlenecks, as well as valuable insights into the health, performance, and security of your infrastructure.

    Dynatrace is a cutting-edge observability platform designed to provide real-time insights into the performance of your web applications and the underlying server infrastructure.

    In this article, we’ll explore how to use Dynatrace to monitor your RunCloud servers, maximize uptime, and supercharge your web application’s performance.

    Let’s get started!

    Setting Up Dynatrace for RunCloud Servers

    Prerequisites

    Before you can start using Dynatrace to monitor your RunCloud servers, you’ll need to ensure you meet the following prerequisites:

    1. RunCloud Account: You should have an active RunCloud account with at least one server connected to it. If you haven’t set this up yet, visit the RunCloud docs for detailed instructions on getting started.
    2. SSH Access: Open your preferred SSH client or terminal. Use the SSH credentials associated with your RunCloud server to establish an SSH connection. Ensure that you have the required SSH access to execute commands on the server where you intend to install Dynatrace, and integrate it with your RunCloud-managed infrastructure. This access is essential for a successful Dynatrace installation and integration.
    RunCloud ssh login

    Once you have these prerequisites in place, you’re ready to move on to the installation process.

    Dynatrace Installation

    1. Access the Dynatrace Dashboard: Log in to your Dynatrace account and to view the Dynatrace dashboard. In the dashboard, look for the “Start collecting data” option. Click on it to begin the setup process.
    Dynatrace dashboard
    1. Choose One Agent: On the next screen, you’ll have the option to choose the type of agent you want to install. Select “One Agent“. On the next screen, click “Set up“.
    1. Generate PaaS Token: Since we’re working with a RunCloud server, choose the “Linux” option for the type of environment. After selecting the Linux option, you’ll be presented with instructions on how to generate a PaaS token. This token is essential for establishing the connection between Dynatrace and your RunCloud server. Click on the “Create Token” button to generate the PaaS token.
    Dynatrace agent
    1. Execute Commands: Once you’ve generated the PaaS token, a set of commands will be provided. These commands need to be executed in your SSH terminal on your RunCloud server. These commands will install and configure the Dynatrace agent on your server.

    Ensure that you follow each step carefully to complete the installation process successfully. Once the installation is complete, the Dynatrace agent will start collecting data from your server, and you will see your server in the Dynatrace dashboard.

    Monitoring Real-time Server Health

    After successfully installing the Dynatrace agent, you’ll need to wait for a few minutes to allow the data to populate in your Dynatrace dashboard. Once the data from your RunCloud server is connected and visible in Dynatrace, you can start taking advantage of the powerful features that Dynatrace offers.

    Creating Custom Dashboards:

    Custom dashboards in Dynatrace allow you to tailor the monitoring experience to your specific needs, helping you keep an eye on the most important metrics for your application. Follow these steps to create a custom dashboard:

    1. Create a New Dashboard: In your Dynatrace account, navigate to the Dashboard section. Click on the “+ Dashboard” button on the top left corner. Give your dashboard a meaningful name that reflects its purpose.
    2. Add Tiles: Within your dashboard, you can add tiles representing various metrics such as response times, error rates, CPU usage, memory utilization, and more. Click the “+” button on the top right part of the dashboard and select the metrics you want to monitor.
    1. Configure Tiles: Customize each tile by selecting the specific metric, filtering options, and visualization preferences. You can resize, move, and arrange the tiles to create an intuitive layout.
    2. Save Your Dashboard: Once you’re satisfied with your custom dashboard, save it. You can access this dashboard anytime to get a quick overview of the metrics that matter most to you.

    Setting Up Service-Level Objectives (SLOs)

    SLOs in Dynatrace help you define performance goals for your applications, and measure how well they meet those goals. To set up SLOs:

    1. Navigate to SLO Management: In the Dynatrace menu, find the “SLO” section (sometimes under “Settings” or a similar category).
    2. Create a New SLO: Click on “Create SLO” or a similar button to start creating a new Service-Level Objective.
    3. Define the SLO: Name your SLO, specify the application or service it applies to, set the target performance threshold (e.g., response time under 500ms), and choose the evaluation window (e.g., last 7 days).
    4. Save the SLO: Once you’ve configured your SLO, save it. Dynatrace will continuously monitor your application’s performance against the defined objectives.
    5. Review and Optimize: Regularly review the SLO performance data. If an SLO is frequently breached, consider optimizing your application or infrastructure to meet the defined objectives.

    Key Metrics to Monitor

    1. CPU Utilization

    Monitoring the CPU utilization of your servers is essential to understand their processing capacity and identify potential bottlenecks. This enables you to spot any spikes or consistently high usage that might indicate performance issues. By integrating Dynatrace with RunCloud, you can seamlessly access this critical metric, allowing you to make informed decisions about resource allocation – and ensure optimal server performance.

    1. Memory Usage

    Memory is a finite resource, and efficient management is crucial to maintain stable server operation. Having real-time insights into memory consumption trends allows you to identify potential memory leaks or unusually high usage patterns. This ensures that you can proactively address memory-related issues before they impact application stability.

    1. Network Performance

    Network connectivity is the lifeline of any web server. Monitoring network performance is vital to ensure smooth data transfer between servers and clients. Comprehensively tracking network performance metrics, such as latency, packet loss, and network throughput, allows you to detect network anomalies, troubleshoot connectivity issues, and optimize your application’s responsiveness to deliver a seamless user experience.

    Final Thoughts

    The old adage “prevention is better than cure” couldn’t be more applicable to server management. Dynatrace equips you with the ability to detect anomalies before they impact users, allowing you to resolve issues before they become critical.

    The proactive monitoring approach ensures that you stay one step ahead, maintaining a smooth user experience and reducing downtime to an absolute minimum.

    While Dynatrace supercharges your monitoring capabilities, RunCloud serves as an exceptional cloud management platform that simplifies server management, saving you time and effort. With RunCloud, you can effortlessly manage your servers, deploy applications, and enjoy a user-friendly interface that streamlines tasks. Start using RunCloud today!

  • How MailHog Can Transform Your Local Email Testing Process

    How MailHog Can Transform Your Local Email Testing Process

    Email testing is an essential part of any email marketing campaign. It allows you to check the quality, functionality, and deliverability of your emails before you send them to your subscribers.

    However, email testing can also be a frustrating and time-consuming process, and this is where local email testing can help.

    Local email testing means that you send your emails from your local development environment to your own email address, or to a test email account. This way, you can see how your emails look and behave in different email clients and devices without affecting your actual subscribers – or your reputation.

    Caveats with Traditional Email Testing

    It’s important to be aware that email testing can come with some common problems or challenges, such as:

    • Spam filters: Your emails may end up in the spam folder or be blocked by the email provider due to various reasons, such as invalid sender address, poor content quality, suspicious links, etc.
    • Delay in SMTP servers: Your emails may not be sent or received at all due to the limitations or errors of the SMTP server that you use to send your emails locally. You may have to configure the SMTP settings manually or use a third-party service to send your emails.

    These problems can make email testing a tedious and unreliable process. You may waste a lot of time and effort in testing your emails locally without getting the results that you want.

    That’s why you need a better way to test your emails locally.

    That’s where MailHog comes in.

    By the end of this article, you will be able to use MailHog to test your emails locally with maximum effectiveness. This will significantly help you improve the quality, functionality, and deliverability of your emails before you send them to your subscribers.

    Are you ready to learn how to use MailHog to test your emails locally? Let’s get started!

    What is MailHog?

    MailHog is a simple and powerful tool that can transform your local email testing process. It can easily help you test your emails locally without any hassle or headache, and can help you fix the problems that you’re currently facing when testing your emails locally.

    Why use MailHog?

    Local email testing can help you improve the quality, functionality, and deliverability of your emails before you send them to your subscribers. It can also save you time and hassle in testing your emails. Here are some of the benefits of local email testing:

    • It is instantaneous: You don’t need to wait for network delays or server issues to see how your emails look and behave. You can test your emails in real time and get immediate feedback.
    • It saves email quota. Sending too many emails might reduce your spam score or trigger spam filters. By testing your emails locally, you can avoid wasting your email quota or damaging your email reputation.
    • It prevents accidentally sending to real customers if there is a bug in your code. Sometimes, you may have errors or typos in your code that could cause your emails to be sent to the wrong recipients or with the wrong content. By testing your emails locally, you can catch these mistakes before they cause any harm or embarrassment.
    • It allows you to simulate situations where the communication between your program and the email server is interrupted or degraded due to various reasons, such as network congestion, packet loss, latency, etc. These faults can cause your emails to be delayed, corrupted, or lost. By testing emails locally you can create and control these network faults and test how your program behaves under these conditions.

    Jim: The Chaos Monkey

    MailHog comes with an interesting extension, Jim – a chaos monkey. It’s a tool that simulates random failures and disruptions in your email system. This is useful for testing the resilience and reliability of your email system, as well as your ability to handle, and recover from, unexpected errors.

    By inviting Jim to your email testing, you can expose and fix any weaknesses or vulnerabilities in your email system. You can also learn how to build better automatic recovery mechanisms, and improve the quality, functionality, and deliverability of your emails.

    For example, you can test how your program handles the following scenarios:

    • Rejecting incoming connections with a certain probability
    • Disconnecting sessions randomly
    • Applying a rate limit to connections
    • Rejecting authentication attempts
    • Rejecting a sender’s or recipient’s address

    By using these tools, you can see how your program reacts to different types of network faults – and whether it can recover from them gracefully. You can also improve your error handling and logging mechanisms and make your program more robust and resilient.

    How To Use MailHog

    Here is a step-by-step guide on how to install and set up MailHog on your local machine, and configure it to capture and display the emails that you send from your application:

    1. Download MailHog from its GitHub repository. You can choose the version that suits your operating system and architecture. For example, if you are using Windows 10 64-bit, you can download the file named mailhog_windows_amd64.exe.
    2. Save the downloaded file in a folder of your choice. For example, you can create a folder named mailhog in your C:\ drive and save the file there.
    3. Open a command prompt window and navigate to the folder where you saved the MailHog file. For example, you can type cd C:\mailhog and press ‘Enter’.
    4. Run the MailHog file by typing its name and pressing ‘Enter’. For example, you can type mailhog_windows_amd64.exe and press ‘Enter’. You should see a message saying that MailHog is listening on port 1025 for SMTP and port 8025 for HTTP.
    1. Open a web browser and go to http://localhost:8025. You should see the MailHog web interface, which shows the list of emails that MailHog has captured.
    1.  Configure your application to send emails to MailHog instead of your actual SMTP server. You can do this by changing the SMTP settings in your application to use localhost as the host name and 1025 as the port number.
      You can also use any username and password for authentication, as MailHog doesn’t check them. 

    For WordPress Sites

    There are many WordPress plugins that allow you to send emails using a specific mail server. You can configure them to use MailHog to test your email. After sending the email, you can view the email in the MailHog dashboard.

    For Generic PHP Applications

    If you are using PHPMailer to send emails from your PHP application, you can use the following code snippet to send emails to MailHog server:

    <?php
    // Load PHPMailer library
    require 'PHPMailerAutoload.php';
    // Create a new PHPMailer instance
    $mail = new PHPMailer;
    // Set Mailer to use SMTP
    $mail->isSMTP();
    // Set SMTP host name
    $mail->Host = 'localhost';
    // Set SMTP port number
    $mail->Port = 1025;
    // Set SMTP username
    $mail->Username = 'anyusername';
    // Set SMTP password
    $mail->Password = 'anypassword';
    // Set email subject
    $mail->Subject = 'Test email from MailHog';
    // Set email body
    $mail->Body = 'This is a test email sent from MailHog';
    // Set email sender address
    $mail->setFrom('sender@example.com', 'Sender Name');
    // Set email recipient address
    $mail->addAddress('recipient@example.com', 'Recipient Name');
    // Send email
    if ($mail->send()) {
        echo 'Email sent successfully';
    } else {
        echo 'Email sending failed: ' . $mail->ErrorInfo;
    } ?>
    1. Test your application by sending an email from it. You should see the email appear in the MailHog web interface. You can also open the email and check its content, layout, design, attachments, links, etc.
    MailHog dashboard

    Conclusion

    MailHog is a simple and powerful tool that can transform your local email testing process. In this article we have shown how to use MailHog to test your emails locally and fix the common problems or challenges that developers face when testing emails locally, such as spam filters, email clients, SMTP servers, etc.

    If you are looking for a great cloud management platform that saves time and doesn’t require you to be a Linux expert, we recommend you check out RunCloud.

    RunCloud is a modern web server panel designed to help you manage your PHP web applications and websites.

    With RunCloud, you don’t need to be a Linux expert to build a website, and you can host it on a cloud provider of your choice such as Vultr, Linode, UpCloud, Hetzner, AWS, Google Cloud or DigitalOcean.

    Start your free trial today and see for yourself how RunCloud can make your cloud hosting experience easier and better.

  • Setting Up Local WordPress Dev in Minutes Using Laravel Valet

    Setting Up Local WordPress Dev in Minutes Using Laravel Valet

    Laravel Valet is a local development environment for Mac users who want to create WordPress sites quickly and easily. It’s a lightweight, minimalist tool that uses the built-in PHP server and Nginx to serve your WordPress sites.

    Unlike other local development tools, such as MAMP, XAMPP, or Local by Flywheel, Laravel Valet does not require you to configure a virtual host, a database, or a port for each site.

    Instead, you can simply create a new site in any directory, and link it to a custom domain name (such as .test) with one command. It also provides automatic HTTPS for your sites, so you can test them securely and avoid browser warnings.

    Some of the features and benefits of Laravel Valet are:

    • Fast and easy installation: You can install Laravel Valet with Composer and Homebrew in only a few minutes. You don’t need to download or install any bulky software or packages.
    • Automatic HTTPS: Laravel Valet uses the mkcert utility to generate and trust SSL certificates for your sites. You can access your sites with HTTPS without any configuration or hassle.
    • Custom domain names: Laravel Valet allows you to use any domain name (such as .test, .dev, or .local) for your sites. You can link any directory to a domain name with one command, and access it in the browser.
    • Multiple PHP versions: Laravel Valet lets you switch between different PHP versions (such as 7.3, 7.4, or 8.0) with just one command. This enables you to test your sites with different PHP versions without affecting other sites or settings.
    • Custom drivers: Laravel Valet supports various frameworks and applications, such as WordPress, Laravel, Symfony, Drupal, etc. You can also create your own custom drivers for any application that you want to use with Valet.

    Laravel Valet is a great tool for WordPress developers who want to work locally with speed and simplicity. It’s especially useful for developers who work on multiple WordPress sites or projects at the same time.

    In this article, we will show you how to use Laravel Valet to set up a local WordPress dev environment in only a few minutes.

    Prerequisites

    Before you can use Laravel Valet to create and run WordPress sites, you need to have the following requirements:

    • A Mac computer: Laravel Valet is only compatible with macOS. You’ll need to have a Mac computer with macOS Sierra (10.12) or higher.
    • Port 80 is free: The websites will be served port 80 of your computer. You should make sure that no other programs, such as Apache or Nginx, are binding to your local machine’s port 80.
    • Supported PHP Version: Laravel Valet requires PHP 7.3 or higher to work. You can check your PHP version by running php -v in the terminal.
    • Composer: Composer is a dependency manager for PHP. You’ll need to have Composer installed on your Mac in order to install Laravel Valet and other tools.
    • Homebrew: Homebrew is a package manager for macOS. You’ll need to have Homebrew installed on your Mac to install some of the dependencies of Laravel Valet, such as Nginx and MySQL.

    These are the main prerequisites for using Laravel Valet. If you already have them, you can proceed to the next section. If not, you can follow the links provided to install them on your Mac.

    Installing Laravel Valet

    To install Laravel Valet on your Mac, you need to follow these steps:

    • Open the terminal and run the following command to install Laravel Valet using Composer:
    composer global require laravel/valet
    • Run the following command to install and start Valet:
    valet install
    • This command will install Nginx and Dnsmasq using Homebrew, and configure your Mac to use Valet’s drivers. It will also register Valet’s daemon to launch when your system starts.
    • By default, Valet will use the .test domain for your sites. If you want to use a different domain, such as .dev or .local, you can run the following command:
    valet domain <tld-name>

    For example, if you’d like to use .app instead of .test, run valet domain app and Valet will start serving your projects at *.app automatically.

    • To check if Valet is running properly, you can run the following command:
    valet status
    • This command will show you the status of Valet’s services, such as Nginx, Dnsmasq, and PHP. You should see something like this:
    Valet services are running:
    [OK] Nginx is running
    [OK] Dnsmasq is running
    [OK] PHP 7.4 is running
    • If you see any errors or warnings, you can run the following command to restart Valet:
    valet restart

    That’s it! You have successfully installed Laravel Valet on your Mac. You are now ready to create and run WordPress sites with Valet.

    Installing WordPress

    To create a new WordPress site using Laravel Valet, you need to follow these steps:

    • Choose a directory where you want to store your WordPress site. For example, you can create a directory called wordpress in your Sites folder:
    cd ~/Sites
    mkdir wordpress
    • Go to the directory and install WordPress using WP-CLI or Composer. You can use either of them to download and install WordPress core files and dependencies. For example, you can use WP-CLI to install WordPress with the following command:
    wp core download
    • Alternatively, you can use Composer to install WordPress with the following command:
    composer create-project roots/wordpress
    • Both commands will create a wp-config.php file in your directory. You can edit this file to configure your database settings and other options. You can also use WP-CLI or Composer to install plugins, themes, and other components for your WordPress site.
    • Use Valet to link your site directory to a custom domain name. For example, if you want to use wordpress.test as your domain name, you can run the following command:
    valet link wordpress
    valet open
    • This command will create a symbolic link between your site directory and the .test domain. You can also use a different domain name if you want.
    • Access your site in the browser. You can now visit your site by typing wordpress.test in the browser. You should see the WordPress installation screen where you can enter your site title, username, password, and email address. After completing the installation, you can log in to your WordPress dashboard and start building your site.
    • Use Valet to secure your site with HTTPS. If you want to use HTTPS for your site, you can run the following command:
    valet secure wordpress
    • This command will generate and trust an SSL certificate for your site using the mkcert utility. You can then access your site with HTTPS by typing https://wordpress.test in the browser. You should see a green lock icon in the address bar indicating that your site is secure.

    You have successfully created a new WordPress site using Laravel Valet. You can now enjoy the benefits of a fast and easy local development environment for WordPress.

    Troubleshoot Common Issues

    If you encounter any problems with Valet or WordPress, you can try some of the following solutions:

    • Restart Valet by running valet restart.
    • Check the status of Valet by running valet status.
    • Check the logs of Valet by running valet logs.
    • Check the configuration of Valet by running valet config.
    • Unlink and relink your site by running valet unlink wordpress and valet link wordpress.
    • Unsecure and resecure your site by running valet unsecure wordpress and valet secure wordpress.
    • Update Valet by running composer global update.
    • Update WordPress by running wp core update or composer update.

    Final Thoughts

    In this article, we have covered how to use Laravel Valet to set up a local WordPress dev environment in minutes. Laravel Valet is a great tool for WordPress developers who want to work locally with speed and simplicity. It’s especially useful for developers who work on multiple WordPress sites or projects at the same time.

    You can start using Laravel Valet to keep your site directories organized and consistent, such as using a naming convention or a folder structure to group your sites by type, client, or status. For example, you can use clientname-projectname.test as your domain name, or create a clients folder to store all your client sites. For more information and documentation on Laravel Valet, you can visit the official documentation.

    Another quick and easy way to set up a testing environment is by creating a staging site on RunCloud. RunCloud lets you focus on your product and takes care of server management. You don’t need to be a Linux expert to host a successful website, start using RunCloud today and see for yourself.

  • How To Set Up Free Self-Hosted Mailbox Using FreeScout On Your VPS [Open Source]

    How To Set Up Free Self-Hosted Mailbox Using FreeScout On Your VPS [Open Source]

    If you’re looking for a free and open-source solution to manage your customers, you might want to check out FreeScout.

    FreeScout is a web-based customer support system that lets you manage your email conversations with your clients and customers. You can also add modules for live chat, knowledge base, reports, and more.

    The official Wiki page provides detailed instructions and tips for installing FreeScout on a fresh server. However, if you’re using RunCloud to manage your servers, this process is much simpler. You don’t need to worry about installing and configuring any server software, such as Nginx, PHP, and MySQL. You can just create a web app on RunCloud – and follow the steps in this article to install FreeScout in minutes.

    By the end of this article, you’ll have a fully functional FreeScout system that you can use to provide awesome customer service. Sounds good? Then let’s get started!

    Step 1: Create an Empty Web Application

    First, you need to create a blank web app on RunCloud. A web app is a way of telling RunCloud how to run your website. To do this, you’ll first need to log in to your RunCloud dashboard.

    On the RunCloud dashboard, you will see a button that says “Create Web Application”. Click on it, and you will see a form where you can enter some details about your web app.

    You need to enter a name for your web app, such as “FreeScout”. You also need to enter a domain name for your web app, such as “freescout.example.com”. This is the address where people can access your website. You can either use your own domain name, or get a free one from RunCloud for testing purposes.

    After you enter the name and the domain, you will see some options for the application type and the public path. These are settings that tell RunCloud how to run your web app. For now, leave them as they are and click on “Create Web Application”. RunCloud will create a blank web app for you and show you some information about it.

    Step 2: Log in via SSH

    You’ll next need to connect to your server using SSH. After logging in, the first thing you need to do is change the directory to the web app root directory. This is the folder where your web app files are stored. You can do this by typing cd <path> and pressing “Enter“, where <path> is the path to the root directory of your web application – you can get this from your RunCloud dashboard.

    Step 3: Download FreeScout

    After that, you need to download the latest version of FreeScout on your server. To download FreeScout, visit https://github.com/freescout-helpdesk/freescout/releases/latest and copy the download link for the latest release. It should look something like https://github.com/freescout-helpdesk/freescout/archive/refs/tags/1.8.86.tar.gz.

    Next, you’ll need to use wget to download the zip file to your server. To use wget, type “wget” followed by the download link and press “Enter“.

    For example:

    wget https://github.com/freescout-helpdesk/freescout/archive/refs/tags/1.8.86.tar.gz.

    Step 4: Extract the Archive

    After downloading the file, type ls and press “Enter“. This will show you a list of everything that is present in the current directory. If you followed the steps correctly, your output will look something like this:

    Next, you’ll need to extract the files from the archive file. To extract the files, type tar -xf followed by the name of the archive file, and press “Enter“.

    For example:

    tar -xf 1.8.86.tar.gz.

    This will create a folder named freescout-x.x.xx, where x.x.xx is the version number of FreeScout. Inside this folder, you will find all the files and folders that make up FreeScout.

    Step 5: Move the Contents

    Next, you should move the files from the freescout-x.x.xx folder to the root of your application. You can do this by using cp -r followed by ./freescout-x.x.xx/* and . and press “Enter“. For example, your command should look something like this:

    cp -r ./freescout-1.8.86/* .

    This will copy all the files and folders from the freescout-x.x.xx folder to the current directory. After that, you can delete the downloaded file and the freescout-x.x.xx folder because you don’t need them anymore. You can also remove the default index.html file. You can do this by using rm -rf and then the name of the file or folder, and press “Enter“.

    rm -rf freescout-1.8.86/
    rm 1.8.86.tar.gz
    rm index.html

    Step 6: Create the .env File

    The next step us to create a file named .env.example in the current directory. This file will store your FreeScout configuration settings, such as your database name and password. To create this file, run the following command: touch .env.example.

    Step 7: Update the Application Settings

    Next, you’ll need to update your web application settings. Go back to your RunCloud dashboard and click on the “Settings” tab. Under the “Stack” sub-section, you will see a option for the application type and the public path. These are settings that tell RunCloud how to run your web app.

    FreeScout uses the Laravel framework to run. The public path is the folder where your web app files are accessible from the internet. You should change the application type to Laravel and set the public path to /public.

    After you change these settings, click on “Update Stack”. RunCloud will apply the changes and restart your web app. As a result, you will see a new section of Laravel settings in the left menu.

    Next, scroll down to the PHP settings section, and look for the symlink function in the disabled functions list and delete it – make sure you delete the trailing comma as well.

    After removing the function from the disabled list, click on the “Update PHP Settings” button to save the settings.

    Step 8: Create a Database and User

    Finally, you’ll need to finish the installation by opening your web browser and going to your web app domain. You should see the FreeScout installation wizard. This is a page where you can enter some details about your FreeScout system, such as your email and password. You also need to create a database and a user for FreeScout.

    To create a database and a user, you can use RunCloud’s database manager. You can find this in the RunCloud dashboard under the “Database” tab. Follow our tutorial on creating a database to learn more.

    After creating the user, granting them access to a database, and connecting that database to your web application, go back to the FreeScout installation wizard and enter the same details that you used to create the database and the user. Make sure you have selected the MySQL option in the database connection drop-down, and leave the hostname and port as default.

    If everything is okay, you can proceed with the installation by clicking on “Install”. FreeScout will install itself on your server and then show you a success message.

    Final Thoughts

    As you can see, installing FreeScout on Ubuntu using RunCloud is easy and fast. You don’t need to be a Linux expert or spend hours configuring your server. You can leave the hard work to us and focus on your projects.

    RunCloud lets you manage your web apps with a simple and intuitive interface. You can create, deploy, and scale your web apps with just a few clicks. You can also monitor your server performance, secure your web apps, and automate your tasks with RunCloud.

    With RunCloud, you can save time, money, and hassle. You can run any web app on any cloud server provider, such as DigitalOcean, AWS, Google Cloud, and more. You can also enjoy the benefits of RunCloud’s features, such as:

    • One-click SSL certificates
    • Custom domain names
    • Automatic backups
    • Firewall and malware protection
    • Cron job scheduler
    • Git deployment
    • And more!

    Whether you’re a developer, a freelancer, or a business owner, RunCloud is the perfect solution for you. You can manage your web apps with ease and get support from our friendly team anytime you need it. Sign up for RunCloud today and see how it increases your productivity.

  • Scaling RAM & CPU Cores – How They Affect WordPress Performance

    Scaling RAM & CPU Cores – How They Affect WordPress Performance

    Did you know that a one-second delay in page load time can reduce conversions by 7%?

    Or, that Google penalizes slow sites in its search rankings?

    These are just some of the consequences of having a poorly performing WordPress site. And one of the main factors that affects your site’s performance is the amount of RAM and number of CPU cores that your hosting plan provides.

    But what are RAM and CPU cores, and how do they relate to WordPress hosting?

    How can you tell if your site needs more or less of them? And how can you scale them up or down to optimize your site’s performance?

    In this article, we’ll answer all of these questions, and more. We will explain what RAM and CPU cores are, how they work, and why they matter for your WordPress site. We will also give you some examples of WordPress sites that require high RAM and CPU resources, and how to scale them accordingly. Finally, we will share some tips and best practices to improve your site’s performance, and avoid wasting resources.

    If you want to learn how to make your WordPress site faster, smoother, and more reliable, read on!

    Why Do Sites Need RAM and CPU?

    RAM and CPU are the main components of your hosting server that determine how fast and reliable your WordPress site is. Let’s see what they do and why they matter.

    What is RAM?

    RAM stands for Random Access Memory, and is the temporary storage space that your WordPress site uses to load and process data. Every time someone visits your site, WordPress needs to access the database, load the files, and execute the code. All these operations require RAM to store the data temporarily.

    RAM is typically measured in Megabytes and Gigabytes. Most cloud providers allow you to configure the amount of RAM available on your server. The more RAM you have, the more data your site can handle at once. This means your site can load faster, handle more traffic, and run more plugins – without crashing or slowing down.

    What is a CPU?

    CPU stands for Central Processing Unit, and is the “brain” of your WordPress site that executes commands and calculations. Every time someone visits your site, WordPress needs to perform some logic and calculations to generate the output. For example, it needs to check the user’s permissions, apply the theme’s settings, run the plugins’ functions, and so on. All these operations require a CPU to process the commands.

    The CPU is measured in the number of cores. The more CPU cores you have, the more commands your site can execute at once. This means your site can perform faster, handle more complex tasks, and run more plugins without errors or delays.

    As you can see, both RAM and CPU are essential for your WordPress site to function properly.

    However, they also have limits.

    The more RAM and CPU cores you have, the more processes you can run simultaneously, and the faster your site can respond to visitors. If your site receives a lot of traffic or runs complex tasks, it might need more RAM and CPU resources than are available on your current hosting plan. This can result in slow loading times, errors, or even crashes.

    That’s why you need to choose a hosting plan that provides enough RAM and CPU resources for your WordPress site. You also need to monitor your site’s performance and usage regularly, and scale your resources up or down as needed. In this way, you can ensure that your WordPress site runs smoothly and efficiently at all times.

    Which Sites Benefit From More RAM and CPU?

    Not all WordPress sites need the same amount of RAM and CPU resources. Some sites are more demanding and complex than others, and they can benefit from having more RAM and CPU resources to run smoothly and efficiently.

    Some examples of WordPress sites that require high RAM and CPU resources are:

    • E-commerce sites that handle a lot of transactions and inventory. These sites need to load and process a lot of data, such as product details, prices, images, reviews, cart items, payment methods, and so on. They also need to handle a lot of user requests, such as adding items to the cart, checking out, updating orders, etc. All these operations require a lot of server resources to avoid slow loading times, errors, or crashes.
    • Membership sites that have a lot of users and content. These sites need to store and manage a lot of user data, such as profiles, preferences, subscriptions, activities, etc. They also need to load and display a lot of content, such as posts, pages, videos, podcasts, courses, etc. A large amount of traffic will put additional strain on a server’s resources.
    • Media sites that stream or download large files. These sites need to handle a lot of bandwidth and storage for the media files, such as images, audio, video, etc. They also need to encode and decode the files for different formats and devices. All these operations require a lot of RAM and CPU resources to deliver high-quality media without buffering, lagging, or breaking.
    • Multisite networks that run multiple WordPress sites on one server. These sites need to share the same server resources for all of the sub-sites in the network. This means that each sub-site needs to have enough RAM and CPU resources to function properly without affecting the other sub-sites. Running multiple sites requires a large amount of server resources.
    • If your site experiences a sudden surge in traffic, such as during a launch, promotion, or viral event, you might need to scale up your RAM and CPU resources to handle the increased load. In this way, you can avoid slow loading times, errors, or crashes that can frustrate your users and hurt your conversions.
    • If your site runs complex plugins or tasks, you might need to scale up your RAM and CPU resources to run them smoothly and efficiently. In this way, you can avoid performance issues, bugs, or conflicts that can affect your site’s functionality and user experience.

    Measuring Performance Gains

    It’s widely believed that “a bigger server will obviously outperform a smaller server”.

    To put this to test, we created 3 identical websites on 3 fresh servers using WordPress 6.2. All of the servers had identical configurations – except the CPU and RAM.

    We ran load testing benchmarks using Grafana k6 to stress test the performance of our website, and measure the impact in 95 percentile response times. Since the purpose of this test is to put strain on CPU and RAM, we didn’t use any optimization techniques such as caching that are used in real world applications.

    1v CPU 2 GB RAM

    Our smallest server used the cheapest hosting plan offered by the cloud provider. It consisted of only 1 virtual CPU and 2 GB of RAM. Despite this, it was able to serve nearly 20 requests per second and had a p95 response time of 815ms. This is not bad considering it only costs <$5 to run. Most users will be able to afford it and will be satisfied with it – as long as the site doesn’t get too much traffic.

    2v CPU and 8 GB RAM

    Our second server was moderately priced, this one consisted of 2 virtual CPU cores and 8GB of RAM. This server size is probably unnecessary if you’re running a hobby site, but if you use your site for critical business transactions, then you should consider this.

    Just by slightly increasing the resources, we were able to see a massive jump in the performance. The server completed nearly 36 requests every second with a p95 response time of 104ms. These numbers suggest that our server was limited by the number of resources during our first test. Let’s crank it up further and see if the numbers scale proportionally.

    8v CPU 32 GB RAM

    Our third server was the most expensive of the three, it contained 8 virtual CPUs and a whopping 32 GB of RAM. However, when we look at the numbers, they tell a different story. The number of requests per second metric saw only a minor bump from 36 to 39; furthermore, the p95 response time metric didn’t improve.

    Trade Offs to Consider While Scaling RAM and CPU

    You also need to be aware of the potential drawbacks or challenges of scaling RAM and CPU cores.

    Unexpected Crashes

    Scaling RAM and CPU cores might cause some unexpected issues or conflicts that can break your site.

    For example, you might encounter compatibility problems with some plugins or themes that are not optimized for the new resources. Or you might face some server errors or configuration issues that prevent your site from loading properly.

    These issues or conflicts can make your site inaccessible or unusable until you fix them, or revert to the previous state.

    Planned Downtime

    Furthermore, many hosting providers require you to shut down your server before you can increase or decrease your server’s RAM and CPU.

    This means that your site will be offline for the duration of the upgrade. Although most providers will be able to scale up your server within a few minutes, this does vary from vendor to vendor, and depends on availability.

    Increase in Hosting Costs

    Finally, scaling RAM and CPU cores can also affect the price of your hosting plan. Some providers and plans might offer flexible or scalable pricing that adjusts to your resource usage. Others might charge you a fixed or flat rate regardless of your resource usage. And others might have different tiers or levels of pricing that correspond to different amounts of resources.

    You need to weigh the costs and benefits of scaling, and find the best balance for your site’s budget and needs.

    You need to consider how much scaling will improve your site’s performance and user experience, and how much it will increase your hosting expenses. You should also compare different providers and plans to find the one that offers the best value and quality for your site.

    More Resources Might Not Benefit the Site

    Simply adding more RAM and CPU cores does not guarantee better performance if there are other limiting factors such as network speed, disk speed, or PHP workers.

    PHP workers are processes that handle PHP requests on your WordPress site. Some hosting providers limit the number of PHP workers available on your server. If you have too few PHP workers, your site may become slow or unresponsive when there are many concurrent visitors or complex tasks. If you have too many PHP workers, they may consume too much RAM and CPU resources, and cause your server to crash.

    Final Thoughts – Thinking Beyond RAM and CPU

    It’s clear that you can’t keep scaling up the hardware and expect proportional increase in performance.

    Throwing money at the problem only works up to a point.

    Beyond that, you need to fine tune your application to consume fewer resources, and find the optimal balance between RAM, CPU cores, and PHP workers for your WordPress site based on your traffic, content, and plugins. There are several ways to do this:

    • You can use caching, a technique that can improve your WordPress performance by storing frequently accessed data in memory or on disk, and serving it faster to visitors without invoking PHP workers.

    There are different types of caching such as page caching, object caching, edge caching, etc. You need to choose the right caching solution for your WordPress site, depending on your needs and preferences.

    If you’re tired of managing your own servers, you might want to check out RunCloud (yep, that’s us!).

    RunCloud is built for developers that want to focus on shipping great work, not on managing their infrastructure. Experience what a painless server configuration feels like – get started with RunCloud today, and get up and running in minutes.

  • What is WHMCS and How Is It Used?

    What is WHMCS and How Is It Used?

    If you’re running a web hosting business, you know how challenging and time-consuming it can be to manage your clients, billing, support, domains, and more.

    You need a solution that can automate your tasks and make your life easier.

    That’s where WHMCS comes in.

    WHMCS is a powerful and popular web hosting automation platform that can help you run your business smoothly and effectively. But how do you install WHMCS on RunCloud, the best cloud server management platform?

    In this article, we will explain what WHMCS is and how it works, and then we will guide you through the quick and simple steps of installing it on RunCloud. You’ll also learn about some of the best alternatives to WHMCS that can offer you more features and benefits for your web hosting business. Read on to find out more!

    What Is WHMCS

    WHMCS is short for Web Host Manager Complete Solution. It’s a management platform that simplifies the process of selling domain names and hosting services online. WHMCS provides a suite of tools that can automate daily operations such as billing, invoicing, client management, and support requests.

    WHMCS was first introduced back in 2005, and since then it has become a popular choice for web hosting companies to manage their online business. It’s an invaluable tool for such hosting companies, as it helps them to manage their businesses more efficiently and effectively.

    If you’re looking for alternatives to WHMCS, you might want to check out this article: The Best WHMCS Alternatives (Free, Open Source & Premium). It will give you an overview of some of the most popular and promising options for web hosting automation. You might find a solution that suits your needs and budget better than WHMCS.

    Key Features Of WHMCS

    1. Billing and Invoicing: WHMCS can automate the process of generating invoices, and allows users to manage their finances and payments easily. You can also configure recurring billing, payment reminders and promotional discounts to boost your sales.
      There are mechanisms set in place to handle multi-currency transactions, as well as initiating refunds in case of a dispute.
    2. Client Management: It provides a centralized location to manage client data and information such as order history, support tickets, and billing information. Having a unified dashboard which tracks everything streamlines the operations process, and improves productivity.
    3. Product and Service Management: WHMCS allows you to manage your products and services quickly and easily. You can add new products, set up pricing, packages, and use custom options to provide additional offerings to your customers.
    4. Support Ticket System: There is a built-in support ticket system for managing customer support requests and inquiries. This system can be organized to replicate the hierarchy of support staff, and organize them in departments to segregate responsibilities.
      It’s possible to open and communicate in a ticket via email or directly from the web interface. The ticketing system also supports attachments, and you can set up additional escalation rules to perform automated actions and enforce SLAs.
    5. Integrations: WHMCS has built-in support for various payment gateways such as PayPal, Stripe, Skrill, eWay, etc. It can integrate with various domain registrars, including GoDaddy, ResellerClub, NameCheap, and more.
      It can send notifications via Slack and Hipchat, which makes it easier for users to manage all aspects of their business.
    6. Customizable: One of the key features of WHMCS is its modular architecture which allows for unlimited customizations. It offers a powerful API that supports both XML and JSON to execute actions within WHMCS from third party code. There are themes and templates available, which can be used to create a professional and branded experience for clients.

    Benefits of using WHMCS

    1. Improved Efficiency: WHMCS can automate various business operations, thereby reducing manual work, saving time and improving efficiency. This will free up time for businesses to focus on growth and improving overall efficiency.
    2. Streamlined Financial Management: The platform facilitates billing and invoicing automatically for a large number of clients, allowing businesses to manage their finances and maximize their revenue.
    3. Improves Customer Experience: With WHMCS, you get a centralized location to manage your client accounts and manage support tickets. Having a user friendly interface that makes it easy to perform the desired actions, and ask questions from support staff, leads to improved customer satisfaction.
    4. Easy to Use: WHMCS consolidates multiple tools and features into a single platform. This eliminates the need to switch between multiple tools to manage business operations. It also provides tutorials, guides, and support resources to help users quickly get up to speed with the platform.

    How Install WHMCS on RunCloud

    Creating an Empty Web app

    Log in to your RunCloud dashboard, and select the server you want to use. Click on the Web Application tab and then click on the “Deploy New Web Application” button.

    Choose a name for your web app, such as whmcs-app, and then select the web application owner. We recommend creating a new owner for each web application.

    Next, choose a domain name for your web app, such as whmcs.example.com, and make sure you have pointed it to your server’s IP address or hostname.

    Select the PHP version that you want to use. At the time of writing, WHMCS recommends using PHP 8.1. Finally, click on the Create Web Application button, and wait until your web app is created and ready to use.

    After creating the web application, you need to log into your server as the owner of the application via SSH, and navigate to the root directory of your web application. If you are not sure how to do this, we recommend reading How To Add a SSH Key and How To Use SSH Keys with PuTTY.

    Download WHMCS Binaries

    Prerequisite: You need to install and enable ionCube first. Follow our tutorial on installing ionCube Loader and confirm that you have it installed.

    After installing the ionCube Loader, you need to download and extract the WHMCS installation archive on your server. You can either download it to your personal computer and then move it to your server via FileZilla, or you can follow the instructions below to download it directly to your server if you’re feeling adventurous!

    To download the binary directly to your server, we will use the curl command. First, go to https://download.whmcs.com/ and open the DevTools page in your browser.

    In the DevTools windows, switch to the “Network” tab – any web requests that you make on download.whmcs.com will be recorded here.

    Next, go back to the download page and download the latest available binary – you need to have a valid license key to access this page.

    Choose the Full Release option, and click on the Download button. This will start downloading the zip file to your local computer. You can cancel the download if you like as we won’t be using the downloaded file.In the network tab, you should see a single request – this is the request that was made to download the zip file. Right click on the request, and go to Copy > Copy as Curl. If you are using Windows, you might see two options – select the “Copy as Curl (bash)”.

    If you followed the instructions correctly, you will have copied the curl request that contains the necessary cookies and request headers that are specific to your license key. We can paste this into your server terminal to make the same request again (i.e. download the file). After pasting it in the terminal, we need to specify the name of the file that will be downloaded. To do this, write -o whmcs_87.zip at the end of the command. The resulting command should look something like this:

    The above command will download the file to your server and save it as whmcs_87.zip. You can use the ll command to list all the files in the current directory.

    The above screenshot shows that a new zip file was created on the server. We can extract it using the unzip command. This will create another folder inside our application folder.

    We can quickly copy the necessary files to the root of the application folder, and remove the obsolete files such as the default index.html file and downloaded archive. We can also set permissions for the configuration file.

    You can execute the following commands to perform the above tasks, and terminate the session.

    unzip whmcs_87.zip # Unzip the downloaded file
    cp -r whmcs/* . # Copy installation files to correct directory
    rm -rf whmcs/ index.html whmcs_87.zip # Remove unnecessary files
    mv configuration.php.new configuration.php # Rename file
    chmod 400 configuration.php # Set Permissions
    exit # Close the SSH connection

    After executing the above commands, you can begin the installation process.

    Open your website in a web browser – you’ll see a welcome screen. Click on the install button to start the installation process.

    Note: If you receive an error message asking you to install ionCube loader, you should refer to our blog post: How To Install ionCube Loader (Step-by-Step Tutorial).

    On the next screen, you will need to provide your License key for the WHMCS installation – you can get this from the WHMCS dashboard under Services > My Licenses menu.Next you need to create a database and link it to your web application.

    After the installation is complete, you will see a success message, along with a list of steps to secure your installation. If you were not able to complete the installation successfully, you can refer to the troubleshooting guide by WHMCS.

    Logging in to the Dashboard

    After the installation is complete, you can log in to your dashboard to check everything is working properly. Go to the “PHP Version Compatibility” section in the left menu to confirm that everything is configured correctly.

    Next, click on the wrench icon on the top right and go to the “System Health” page to check your installation. Here you will see a list of warnings. We will resolve them one-by-one to secure your WHMCS installation.

    Securing WHMCS Installation

    Deleting the Installation Directory

    WHMCS recommends deleting the “install” directory after installation is complete. Go to the RunCloud file manager and click on the checkbox next to the “Install” directory, and then press “Delete”.

    Enable Necessary PHP Functions

    You might need to enable certain PHP functions that are blocked on RunCloud by default.

    Go to the “Settings” tab of your web application and scroll down to the “PHP settings” section. You can delete the required functions from the “disable_functions” list, and it will be enabled for that particular web application on your server.Don’t forget to click “Update PHP Settings” for the changes to take effect.

    Change Permissions for configuration.php

    If you are getting the “Insecure Permissions Check” message, you can update the file permissions using the RunCloud file manager.

    Simply click on the configuration.php file and then set the permissions to read only. Click on the “Change Permissions” to save the changes, and then refresh the WHMCS dashboard to see the changes.Note: If you configured the permissions via the command line earlier during installation, you won’t need to do this again.

    Rename Sensitive Directories

    We can further enhance the security of our WHMCS installation by moving certain sensitive directories to a different location. Although you can move the directories, a quick and easy way to achieve a similar level of security is by just renaming them to something obscure.

    Go to the RunCloud file manager and rename the following folders to anything you like:

    • templates_c
    • cons
    • admin

    We recommend adding a random string of alphanumeric characters either at the beginning or the end, rather than completely renaming it.

    After renaming the folders, we need to tell WHMCS where the new folders are located. To do this, add the following code snippet at the end of your configuration.php file. Make sure to replace the name of the folder with the name that you chose.

    $templates_compiledir = "/home/whmcs/webapps/whmcs/templates_c_22";
    $crons_dir = "/home/whmcs/webapps/whmcs/3f002g_crons/";
    $customadminpath = "3fw0047_admin";

    In the above example:

    • the templates_c directory was renamed to templates_c_22
    • the crons directory was renamed to 3f002g_crons
    • the admin directory was renamed to 3fw0047_admin

    Note: You don’t need to specify the entire path from the root of the server when changing the custom admin path.

    After editing, your configuration file should look similar to the following example:

    Save the file and refresh the WHMCS dashboard. Since we changed the admin directory, this will log you out of the dashboard.

    Log in to the dashboard again by navigating to the new admin URL in your browser. For example, if you renamed your admin folder to 3fw0047_admin then your login page will be located at example.com/3fw0047_admin/.

    Setting Up Cron Jobs

    WHMCS needs to execute certain code at regular intervals to function correctly. We need to configure a cron job to handle this.

    Click on the “Automation Status” (three cogs) button on the top right of the screen. This will show you the status of your cron jobs. Since we have just configured the server, the status might be okay but it will definitely show an error message after a few hours if you don’t configure the cron job.

    To configure the cron job, click on the “OK” card in the middle of the screen. This will show a pop-up that displays the status of your cron jobs, along with the command that you need to execute. Copy this command.

    Next, you need to navigate back to the RunCloud dashboard and click on the “Cronjob” button in the left-menu.

    Give your job a descriptive name, and provide the name of the web application owner that you specified while creating the application.

    Select the version of the PHP that your WHMCS installation is using, and then paste the copied command in the text box provided below. Make sure to remove the “php” from the start of the command as we have already specified a custom version of PHP for this.Finally, you need to specify the frequency of the job. From the drop-down menu, select “Use Custom Settings” and then type */5 in the minute text box.

    Click on the “Save Cron Job” to add it to your server. Check the WHMCS dashboard in a couple of hours – if the cron status is still “ok” then you have performed this step successfully.

    Block Access to Sensitive Directories

    WHMCS recommends blocking requests that are served directly from the vendor. We can create a new rule on our server that will deny access to visitors.

    On LiteSpeed servers, you can do this quickly by adding the following code to your LiteSpeed configuration:

    context /vendor/ {
    allowBrowse 0
    }

    After adding these lines, the configuration file should look something like this:

    For Nginx servers, you need to create a custom configuration to do this. Go to the “Nginx Config” page on your RunCloud dashboard, and create a new configuration. Provide a suitable name for the configuration, and then paste the following code:

    location ^~ /vendor/ {
        deny all;
        return 403;
    }

    After adding the configuration, you can press “Run and Debug” to test the configuration. If you get a success message, you can click “Save” to add the configuration to your server.

    Securing The Attachments and Downloads Directory

    You need to secure the attachments and downloads directory. This is where WHMCS will store any files that you upload or attach to your invoices, tickets, products, etc.

    The way you secure these files and directories will depend on how you want to store them.

    You might want to attach a different drive to your server to store this data, or save it on an S3 compatible storage service, such as AWS S3, DigitalOcean Spaces, etc. You can also use the default location inside your web app root directory, but you need to make sure it is not accessible from the web.

    We recommend referring to the official WHMCS documentation for this step, as it will guide you through the different options and scenarios.

    After Action Report

    WHMCS is a powerful and popular web hosting automation platform that can help you manage your clients, billing, support, domains, and more. However, it is not without its challenges and limitations. You might encounter issues with maintaining or upgrading your server.

    That’s why you need a reliable and efficient web hosting control panel to run your WHMCS web app.

    RunCloud is a cloud-based server management platform that can help you deploy, configure, optimize, and secure your web app on any cloud server. You can choose from various web application stacks and enjoy features such as SSL certificates, firewall, backup, cron jobs, SSH keys, and more.

    Working with RunCloud is easy and intuitive. You can create and manage your web app from a user-friendly dashboard, or use the API and CLI tools for more advanced tasks.

    You can also monitor your server’s health and performance with real-time graphs and alerts.

    RunCloud also provides excellent customer support and documentation to help you with any questions or issues.

    By using RunCloud to run your WHMCS web app, or any other web hosting automation platform, you can save time and improve your productivity. You can focus on growing your business and providing value to your customers, while RunCloud takes care of the technical aspects of your web app.

    RunCloud is the ultimate partner for web hosting automation – get started with RunCloud today!

  • How to Clone a WordPress Website (An Easy, Step-by-Step Guide)

    How to Clone a WordPress Website (An Easy, Step-by-Step Guide)

    Have you ever wondered how to create a duplicate WordPress website with all of the identical settings and configurations?

    This is where website cloning comes in.

    Website cloning is the process of creating an exact replica of an existing website. It’s a popular practice among website developers and designers to clone websites for both testing new features or designs, and building new websites faster.

    In this article, we’ll provide you with an easy, step-by-step guide on how to clone a WordPress website. Whether you’re a web developer, designer, or simply curious about cloning your website, this guide will show you exactly how to achieve this.

    How To Clone A WordPress Website

    To clone your WordPress website on RunCloud, you don’t need to install any additional plugins. The entire process from cloning the database to setting up the domain can be done entirely from within the RunCloud dashboard itself – and all within 60 seconds!

    Let’s see how to clone a WordPress site with RunCloud in under a minute.

    Go to your RunCloud dashboard and open the menu of the website that you want to clone. In the left submenu, look for the “Cloning” button to make a duplicate copy of your website.

    Cloning an application on RunCLoud

    If you have more than one server connected to your RunCloud account, you can deploy the clone to a different server. In the “Clone Web Application” submenu, select the name of the server where you want to deploy your new application.

    Next, make sure you check the “Clone Database” option to create a new database with all of the posts and comments. Once you check it off, a new dropdown menu will appear asking you to select the database that you want to clone – select the database starting with the name of your existing application.

    After selecting the database, you will need to give a descriptive name to it, and provide a suitable name for the web application (website).

    Cloning a website using RunCloud utility

    Once you have configured all the above settings, you’ll need to specify the owner of this new application. If this is a test website, we highly recommend you create a new user – this isolates the application in the event of a security breach – minimizing the exposure of other applications on the same server.

    Next, you need to configure the domain of your website. Specify the domain name that you want to use, and configure the DNS records for it. If you are using RunCloud’s Cloudflare integration, domain names can be configured automatically for your domain.

    However, if you don’t have a registered domain name yet, you can use RunCloud’s test domain and follow along with this tutorial.

    Configuring RunCloud cloning

    After you have added all of the necessary details, click on the “Clone Webapp” button to create a duplicate application and deploy it.

    Once you have cloned the app, you will be redirected back to the dashboard of your original WordPress site. Navigate back to the “Web Applications” tab of your server to see your newly created app.

    listing cloned applications on RunCloud

    After Action Report

    We hope this article on how to clone a WordPress website using RunCloud has been helpful to you. With our step-by-step instructions, you can easily clone any website and make changes to it without affecting the original site.

    If you are interested in learning how to create a WordPress staging site to test new features, we recommend reading our article on How to Create a Staging WordPress Site.

    We encourage you to start using RunCloud to manage your servers. With RunCloud, you don’t need the experience of a Linux administrator to manage your servers – you can easily clone websites, set up a staging environment, and launch your websites without ever needing to open up a Linux terminal. Start using RunCloud today!

    We hope you found this article useful and informative. Don’t hesitate to leave a comment or reach out to us on Twitter if you have any questions or feedback.

  • Containerized Core – A Seemingly Small (Yet Important) Improvement To Server Management

    Containerized Core – A Seemingly Small (Yet Important) Improvement To Server Management

    Docker is a technology that allows you to run applications in isolated environments called containers.

    Containers are lightweight, portable, and scalable, making them ideal for cloud-native development and deployment.

    Did you know that containerization saw a massive leap in adoption in 2022, with over 31% of developers worldwide stating that they are running container technologies?

    RunCloud Docker is a server that leverages the popular Docker technology to isolate most of your application dependencies such as Redis, MariaDB, NGINX, PHP, and beyond from the operating system level.

    This makes your applications more secure and easier to manage.

    But beyond that, this is a big under-the-hood improvement that stands to allow us to continue leveling up on how you manage your servers with RunCloud.

    RunCloud provides a simple interface to start and stop these predefined containers. Your web applications are further protected by facl, a UNIX interface to manage access, which prevents them from accessing each other’s files and folders.

    Containerized Core is now out of beta and in early access.

    This means it’s safe to use in production (while there may still be rare edge-case scenarios as it rolls out across the board).

    It’s no longer necessary to be a Linux expert anymore to be able to enjoy the flexibility and security of containerized applications.

    Before we proceed, it is important to note that Docker server runs on a containerized environment without a built-in firewall. To secure your server, you need to configure the firewall provided by your cloud provider. If you use DigitalOcean, Linode, Vultr, or AWS Lightsail, RunCloud makes it easy for you to do that from the dashboard itself.

    If you attempt to configure firewall on a containerized container, you will get the error message shown in the above screenshot.

    How To Use Docker On RunCloud

    RunCloud allows you to easily manage and deploy your web applications on any cloud provider that provides a network firewall using Docker.

    To use Docker on RunCloud, you need to create a new server and select the Docker option during the setup installation.

    You cannot use Docker on existing servers that are already managed by RunCloud. This is because RunCloud needs to install some packages and configurations that are specific to Docker and may conflict with your existing setup.

    Here are the steps needed to create a new server with Docker on RunCloud:

    1. Log in to your RunCloud account and click on the “Connect a Server” button.
    2. Choose your cloud provider and select the provision method. We recommend using RunCloud’s automatic provisioning feature for a painless installation.
    3. In the “Installation Type” section, select the Docker option. Currently, this method only supports Nginx servers.
    Installing docker server
    1. The next steps will differ slightly depending on your installation method. If you picked the automatic installation, you can select your server configuration and deploy it directly from within the RunCloud dashboard.

      If you selected the manual installation, you’ll need to log in to your virtual machine via SSH and run the installation script.

      Either way, it’s a straightforward process; refer to our blog post about the installation process for more information.
    2. Once your server is ready, you can access it from the RunCloud dashboard and start using Docker.

    How Docker Enhances Security

    Docker provides better security for your application by isolating it from the host operating system and other applications on the same server. Docker containers have their own file system, network stack, and process space, which limits the access and impact of a potential attacker.

    Docker also supports various security features that can restrict the capabilities and resources of a container.

    For example, if you run a WordPress site in a Docker container and it gets hacked by a malicious actor, the hacker will not be able to interact with the host operating system or other containers on the same server. The hacker will be trapped in the container, and will only have access to the files and processes within it.

    In this way, you can protect your server and other applications from being compromised or damaged by a security breach.

    How to Upgrade to RunCloud Docker

    As we mentioned earlier, if you are using the native variant of RunCloud and want to upgrade to RunCloud Docker, you’ll need to create a new server with Docker, and clone your existing applications from your old server to your new server.

    If you don’t have a server with Docker installed, go back to the How To Use Docker On RunCloud section.   

    Here are the steps to upgrade from the native servers to RunCloud Docker:

    1. Once your new server is ready, you can clone your existing applications from your old server to your new server. To do this, go to the Applications tab on your old server and click on the “Cloning” button. You need to do this individually for each application that you want to clone.

    In the above example, the server using Nginx was named “nginx” and the server using Docker was named “docker” for demonstration purposes. These names will vary depending upon your setup.

    1. Choose your new server as the destination, and enter a name for the cloned application. You can also choose whether to clone the database and the files of the application. If you are cloning a web application that relies on a database (e.g. WordPress), you must select this option.

    Select the database that you want to clone from the drop down menu. The name of the database is generally similar to the name of the application. After this, provide a new name for your database and web application – this will be displayed in the RunCloud dashboard under your new server.

    1. After this, you need to select the user account on your server that will be the owner of your web application. You can either pick one of the existing users, or create a new user.
    1. Finally, you need to configure the domain name of your application. We recommend using a test domain during migration. This will allow you to access your containerized application and, in the meantime, all the existing traffic will continue to go to your old servers. Once you are satisfied, you can update your test domain. 
    2. Click on the Clone Application button and wait for RunCloud to clone your application to your new server. Repeat the above steps for each application you want to clone from your old server to your new server.
    3. Once you have cloned all your applications, you’ll need to update the DNS records of your domains to point to your new server. To do this, you can either use RunCloud’s Cloudflare integration, or go to your domain registrar or DNS provider and change the A records or CNAME records of your domains to point to the IP address of your new server.
    4. Wait for the DNS changes to propagate, and verify that your applications are working properly on your new server. If you are planning this ahead of time, you should also read our guide on How To Speed Up DNS Propagation.

    You have successfully upgraded from the native variant to Containerized Core.

    You can now enjoy the benefits of using Docker containers on your new server. You can also log in to your server via SSH to access your new server, and manage your containers via Docker CLI.

    Conclusion

    Docker is an incredibly powerful tool for creating and running applications in containers. With this improvement to RunCloud’s core powered by containerization – we’re beyond excited for you all to take advantage of the benefits of containerization as well as what this means for the future of managing your infrastructure on RunCloud.

    The RunCloud team is committed to delivering the best possible experience to our users across the board. We welcome your feedback and suggestions on how to make it better for you. Please feel free to reach out to us, or join our community forum to share your thoughts and experiences.

    You don’t need to be a Linux expert anymore to enjoy the benefits of Docker. With RunCloud, you can create and run isolated web applications with just a few clicks.

    Sign up today and see for yourself how easy and convenient it is to use Docker on RunCloud.