Minecraft Server powered by Docker & Azure Container Instance
This repo deploys itzg/minecraft-server as Azure Container Instance, using Terraform.
There are 2 ways to set this up:
The easiest method is to use a GitHub Codespace (in beta). Just create a GitHub Codespace from the Code menu. Wait for the Codespace to complete provisioning. When the Codespace has completed provisioning and you open a terminal window (Ctrl-`, Control-backquote), you should see a message like this:
To provision infrastructure, make sure you're logged in with Azure CLI e.g. run 'az login' and 'az account set --subscription 00000000-0000-0000-0000-000000000000'. Then, either:
- change to the /home/codespace/workspace/azure-minecraft-docker/terraform directory and run 'terraform apply', or:
- run /home/codespace/workspace/azure-minecraft-docker/scripts/deploy.ps1 -apply
To destroy infrastructure, replace 'apply' with 'destroy' in above commands
Just follow these steps to provision Minecraft on Azure.
If you set this up locally, make sure you have the following pre-requisites:
On macOS, you can run brew bundle
to install the pre-requisites.
Once you have those, you can go ahead and provision:
az login
az account set --subscription 00000000-0000-0000-0000-000000000000
terraform init
terraform apply
You can customize the deployment by overriding defaults for Terraform input variables. The easiest way to do this is to copy config.auto.example.tfvars and save it as config.auto.tfvars.
minecraft_users
array to define users allowed to log invanity_dns_zone_id
and vanity_hostname_prefix
, using an Azure DNS managed domainenable_backup
enable_auto_startstop
, start_time
& stop_time
. The Logic App triggers created can be favorited in the mobile app for on-demand startup & shutdown.enable_log_filter
uses the Console Spam Fix and configures it to hide chat messages from logs. This feature is dependent on PowerShell and is more brittle in automation, but satisfies a key privacy requirement.See variables.tf for all input variables.
Once provisioned, a dashboard like this will be available in the Azure Portal:
You can update the dashboard in the portal and re-generate the template using templatize_dashboard.ps1.