This project defines the necessary docker-compose.yml to start a Satisfactory server in a custom domain mydomain.com and visualize in Satisfactory Calculator the map of the Satisfactory server by going to satisfactory.mydomain.com.
This project uses the image from wolveix/satisfactory-server to run the satisfactory server.
To use this project you can follow this steps:
- Clone the repository:
git clone https://github.com/jmigual/satisfactory-server-with-map
- Enter the repository:
cd satisfactory-server-with-map
- Copy
example.envto.envand edit theUSER_DOMAINandUSER_EMAILvariables with your own domain name and your e-mail (used for let's encrypt TLS certificate) respectively. - Pull and build the images:
docker-compose build --pull && docker-compose pull
- Start the server
docker-compose up -d
Satisfactory calculator can load a custom map if you access it with the url https://satisfactory-calculator?url=<my_url>. Where your browser needs to be able to access <my_url> (i.e., download the file) and the CORS policy needs to be set properly.
What we do is we create an nginx server that provides two urls:
mydomain.com/saves/*: This one serves any savefile of the satisfactory server such that it can be downloaded.mydomain.com: This one redirects tohttps://satisfactory-calculator?url=https://mydomain.com/saves/latest.sav.
The save latest.sav is a symlink created by the satisfactory-latest docker image which runs a cronjob on the saves folder and updates the the symlink to point to the last modified save. See build-scripts/satisfactory-latest for the details of how the symlink is created.
The caveat is that this relies on your server saving the game so, with the default autosave time, this can be up to 5 minutes late.