Skip to content

Instantly share code, notes, and snippets.

@click0
Created January 30, 2019 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save click0/a5cce5eb492acf26bb72a37eae800dba to your computer and use it in GitHub Desktop.
Save click0/a5cce5eb492acf26bb72a37eae800dba to your computer and use it in GitHub Desktop.
# Install Factorio server in Debian 8.x-9.x
#!/bin/sh
# Install Factorio server in Debian 8.x-9.x
apt-key update; apt-get update && apt-get -y install lsb-release ca-certificates
[ ! -d /opt ] && mkdir -p /opt;
cd '/opt'
apt-get -y install git mc screen
git clone https://github.com/Bisa/factorio-init.git
useradd factorio
ln -s /opt/factorio-init/bash_autocomplete /etc/bash_completion.d/factorio
source /opt/factorio-init/bash_autocomplete
cp /opt/factorio-init/config.example /opt/factorio-init/config
/opt/factorio-init/factorio install
rm /opt/factorio/saves/server-save.zip
#chown -R factorio:factorio /opt/factorio
cp /opt/factorio-init/factorio.service.example /etc/systemd/system/factorio.service
# Edit the service file to suit your environment then reload systemd
systemctl daemon-reload
## Verify that the server starts
# systemctl start factorio
cp /opt/factorio/data/server-settings.example.json /opt/factorio/data/server-settings.json
echo "replace you config - /opt/factorio/data/server-settings.json"
echo "/opt/factorio-init/factorio status"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment