mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-10-25 18:00:54 +00:00
| .. | ||
| dns.tf | ||
| networking.tf | ||
| README.md | ||
| server.tf | ||
| variables.tf | ||
Automatic installation in AWS using terraform
Assuming you have an Amazon Web Services account and you've registered your domain through their registrar, you can use terraform to automatically create a mailinabox, complete with an EBS-backed volume to take advantage of immutable infrastructure.
First, install terraform. Then, create a new file in this folder titled terraform.tfvars with the following information:
access_key = ""
secret_key = ""
region = "us-east-1"
domain_name = ""
email_address = ""
email_password = ""
Next, create an ssh keypair associated with the miab.
ssh-keygen -f ~/.ssh/miab
aws ec2 import-key-pair --key-name miab-key \
--public-key-material file://$HOME//.ssh/miab.pub
Then, type in terraform apply and wait about 15 minutes. Then, follow the remaining instructions here to set up the SSL certificates.