# Getting started

# Installation

You can install Airmail either locally or deploy it over a cloud service.

# Docker installation

Run the image directly

docker run ghcr.io/hedge10/airmail

Or use it with Docker Compose (opens new window) and paste this into your docker-compose.yml.

version: "3.9"

services:
  airmail:
    image: ghcr.io/hedge10/airmail
    ports:
      - "9900:9900"

# Local installation

Head over to the releases page (opens new window) on Github grab the version suitable for your operating system.

# Configuration reference

Airmail is configured via environment variables. Please see the following reference for individual setup.

Environment variable Default value Description
AM_HOST none IP address the web server listens on
AM_PORT 9900 Port the web server listens on
AM_SMTP_HOST 127.0.0.1 SMTP host
AM_SMTP_HOST 25 SMTP port
AM_SMTP_USER none SMTP username
AM_SMTP_PASS none SMTP password
AM_SMTP_AUTH_MECHANISM none SMTP auth mechanism, possible options: none, plain
AM_DEBUG false Enable more logging output
AM_ENV dev Set the stage airmail is running on
AM_GRECAPTCHA_SECRET none See captcha section
AM_USE_STORAGE false Store your messages after sending it
AM_STORAGE_TYPE mongodb Only mongodb is currently supported
AM_MONGODB_HOST localhost MongoDB host
AM_MONGODB_PORT 27017 MongoDB port
AM_MONGODB_DB airmail MongoDB database
AM_MONGODB_COLLECTION messages MongoDB collection
AM_MONGODB_USERNAME none Username for MongoDB authentication
AM_MONGODB_PASSWORD none Password for MongoDB authentication