Install Server

Steps

Step 1 - Setup Server & Firewall

Step 2 - Install Software

Step 3 - Setup Admin Account

Step 4 - Integrate your email server (optional)


Setup Server & Firewall

Requirements

HardwareMinimumRecommended
Operating System64-bit intel linux with docker installed64-bit intel Ubuntu Server LTS
CPU2 core4 core
Memory4GB8GB (+4GB per 10K requests/hour)
Hard Drive5GB (installer)20GB (~10GB per 7 day log retention)
Trusted SSL Certificate on ServerInstall CA certificates in Ubuntu serverinstructons
Web Portal BrowserAny modern browserChrome, Edge, Firefox



Open ports when running in a dmz or public cloud

  • UDP 51871 (wireguard vpn)
  • 443 (optional - allows public web portal access)
sudo ufw allow 51871/udp
sudo ufw allow 443
sudo ufw enable
sudo ufw status

Open ports when accessed inside a firewall

  • 22,443,80
  • Desired Database Proxy ports (optional)
    • 5432 (Postgres)
    • 1433 (SQL Server)
    • 3306 (MySQL)
    • 1521 (Oracle)
    • 28017 (Mongo)
    • 1527 (Other JDBC)
sudo ufw allow 22
sudo ufw allow 443
sudo ufw allow 5432
sudo ufw allow 1433
sudo ufw allow 3306
sudo ufw allow 1521
sudo ufw allow 28017
sudo ufw allow 1527
sudo ufw enable
sudo ufw status

Confirm IP access for desired integrations

From your mamori server confirm you can access

Email - your SMTP server

LDAP/AD - your AD/LDAP server

Mobile Push 2FA - https://fcm.googleapis.com/fcm/send

Other - your target databases and servers


Install Statement

sudo docker pull iomamori/mamori-all-in-one:latest

sudo docker create \
  --log-opt max-size=10m --log-opt max-file=5 \
  --network host \
  --restart always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v mamori-var:/opt/mamori/var \
  -v mamori-nginx-conf:/etc/nginx \
  -v mamori-data:/var/lib/postgresql \
  -v mamori-pg-conf:/etc/postgresql \
  -v mamori-influxdb:/opt/mamori/influxdb \
  -v mamori-influxdb-data:/var/lib/influxdb \
  -v mamori-grafana:/opt/mamori/grafana \
  -v /proc:/host/proc:ro \
  --name mamori iomamori/mamori-all-in-one:latest /sbin/my_init

sudo docker start mamori


Setup Admin Account

Login

Login to the mamori portal with the bootstrap login

url : https://[mamori server ip address]

username : root password : Mamori2021

Create admin user

Click Users

Click

Next, enter details in user dialog

details - login id, email, password and select administrator user profile

Click Create

Set 2FA - Click on edit authentication and set multi-factor authentication

Test Login

Logout & log in as new user

Disable Bootstrap Admin Account

Click Server Settings > Authentication Providers

Click for admin provider in list

Edit dialog options

Account Status Enabled - set to false

Click Update


Integrate email server

Integrating an email server will enable the following features

  • Email alerts
  • User login account emails
  • User remote access key emails

If you don't have an email server, then sendgrid.com offers a free plan. Click here to register

To integrate your email server

Click Server Settings

Click SMTP Settings

Next, enter SMTP server details

FieldDescription
Mamori Server URLdefaults to https://[your mamori server ip]
From Addressdefaults to no-reply@mamori.com
Server Hostnameyour smtp server
Server Portdefaults to 587
Use SSLdefaults to false
Server Credentials

Click Update Settings

Click Send Test Email


Helpful Scripts

Upgrade

upgrade.sh
#!/bin/bash

sudo docker stop mamori
sudo docker rename mamori mamori-`date +%s`

sudo docker pull iomamori/mamori-all-in-one:latest


sudo docker create \
        --log-opt max-size=10m --log-opt max-file=5 \
        --network host \
        --restart always \
        -v /var/run/docker.sock:/var/run/docker.sock \
        -v mamori-var:/opt/mamori/var \
        -v mamori-nginx-conf:/etc/nginx \
        -v mamori-data:/var/lib/postgresql \
        -v mamori-pg-conf:/etc/postgresql \
        -v mamori-influxdb:/opt/mamori/influxdb \
        -v mamori-influxdb-data:/var/lib/influxdb \
        -v mamori-grafana:/opt/mamori/grafana \
        -v /proc:/host/proc:ro \
        --name mamori iomamori/mamori-all-in-one:latest /sbin/my_init


sudo docker start mamori

Uninstall

uninstall.sh
#!/bin/bash

sudo docker kill mamori
sudo docker kill mamori-wireguard

sudo docker rm mamori mamori-wireguard
sudo docker rmi iomamori/mamori-all-in-one mamori-wireguard mamori-alpine-boringtun
sudo docker volume rm \
        mamori-var \
        mamori-nginx-conf \
        mamori-data \
        mamori-pg-conf \
        mamori-influxdb \
        mamori-influxdb-data \
    mamori-influxdb-conf \
        mamori-grafana

High Availability

Steps

Step 1 - Setup PG Cluster

Step 2 - Install Metric DB & MQTT Server

Step 3 - Install Mamori Base with HA Option

Step 4 - Install & Configure Load Balancer

Edit this page on GitHub Updated at Sun, Oct 17, 2021