Skip to content

Commit 2aecc9e

Browse files
committed
Update README
1 parent 2de43d6 commit 2aecc9e

2 files changed

Lines changed: 19 additions & 9 deletions

File tree

README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,35 @@
11
# Valheim Terraform
22

33
### Instructions:
4-
- Clone this repo
5-
- Create `terraform.auto.tfvars` like so:
4+
- Create a directory for your local terraform state, such as `valheim-terraform`
5+
- Create `main.tf` like so:
66
```
7-
key_name = "my_ssh_key"
8-
world_name = "HashiWorld"
9-
world_password = "hunter2"
7+
provider "aws" {
8+
region = "us-east-1"
9+
}
10+
11+
module "valheim-server" {
12+
source = "github.com/kpenfound/valheim-server?ref=v0.2.0"
13+
key_name = "my_aws_keypair_name"
14+
world_name = "Valheim-friends"
15+
world_password = "hunter2"
16+
}
1017
```
1118
- terraform apply
1219
- In Steam, go to View > Servers > Favorites > Add Server
13-
- Add your server at {ECS Instance IP}:2457
20+
- Add your server at {NLB DNS}:2457
1421
- Open valheim, select the server, and click connect!
1522

1623

1724
### Important notes
1825
The default ecs_ami is the current ecs optimized ami in us-east-1. You will
1926
have to change this for other regions. Refer to this list: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html
2027

28+
This is using the docker image maintained by mbround18 at https://hub.docker.com/r/mbround18/valheim
2129

22-
If you do not want your game to appear in the community list, set `world_public=0`
30+
### Auto Sleep
31+
Automatically shuts off the server after 0 players have been connected for a set amount of time.
2332

33+
The next time a player tries to connect through steam, the server will be started back up and will be available shortly after. Players will have to know to wait a minute after the first connection fails and to try again if the server had been sleeping.
2434

25-
This is using the docker image found at https://hub.docker.com/r/mbround18/valheim
35+
Override the timer value at `world_sleep_timer` (default 60 minutes). Set to an unrealistically high number to disable.

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ variable "docker_image" {
3737
variable "world_name" {}
3838
variable "world_password" {}
3939
variable "world_public" {
40-
default = "0"
40+
default = "1"
4141
}
4242
variable "world_tz" {
4343
default = "America/Chicago"

0 commit comments

Comments
 (0)