{"id":16650576,"url":"https://github.com/samchungy/valheim-aws-spot-server","last_synced_at":"2025-04-09T17:22:21.291Z","repository":{"id":40562983,"uuid":"410268383","full_name":"samchungy/valheim-aws-spot-server","owner":"samchungy","description":"Launches a Valheim Server on an EC2 Spot Instance with a Discord Bot","archived":false,"fork":false,"pushed_at":"2024-06-03T16:43:25.000Z","size":233,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T11:36:02.806Z","etag":null,"topics":["aws","discord","discord-bot","ec2","github-actions","instance","serverless","spot","valheim"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samchungy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-25T12:36:04.000Z","updated_at":"2024-02-26T17:23:41.000Z","dependencies_parsed_at":"2023-01-19T21:46:16.717Z","dependency_job_id":null,"html_url":"https://github.com/samchungy/valheim-aws-spot-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchungy%2Fvalheim-aws-spot-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchungy%2Fvalheim-aws-spot-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchungy%2Fvalheim-aws-spot-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchungy%2Fvalheim-aws-spot-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samchungy","download_url":"https://codeload.github.com/samchungy/valheim-aws-spot-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248075205,"owners_count":21043543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","discord","discord-bot","ec2","github-actions","instance","serverless","spot","valheim"],"created_at":"2024-10-12T09:17:02.094Z","updated_at":"2025-04-09T17:22:21.270Z","avatar_url":"https://github.com/samchungy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Valheim AWS Spot Instance Server\n- Launches a Valheim Server on an EC2 Spot Instance which backs up to S3 all from GitHub Actions.\n- Also creates a receiver for 2 slash commands on Discord - `/valheim start` and `/valheim stop` to start/stop the server.\n\n## Installation\n1. Clone Repo and commit to a private repo on Github.\n2. Adjust the config in Serverless.yml under Custom \u003e Config. You will need to adjust\n  - `bucketName`\n  - `region`\n  - `serverName`\n  - `instanceType` (optional)\n\n3. Add the following secrets to GitHub Actions Secrets \n```\nAWS_ACCESS_KEY_ID\nAWS_SECRET_ACCESS_KEY\nDISCORD_PUBLIC_TOKEN\nSERVER_PASSWORD # Valheim Server Password\nSERVER_WEBHOOK # Discord Server Webhook URL\n```\n\n4. Run the workflow. Profit.\n\n5. You can remove the Elastic IP option if you want to save a bit more money. Just delete all configuration with `ElasticIP` in it from the `serverless.yml` file. It will spit out the designated IP on every start.\n\n## Discord Slash Commands\nYou can setup Slash commands for your server here: https://discord.com/developers/docs/interactions/application-commands. Use the URL from the API Gateway path as the action endpoint for Discord. It will appear in the action's logs like this: \n\n```\nendpoints:\n  POST - https://RANDOMID.execute-api.REGION.amazonaws.com/dev/interactions\n```\n\n### Slash Command Discord API Sample Request Payload\n\n```\n{\n    \"name\": \"valheim\",\n    \"description\": \"start or stop the valheim server\",\n    \"options\": [\n        {\n            \"name\": \"start\",\n            \"description\": \"Start the valheim server\",\n            \"type\": 1\n        },\n        {\n            \"name\": \"stop\",\n            \"description\": \"Stop the valheim server\",\n            \"type\": 1\n        }\n    ],\n    \"default_permission\": false\n}\n```\n\nIf you don't wish to use the Discord Slash Command integration you can invoke the start/stop Lambdas using the AWS CLI. eg.\n\n```\naws lambda invoke \\\n    --function-name valheim-dev-start-server \\\n    --invocation-type Event \\\n    --payload '{}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamchungy%2Fvalheim-aws-spot-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamchungy%2Fvalheim-aws-spot-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamchungy%2Fvalheim-aws-spot-server/lists"}