Git Product home page Git Product logo

terraform-vultr-mailcow's Introduction

Vultr Mailcow Terraform module

Build Status

Terraform module that creates an Vultr instance running Mailcow on Fedora CoreOS.

Installation

Module usage is basically the same as vultr_server, with a few differences:

  • a conf variables accepts your Mailcow config
  • SSH key is accepted using ssh_key instead of the usual ssh_key_ids as CoreOS does not work with the usual method of adding SSH keys to Vultr servers
  • os_id isn't configurable because we use Fedora CoreOS
provider "vultr" {
}

module "mailcow" {
  source    = "./../.."
  conf      = file("mailcow.conf")
  ssh_key   = var.ssh_key 
  
  region_id = "4"    # Seattle
  plan_id   = "401"  # 1CPU + 2GB RAM + 64GB NVMe drive
}

resource "vultr_reverse_ipv4" "ptr_record" {
  instance_id = module.mailcow.server.id    # NB: vultr_server attributes available as '.server'
  ip          = module.mailcow.server.main_ip
  reverse     = "mail.example.com"
}

Operation

The mailcow server can be accessed using SSH. You'll need the SSH key you provided in the ssh_key variable and the IP address assigned to the server (module.mailcow.server.main_ip).

$ ssh core@{server-ip-address}

You're configuration is available at /opt/mailcow-dockerized. It may take a minute to become available. If in doubt, run systemctl status clone-mailcow.service to check the status of config set up.

Mailcow is running as the systemd mailcow. You can check its status with systemctl status mailcow.service and get logs with journalctl -u mailcow.

terraform-vultr-mailcow's People

Contributors

nsmith5 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.