Skip to content

This project simplifies the deployment of Factorio headless server with a modern approach (IaC) exploiting Terraform and Ansible for a secure provision in cloud environment.

License

Notifications You must be signed in to change notification settings

TheLillo/Factorio-Server-Deployment

Repository files navigation

Factorio Server Deployment

This project simplifies the deployment of Factorio headless server with a modern approach (IaC). More information about the installation are provide in Factorio official wiki.

Up to now only Hetzner Cloud is supported for deployment. I encourage all people to submit other cloud provider module for Terraform.

You will deploy Factorio server on Debian Bullseye. If you want to change os you need to modify Factorio-Server-Deployment/terraform/backends/hetzner.tf file inside backend folder. In this release I use a CPX11(2vCPU 2GB RAM) as default VM but you can modify it on: Factorio-Server-Deployment/terraform/backends/hetzner.tf.

Install Dependencies

To run this project you need some other software:

Arch Linux

# pacman -S gnupg pass ansible terraform

How it work

First of all you need to create a empty project on Hetzner Cloud and get the private API Token. After this phase you need to save the Token they provide in your pass store. Follow pass instructions to have a secure store for your API Token.
$ pass insert Services/hetzner/api_token
If you have a saved game to upload to the server you need to modify Factorio Server Deployment/configuration.yml adding the path to your save file. The value to add is under factorio_save:. You can find the configuration file inside the project folder Factorio-Server-Deployment. To push the configuration on the remote server you need to set ssh key. You need to insert inside the Factorio-Server-Deployment/configuration.yml under terraform keyword the url of your ssh public key for your github.com or gitlab.com account. Inside Factorio-Server-Deployment/ansible/roles/factorio/files is present the server-settings.json you need to personalize this file to ensure, for example, the password for your game. Now you have everything you need to run factorio_deploy.sh script.

About

This project simplifies the deployment of Factorio headless server with a modern approach (IaC) exploiting Terraform and Ansible for a secure provision in cloud environment.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published