Search
Close this search box.

How to Install Cachet Status Page System on Debian 12

Table of Contents

Setting up a reliable status page is crucial for keeping users informed about the health and availability of your services. Cachet is an open-source status page system that makes it easy to monitor and communicate system statuses. In this guide, we will walk you through the step-by-step process of installing the Cachet Status Page System on Debian 12, ensuring you have a professional and effective way to manage your service uptime and incidents.

 

To start, make sure you’ve created a VPSie account if you haven’t already. Next, proceed by deploying an Debian 12 server configured to meet your specific needs.

 

Once the server is deployed, SSH into the command line interface. Before installing any packages, it’s essential to update your system’s package list to ensure you have access to the latest versions. Open a terminal and run the following command:

sudo apt-get update -y

Installing Docker Engine

First, update the package index and install the required packages, curl and ca-certificates, by running the following command:

sudo apt-get install -y ca-certificates curl gnupg

 

Add Docker’s Official GPG Key by creating directory for the Docker GPG key and add it:

sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

 

Next, configure the Docker repository by running the following command:

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

 

After setting up the repository, update the package index and install Docker Engine along with other necessary components:

sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

 

Run the following comamnd to log in as the root user (if you aren’t already):

su -
 
Finally, verify that Docker is installed correctly by running the following command:
sudo docker run hello-world

 

This will execute a test container and confirm the successful installation of Docker on your Debian 12 system.

Run Cachet

Now download the Cachet project and navigate into the cachet-docker directory,

 

 

Create the cachet-docker directory:

mkdir cachet-docker

 

 

Change to the cachet-docker directory:

cd cachet-docker

 

 

You can clone the Cachet GitHub repository using git. Make sure you have git installed.

git clone https://github.com/CachetHQ/Docker.git .

 

This will clone the Cachet project into the cachet-docker directory.

 

 

Now, Open the docker-compose.yml file using the nano editor with the following command:

nano docker-compose.yml

 

 

Change the default host port to 8000 by updating the ports section like this:

ports:
- 8000:8000

 

You can also customize the database details according to your requirements. For now, keep the Cachet version at 3.

 

 

After making your changes, save the file and exit the editor.

 

 

Finally, build your Cachet image and start the containers for both Cachet and PostgreSQL using these Docker commands:

docker compose build
docker compose up

In the verbose logs from the Cachet container, you may see an error related to the APP_KEY configuration. Copy the generated APP_KEY, then press Ctrl+C to stop the containers.

Next, reopen the docker-compose.yml file with the nano editor:

nano docker-compose.yml

 

 

Update the APP_KEY parameter to include the base64 string, like this:

APP_KEY=base64:uJg5pnABoi0slHeeCZ8ehQ0BxF35oBQfNiPSopqrQQw=

Save the file and exit the editor.

 

 

Then, use the following Docker commands to stop the Cachet and PostgreSQL containers and start them again:

docker compose down
docker compose up -d

 

 

Once the containers are running, check their status with:

docker compose ps

 

 

You should see both Cachet and PostgreSQL containers listed, with Cachet running on port 8000.

Configure Nginx as a reverse proxy

To set up Nginx as a reverse proxy for Cachet running in a container on port 8000, follow these steps:

 

If you haven’t installed Nginx yet, you can do so with the following commands:

sudo apt install nginx

 

Create a new Nginx configuration file for Cachet:

sudo nano /etc/nginx/sites-available/cachet

 

Add the following configuration to the file:

				
					server {
    listen 80;
    server_name your_domain_or_IP;

    location / {
        proxy_pass http://localhost:8000; # Forward requests to the Cachet container
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    # Optional: Handle SSL/TLS termination (if you plan to use HTTPS)
    # Uncomment the lines below if you have SSL certificates

    # listen 443 ssl;
    # ssl_certificate /etc/ssl/certs/your_certificate.crt;
    # ssl_certificate_key /etc/ssl/private/your_private_key.key;

    # location / {
    #     proxy_pass http://localhost:8000;
    #     proxy_set_header Host $host;
    #     proxy_set_header X-Real-IP $remote_addr;
    #     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    #     proxy_set_header X-Forwarded-Proto $scheme;
    # }
}
				
			

Replace your_domain_or_IP with your domain name or IP address. If you’re using HTTPS, you will need to configure SSL certificates as indicated in the optional section.

 

Now, Enable the Nginx Configuration by Linking the configuration file to sites-enabled:

sudo ln -s /etc/nginx/sites-available/cachet /etc/nginx/sites-enabled/

 

Before restarting Nginx, make sure there are no syntax errors in your configuration:

sudo nginx -t

 

Apply the new configuration by restarting Nginx:

sudo systemctl restart nginx

Install Cachet

Open your web browser and navigate to http://{domain/IP} to access your Cachet installation. If everything is set up correctly, you should see the setup page.

 

Choose the Database option as the default for Cache Driver, Queue Driver, and Session Driver. After that, provide the necessary details for your mail server configuration and Click Next to proceed.

Now set up the status page name, default timezone, and the default language. Then click Next again.

To create a new admin user for Cachet, enter your username, email, and password. Afterward, click on Complete Setup to finalize the process.

Please log in to Cachet using your username and password, and then click the Login button.



To wrap things up, installing the Cachet Status Page System on Debian 12 is a straightforward process. By following the outlined steps, you can easily set up a status page to monitor and communicate the status of your services. With Cachet, you’ll have a professional way to keep your users informed about any service issues or updates.

Make a Comment
Share on
Facebook
Twitter
LinkedIn
Print
VPSie Cloud service

Fast and Secure Cloud VPS Service

Try FREE
For a month

The First 1 orders gets free discount today! Try Sign up on VPSie to get a chance to get the discount.