﻿<a id="mmmsg-installation"></a>
<a id="mmmsg_installation"></a>

# Installation Guide

<a id="mmmsg-requirements"></a>

## Requirements

You run MMMSG service you need the following:

1. A reasonably recent server with Debian 13 Trixie and enough disk space.
2. Hostname for the server and TLS certificate for it.

<a id="mmmsg-adding-repo"></a>

## Adding Repository

!!! note
    These instructions are the same as for our [SIPIS repository](../sipis/installation.md#sipis-adding-repo).

Add our key and repository to Debian:

1. Download the file from https://dist.acrobits.net/debian/acrobits-2026.gpg.key and save it as `/etc/apt/keyrings/acrobits.gpg.key`

    ```bash
    wget -O /etc/apt/keyrings/acrobits.gpg.key https://dist.acrobits.cz/debian/acrobits-2026.gpg.key
    ```

    The fingerprint of our key is **C0F2 D6C7 A178 6E70 9B13  C2C4 4B28 4263 A96B 7D0D**

!!! note
    The key changed in the early 2026. The fingerprint for the previous key (still used for older Debian versions) was **1DB8 E683 A6F4 919B BFF1  6A7C FFCC BAF7 9FF5 CF45**
    and can be found [here](https://dist.acrobits.net/debian/acrobits.gpg.key)

2. Create a new file `/etc/apt/auth.conf.d/Acrobits.conf` with the following content:

    ```
    machine dist.acrobits.net
    login YOUR_USERNAME
    password YOUR_PASSWORD
    ```

!!! note
    You will get a username and password from Acrobits representative.

!!! note
    If you have SIPIS installation, you can use the same username and password.

3. Create a new file `/etc/apt/sources.list.d/Acrobits.sources` with the following content:

    ```
    Types: deb
    URIs: https://dist.acrobits.net/debian
    Suites: trixie
    Components: main
    Signed-By: /etc/apt/keyrings/acrobits.gpg.key
    ```

4. Run `apt-get update`

## Installing mmmsg

Run

```bash
apt-get install mmmsg2
```

## Configuring MMMSG

The configuration file is `/etc/acrobits/mmmsg2/Settings.xml`.
You need to replace mmmsg.example.com with domain name of your server as a base url.

The other settings are set to sensible defaults and can be kept as they are.

## Setting up TLS

MMMSG service by default listens on port 8920 without encryption. We recommend you use TLS proxy, either stunnel or nginx and we describe their configuration in this document.

### Nginx as a TLS proxy

Install nginx (`apt-get install nginx`) and copy the file `/usr/share/doc/mmmsg2/nginx-config.conf` into `/etc/nginx/sites-enabled/mmmsg.conf`. Edit it and change the parameters `ssl_certificate` and `ssl_certificate_key` so that they point to certificate and key pair for your hostname. Also change `server_name` parameter to your server's hostname. Then reload nginx configuration (`systemctl reload nginx.service`).

!!! note
    Keep the settings `proxy_request_buffering` and `proxy_buffering` turned `off`.

## Running the service

To start the service run the following command:

```bash
systemctl start mmmsg2.service
```

!!! note
    To make the service start automatically on computer start run
    `systemctl enable mmmsg2.service`

To stop the service run:

```bash
systemctl stop mmmsg2.service
```