AWS Elastic Beanstalk Docker setup

plans-img Available on all plans

deployment-img self-hosted deployments

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

The Elastic Beanstalk application creation process used here is the easy Getting Started approach which combines Application and Environment creation in the same flow.

  1. From your AWS console select Elastic Beanstalk.

  2. Select the Create Application button on the Elastic Beanstalk home page.

  3. Enter an Application name for the Elastic Beanstalk application.

  4. (Optional) Specify Application tags.

  5. Select Docker for the Platform.

  6. Choose Docker running on 64bit Amazon Linux 2 for the Platform branch. Note that multi-container Docker is now deprecated.

  7. Leave the platform version preselected as 3.4.8 (Recommended).

  8. For Application code, select Upload your code.

  9. Download the Dockerrun.aws.json file from https://raw.githubusercontent.com/mattermost/mattermost-docker-preview/master/Dockerrun.aws.json.

  10. Set a unique Version Label, choose Local File, then select Choose file button to browse for the downloaded file in the previous step. You should see a File successfully uploaded message.

  11. Select Create Application. 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 displayed in green.

  12. Test your environment by selecting the domain link next to your application name at the top of the dashboard. Alternatively, enter the domain into your browser in the form of http://<your-ebs-application-url>.elasticbeanstalk.com. You can also map your own domain if you prefer. When everything is working correctly, the domain navigates you to the Mattermost Login 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

Warning

Additional configuration is required in Google to allow SMTP email to relay through their servers. See SMTP relay: Route outgoing non-Gmail messages through Google for the required steps.

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 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. For additional information, visit https://docs.microsoft.com/en-us/exchange/mail-flow/test-smtp-with-telnet?view=exchserver-2019. If you’re using an earlier version than Exchange Server 2019, select your version from the left-hand navigation menu.

  • You must run the following commands from the same machine or virtual instance where mattermost/bin/mattermost is located.

  • 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

  • As we’re not installing telnet by default on the official docker images, you either need to use ping on those or install telnet yourself either directly or by modifying the Dockerfile.

  • For further assistance, review the Troubleshooting forum for previously reported errors, or join the Mattermost user community for troubleshooting help. To submit an improvement or correction to this page, select Edit in the top-right corner of the page.