> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mastermindcms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Server Installation

> Install MastermindCMS on a Linux server for production use

This guide explains how to install **MastermindCMS** on a Linux server for **production environments**.

The server installation gives you:

* Full control over infrastructure
* Better performance and scalability
* Integration with reverse proxies, SSL, and monitoring

***

## Prerequisites

Before you start, make sure you have:

* A Linux server **(RHEL/CentOS, Debian/Ubuntu)**
* Root or sudo access
* A public domain or subdomain
* Open ports **80** and **443**
* MongoDB installed directly on the server

***

## Step 1: Setup Local YUM Repository

Now on your UnixOS client machines, add your local repos to the YUM configuration.

### RHEL/CentOS

```shell theme={null}
vim /etc/yum.repos.d/local-repos.repo
```

Copy and paste the configuration below in the file **local-repos.repo** (make changes where necessary).

```ini theme={null}
[local-dreamcloud]
name=Dreamcloud Repo
baseurl=https://repouser:welcome@repos.mastermindcms.com/rpms
enabled=1
gpgcheck=0
```

Save the file and start using your local YUM mirrors.

Next, run the following command to view your local repos in the list of available YUM repos, on the client machines.

```shell theme={null}
yum repolist all
```

### Debian/Ubuntu

Import the public key into apt and add the repo to the sources.

```shell theme={null}
sudo apt-get install gnupg
wget -qO - https://<user>:<password>@repos.mastermindcms.com/debian/debian-repo-public.gpg | sudo apt-key add -
echo "deb https://repouser:welcome@repos.mastermindcms.com/debian/ / " > /etc/apt/sources.list.d/dreamcloud-repo.list
```

Update the available package list.

```shell theme={null}
sudo apt-get update
```

## Step 2: Install MSM2 Application

### RHEL/CentOS

Run the following command to install the **MSM2** application on your server.

```shell theme={null}
yum install msm2-application
```

Run MSM2 Application with command below:

```shell theme={null}
service msm2-application start
```

### Debian/Ubuntu

Run the following command to install the **MSM2** application on your server.

```shell theme={null}
apt-get install msm2-application
```

Run MSM2 Application with command below:

```shell theme={null}
service msm2-application start
```
