Bicep templates to generate Azure resource group and resources needed for hosting Valheim dedicated server.
Hosting of the Valheim dedicated server is done with Container Instances
Docker image for the server is by default lloesche/valheim-server-docker
Server files are stored in Premium File Storage Account
Whole shabang is based on this great blog post by Jake Lunn
Edit main.parameters.json
and fill out the parameters :
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"serverName": {
"value": "my-valheim"
},
"serverPass": {
"value": "password"
},
"worldName": {
"value": "My valheim world"
},
"storageAccountName": {
"value": "stomyvalheim"
}
}
}
serverName
- Used for naming resources, dns configurations
- Example:
my-valheim
would result in :- ResourceGroup:
rg-my-valheim
- Container Instances Resource:
aci-my-valheim-westeurope
- FQDN:
my-valheim.westeurope.azurecontainer.io
- This is the address you use to connect to the valheim server
- ResourceGroup:
serverPass
- Server Password
worldName
- World name in Valheim
storageAccountName
- Resource name for storage account (eg
stomyvalheim
)
Make sure you are authenticated with Azure CLI and that you have right subscription selected:
Login:
az login
List subscriptions:
az account list -o table
Set subscription:
az account set -s <name or id>
Then we can start the deployment:
az deployment sub create -c --name my-first-deployment --location westeurope --template-file main.bicep --parameters main.parameters.json