AWS Elastic Beanstalk Docker Setup

The following instructions use Docker to install Mattermost in Preview Mode for exploring product functionality. This configuration should not be used in production.

  1. From your AWS console select Elastic Beanstalk under the Compute section.
  2. Select Create New Application from the top right.
  3. Name your Elastic Beanstalk application and click Next,
  4. Select Create web server on the New Environment page.
  5. If asked, select Create an IAM role and instance profile, then click Next.
  6. On the Environment Type page,
    1. Set Predefined Configuration to Multi-Container Docker under the generic heading in the drop-down list.
    2. Set Environment Type to Single instance in the drop-down list.
    3. Click Next.
  7. For Application Source, select Upload your own and upload the Dockerrun.aws.json file from https://raw.githubusercontent.com/mattermost/mattermost-docker/master/contrib/aws/Dockerrun.aws.json (select version you’d like to use), then click Next.
  8. Type an Environment Name and URL. Make sure the URL is available by clicking Check availability, then click Next.
  9. The options on the Additional Resources page may be left at default unless you wish to change them. Click Next.
  10. On the Configuration Details page,
    1. Select an Instance Type of t2.small or larger.
    2. The remaining options may be left at their default values unless you wish to change them. Click Next.
  11. Environment tags may be left blank. Click Next.
  12. You will be asked to review your information, then click Launch.
  13. It may take a few minutes for beanstalk to launch your environment. If the launch is successful, you will see a see a large green checkmark and the Health status should change to “Green”.
  14. Test your environment by clicking the domain link next to your application name at the top of the dashboard. Alternatively, enter the domain into your browser in the form http://<your-ebs-application-url>.elasticbeanstalk.com. You can also map your own domain if you wish. If everything is working correctly, the domain should navigate you to the Mattermost signup page. Enjoy exploring Mattermost!

Configuration Settings

See Configuration Settings documentation to customize your deployment.

Sample SMTP Settings

Amazon SES

  • Set SMTP Username to [YOUR_SMTP_USERNAME]
  • Set SMTP Password to [YOUR_SMTP_PASSWORD]
  • Set SMTP Server to email-smtp.us-east-1.amazonaws.com
  • Set SMTP Port to 465
  • Set Connection Security to TLS

Postfix

  • Make sure Postfix is installed on the machine where Mattermost is installed
  • Set SMTP Username to (empty)
  • Set SMTP Password to (empty)
  • Set SMTP Server to localhost
  • Set SMTP Port to 25
  • Set Connection Security to (empty)

Gmail

  • Set SMTP Username to your_email@gmail.com
  • Set SMTP Password to your_password
  • Set SMTP Server to smtp.gmail.com
  • Set SMTP Port to 587
  • Set Connection Security to STARTTLS

Hotmail

  • Set SMTP Username to your_email@hotmail.com
  • Set SMTP Password to your_password
  • Set SMTP Server to smtp-mail.outlook.com
  • Set SMTP Port to 587
  • Set Connection Security to STARTTLS

Office365 / Outlook

  • Set SMTP Username to your_email@hotmail.com
  • Set SMTP Password to your_password
  • Set SMTP Server Name to smtp.office365.com
  • Set SMTP Port to 587
  • Set Connection Security to STARTTLS

Troubleshooting SMTP

TLS/STARTTLS Requirements

If you fill in SMTP Username and SMTP Password then you must set Connection Security to TLS or to STARTTLS

Troubleshooting using Logs

If you have issues with your SMTP install, from your Mattermost team site go to the main menu and open System Console -> Logs to look for error messages related to your setup. You can do a search for the error code to narrow down the issue. Sometimes ISPs require nuanced setups for SMTP and error codes can hint at how to make the proper adjustments.

For example, if System Console -> Logs has an error code reading:

Connection unsuccessful: Failed to add to email address - 554 5.7.1 <unknown[IP-ADDRESS]>: Client host rejected: Access denied

Search for 554 5.7.1 error and Client host rejected: Access denied.

Checking your SMTP server is reachable

  • Attempt to telnet to the email service to make sure the server is reachable.

  • You must run the following commands from the same machine or virtual instance where mattermost/bin/mattermost is located. So if you’re running Mattermost from Docker you need to docker exec -ti mattermost-dev /bin/bash

  • Telnet to the email server with telnet mail.example.com 25. If the command works you should see something like

    Trying 24.121.12.143...
    Connected to mail.example.com.
    220 mail.example.com NO UCE ESMTP
    
  • Then type something like HELO <your mail server domain>. If the command works you should see something like

    250-mail.example.com NO UCE
    250-STARTTLS
    250-PIPELINING
    250 8BITMIME
    

Note

For additional troubleshooting tips, see the troubleshooting guide. To submit an improvement or correction, click Edit at the top of this page.