Installing Checkmate
Last updated
Was this helpful?
Last updated
Was this helpful?
Installing Checkmate is a fairly straightforward process on a Linux machine. There are many installation options though, which may be overwhelming. Here is a breakdown of all the options:
If you'd like to deploy on a Linux server, we suggest you go with Combined FE/BE Docker option. This keeps backend and frontend on one Docker, and Redis and MongoDB on two other Docker services.
If you want to deploy on a Linux server, but want to keep frontend and backend on two separate Docker images, then go with Separate FE/BE option. Note that this installation method may not be as straightforward as the first oe.
(For developers), there is also a 3rd option for developers who want to work on the application, e.g extend and test it.
In this installation, the React front-end is served from the API server. There is no Client image as it is not required. Note that this is still a React SPA and is served to your browser where it runs.
Requests to the API server are made from your browser. If that is on a different machine than your API server, then you must configure the API URL appropriately.
To get started:
Download the .
Run docker compose up
to start the application.
Your application will spin up at http://localhost:52345
Configuration remains the same as the regular server, with two additional frontend ENV vars:
UPTIME_APP_API_BASE_URL: http://localhost:52345/api/v1
UPTIME_APP_CLIENT_HOST: http://localhost
NOTE:
If you’d like to host your Checkmate instance somewhere other than the machine your browser is running on, you will need to update these vars. As an example, if you were hosting at 143.110.231.94
, use the following variables:
Where,
UPTIME_APP_API_BASE_URL points the client to the server
UPTIME_APP_CLIENT_HOST is used for building some links that point to the client
CLIENT_HOST is the origin that the API server will approve requests from
If you are upgrading from a previous deployment:
As long as you mount the same directories to the MongoDB image you'll retain your data.
The Mongo part of the application remains unchanged.
You can always back up your data directory as well before migration.
In this installation, the React front-end is served by an Nginx Docker image (named Client) and is independent of the API server.
Note that if you want to configure Nginx, you will have to mount a volume to the Client image to override the default config:
Run docker compose up
to start the application
Now the application is running at http://localhost
Optional config:
If you want to monitor Docker containers, uncomment this line in docker-compose.yaml
:
This gives the app access to your docker daemon via unix socket, please be aware of what you are doing.
Edit the UPTIME_APP_API_BASE_URL
variable in the docker-compose file to point to your remote server.
Run docker compose up
to start the application
Now the application is running at http://<remote_server_ip>
Optional config:
If you want to monitor Docker containers, uncomment this line in docker-compose.yaml
:
This gives the app access to your docker daemon via unix socket, please be aware of what you are doing.
This is like option 2, but for Windows machines.
Fork the repository: Go to the Checkmate GitHub repository and fork it to your account.
Clone the repository: Open your terminal or command prompt and run:
Navigate to the server directory:
cd server
Install dependencies:
npm install
Create a .env
File: Add a .env
file in the server
directory to hold your server secrets.
Navigate to the main directory:
cd ..
Build Docker Images:
Navigate to the docker/dev directory:
cd server/docker/dev
Run Docker containers:
Navigate to the server directory:
cd into server.
Run the development server:
npm run dev
Your backend should now be up and running.
Navigate to the client directory:
cd client
Install dependencies:
npm install
Create a .env
File: Add a .env
file in the client
directory to hold your client secrets.
Run the client (a.k.a frontend):
npm run dev
Your frontend should now be up and running.
When you’re working on the app locally, it’s painful to rebuild and reload Docker images every time you tweak the client or server. Instead, run those services directly on your host machine—this gives you instant feedback and lets you use hot-reload without waiting for image builds.
At the same time, we still include Redis and MongoDB as Docker containers. Those services rarely change, so keeping them in containers simplifies setup and avoids cluttering your host environment.
Make sure you change the directory to the specified directories, as paths in commands are relative.
This application requires a MongoDB instance and a Redis instance. If you want, you can use our Docker images. Otherwise, you can provide your instances as well.
From your checkmate
directory you created above, cd into server/docker/dev
.
Run build_images.sh
Run docker run -d -p 6379:6379 -v $(pwd)/redis/data:/data --name uptime_redis uptime_redis
Run docker run -d -p 27017:27017 -v $(pwd)/mongo/data:/data/db --name uptime_database_mongo uptime_database_mongo
The default Checkmate Redis Docker image does not include authentication. If your setup requires authentication (e.g, especially if you expose the server on a public IP), you need to configure it manually.
The server requires some configuration to run.
From your checkmate
directory, CD into the server
directory.
Run npm install
.
In the server
directory, create a .env
file to hold your configuration. This is where you'll add your environment variables.
Start the server
by running npm run dev
.
The client also requires some configuration in order to run.
From your checkmate
directory, CD into the client
directory.
Run npm install
.
In the client
directory, create a .env
file to hold your configuration. This is where you'll add your environment variables.
Start the client
by running npm run dev
The client
is running at localhost:5173
(unless you changed the default port).
The server
is running at localhost:52345
(unless you changed the default port).
Change directory to the Client
directory
Install all dependencies by running npm install
Add a .env
file to the Client
directory with the following options:
VITE_APP_API_BASE_URL
Required
string
Base URL of server
{host}/api/v1
VITE_APP_LOG_LEVEL
Optional
string
Log level
"none"
|"error"
| "warn"
|
VITE_APP_DEMO
Optional
boolean
Demo server or not
true
|false
|
Sample ENV file:
Change the directory to the Server
directory
Install all dependencies by running npm install
Add a .env
file to the Server
directory with the following options:
Configure the server with the following environmental variables. Note that those variables need to be set in .env
files if you are running the local development server, or in the Docker compose file if you use docker compose.
CLIENT_HOST
Required
string
Frontend Host
JWT_SECRET
Required
string
JWT secret
REFRESH_TOKEN_SECRET
Required
string
Refresh JWT secret
DB_TYPE
Optional
string
Specify DB to use
MongoDB | FakeDB
DB_CONNECTION_STRING
Required
string
Specifies URL for MongoDB Database
PORT
Optional
integer
Specifies Port for Server
LOGIN_PAGE_URL
Required
string
Login url to be used in emailing service
REDIS_HOST
Required
string
Host address for Redis database
REDIS_PORT
Required
integer
Port for Redis database
TOKEN_TTL
Optional
string
Time for token to live
In vercel/ms format https://github.com/vercel/ms
REFRESH_TOKEN_TTL
Optional
string
Time for refresh token to live
PAGESPEED_API_KEY
Deprecated
API Key for PageSpeed requests
This API key can be set up in Settings.
SYSTEM_EMAIL_HOST
Required
string
Host to send System Emails From
SYSTEM_EMAIL_PORT
Required
number
Port for System Email Host
SYSTEM_EMAIL_ADDRESS
Required
string
System Email Address
SYSTEM_EMAIL_PASSWORD
Required
string
System Email Password
Sample env file
You can see the documentation on your local development server at http://localhost:{port}/api-docs
Errors are returned in a standard format:
{"success": false, "msg": "No token provided"}
Errors are handled by error handling middleware and should be thrown with the following parameters
status
integer
500
Standard HTTP codes
message
string
"Something went wrong"
An error message
service
string
"Unknown Service"
Name of service that threw the error
Example:
Errors should not be handled at the controller level and should be left to the middleware to handle.
Download our
Download our
This application consists of a frontend (client) and a backend (server) in a single repository. Start by cloning the , as it contains everything you need, except the if you plan to use the Infrastructure Monitoring feature.
Add the .
Add the .
Note that for the Pagespeed feature to work, you need a
Our API is documented in accordance with the .
You can also view the documentation on our demo server .