Forem Creators and Builders

Cover image for Forem AWS Setup on MacOS
Forem Core Team

Forem AWS Setup on MacOS

Christina Gorton
Developer Advocate, Technical Writer, and Instructor.
Updated on ・4 min read

Before starting this tutorial please go through the Quick Start in Depth guide.

This is a walkthrough of the AWS Cloud provider section for MacOS in the selfhost repository.

Install Requirements

  1. In your terminal make sure you are in the selfhost directory with: cd selfhost
  2. Install the Ansible Amazon AWS collections with: ansible-galaxy collection install or install all collections with: ansible-galaxy collection install -r requirements.yml

AWS CLI version 2 Tool

Now you need to install the AWS CLI version 2 tool. You will use this tool to configure preset variables for the AWS provisioning target

  1. First, download the latest version of the AWS CLI:
  2. Click the downloaded file to launch the installer.
  3. Follow the prompts in the installer to install the CLI to a recommended folder.
  4. In your terminal type: aws --version to see if the CLI has installed properly. aws --version in MacOS terminal

You can see the full instructions for AWS CLI installation on a MacOS here.

Pip Modules

  1. In your terminal install Boto, Boto3, and Botocore pip modules with: pip3 install boto boto3 botocore or run pip install -r requirements.txt

Create an AWS IAM User

  1. Navigate to your AWS Management Console
  2. In the search bar type IAM and click the IAM option under "Services"
    IAM option under "Services"

  3. In the navigation pane, choose "Users"
    navigate to Users in the menu

  4. Click Add user to add a new user
    Add new user

  5. At minimum, add Admin permissions to your user.

Add Admin permissions

  1. You do not need to set any tags at this time. Click Next: Review to review and then click Create user

  2. Save your Access key ID and Secret Access Key to use in a later step.

  3. Once your user is created, click on the user name to set up the necessary policies.

click user name to set up policies

  1. Click Add permissions

Click Add permissions button

  1. Click Attach existing policies directly. Click Attach existing policies directly

Search for:

  • AmazonEC2FullAccess and check the box to add the policy
  • AmazonS3FullAccess and check the box to add the policy
  • AmazonVPCFullAccess and check the box to add the policy

Now that your IAM user is set up you can configure your profile with the AWS CLI

Configure forem-selfhost Profile

  1. In your terminal type: aws configure --profile forem-selfhost When prompted add:
  2. Your the access key you saved previously and hit enter
  3. Your secret access key you saved and hit enter

  4. Set the Default region name to: us-east-1

  5. Set the Default output format to: json

Configure your forem-selfhost profile

Now you are ready to provision your AWS provider playbook.


  1. In your terminal type: ansible-playbook -i inventory/forem/setup.yml playbooks/providers/aws.yml

Note: If you run into the following error:

botocore error message

... try using this command in your terminal instead:

ansible-playbook -i inventory/forem/setup.yml playbooks/providers/aws.yml -e ansible_python_interpreter=/usr/local/bin/python3

  1. Once you run the command, you should see an output in your terminal similar to the code below with your community's domain name and IP address.
ok: [forem] => 
  - The public IPv4 IP Address for is
  - Please add an A entry for that points to
  - 'Example:'
  - ' IN A'
  - 'Once you have DNS resolving to this EC2 instance please read the Forem Admin Docs:'
Enter fullscreen mode Exit fullscreen mode


  1. You will need to create an A record and point DNS at the IP address that is output at the end of the provider playbook.

You can see an example of how I set an A record for my namecheap domain below:

In Advanced DNS I added an A record for my domain and subdomain and set the value to the IP address that was outputted after provisioning. I also set TTL to 1minute.
This will defer depending on where your DNS is hosted.
Advanced DNS in

Forem Traefik Service

Once DNS is pointed at your Forem VM, you will need to restart the Forem Traefik service.

  1. You will need to run the command via SSH. In your terminal type:
    ssh core@<SERVER IP ADDRESS> replacing with your community name. In the example below I am using my community:
    ssh core@ example

  2. You may be prompted to continue. Type yes in to your terminal.

  3. Once you have connected to your Forem server, type the following command:
    sudo systemctl restart forem-traefik.service
    systemctl restart command in terminal

  4. Now, you can navigate to your community domain.and you should see a "Let's Start your Forem Journey" page. You may need to wait a few minutes after running the Forem Traefik command.
    Let's Start your Forem Journey page

Congratulations on setting up your first Forem!🎉

For more details on how to configure your Forem please visit our Forem Admin Docs.

Discussion (0)