A tool to help manage Factorio multiplayer servers including mods and save games.
Go to file
2020-11-13 23:00:27 +01:00
app add modal to choose mod version to install 2020-10-11 19:06:51 +02:00
docker Update dockerfile URL 2020-01-07 20:23:40 -05:00
screenshots add screenshots 2020-11-13 23:00:27 +01:00
src feature: create and list modpacks (name only) 2020-10-29 21:58:49 +01:00
ui add screenshots 2020-11-13 23:00:27 +01:00
.gitignore refactoring test setup and using .env file for test 2020-10-09 23:59:56 +02:00
.travis.yml fixed .travis.yml 2020-10-09 22:54:21 +02:00
CHANGELOG.md added autostart feature to changelog 2020-08-18 19:15:17 +02:00
conf.json.example add component for console, add routes for websocket message events 2017-01-22 21:30:11 -05:00
LICENSE.md added license, updated readme 2016-04-19 23:16:36 -04:00
Makefile use mkdir-p to ignore exists error 2019-10-30 15:42:01 +01:00
package.json completed mod installation ui and small adjustments 2020-10-16 13:06:05 +02:00
README.md Merge pull request #179 from Psychomantis71/master 2020-08-18 19:04:48 +02:00
tailwind.config.js completed mod installation ui and small adjustments 2020-10-16 13:06:05 +02:00
webpack.config.js adjust webpack 2020-08-22 20:34:09 +02:00

Build Status

Factorio Server Manager

A tool for managing Factorio servers.

This tool runs on a Factorio server and allows management of the Factorio server, saves, mods and many other features.

Features

  • Allows control of the Factorio Server, starting and stopping the Factorio binary.
  • Allows the management of save files, upload, download and delete saves.
  • Manage installed mods, upload new ones and more
  • Manage modpacks, so it is easier to play with different configurations
  • Allow viewing of the server logs and current configuration.
  • Authentication for protecting against unauthorized users
  • Available as a Docker container

Installation Docker

  1. Pull the Docker container from Docker Hub using the pull command

    docker pull majormjr/factorio-server-manager
    
  2. Now you can start the container by running:

    docker run --name factorio-manager -d -p 80:80 -p 443:443 -p 34197:34197/udp majormjr/factorio-server-manager
    

Installation Linux

  1. Download the latest release
  1. Download the Factorio Standalone server and install to a known directory.
  2. Run the server binary file, use the --dir flag to point the management server to your Factorio installation. If you are using the steam installation, point FSM to the steam directory.
  • ./factorio-server-manager --dir /home/user/.factorio
  • ./factorio-server-manager --dir /home/user/.steam/steam/steamapps/common/Factorio
  1. Visit localhost:8080 in your web browser.

Installation Windows

  1. Download the latest release
  1. Download the Factorio Standalone server and install to a known directory.
  2. Run the server binary file via cmd or Powershell, use the --dir flag to point the management server to your Factorio installation.
  • .\factorio-server-manager --dir C:/Users/username/Factorio
  1. Visit localhost:8080 in your web browser.

Usage

Run the UI server and specify the directory of your Factorio server installation and the interface to run the HTTP server on. Edit the conf.json file with your desired credentials for authentication.

Usage of ./factorio-server-manager:
  -bin string
    	Location of Factorio Server binary file (default "bin/x64/factorio")
  -conf string
    	Specify location of Factorio Server Manager config file. (default "./conf.json")
  -config string
    	Specify location of Factorio config.ini file (default "config/config.ini")
  -dir string
    	Specify location of Factorio directory. (default "./")
  -host string
    	Specify IP for webserver to listen on. (default "0.0.0.0")
  -max-upload int
    	Maximum filesize for uploaded files (default 20MB). (default 20971520)
  -port string
    	Specify a port for the server. (default "8080")
  -glibc-custom string 
        Specify if custom glibc is used (default false) [true/false]
  -glibc-loc string
        Path to the glibc ld.so file (default "/opt/glibc-2.18/lib/ld-2.18.so")
  -glibc-lib-loc
        Path to the glibc lib folder (default "/opt/glibc-2.18/lib")
  -autostart
          Autostarts Factorio Server when FSM is starting. Default false [true/false]
          (If no IP and/or port provided at startup, it will bind the factorio server to all interfaces 
          and set the server port to the default 34197, always loads latest save)       
Example:

./factorio-server-manager --dir /home/user/.factorio --host 10.0.0.1

Custom glibc example:

./factorio-server-manager --dir /home/user/.factorio --host 10.0.0.1 --glibc-custom true --glibc-loc /opt/glibc-2.18/lib/ld-2.18.so --glibc-lib-loc /opt/glibc-2.18/lib

Manage Factorio Server

Factorio Server Manager Screenshot

Manage save files

Factorio Server Manager Screenshot

Manage mods

Factorio Server Manager Screenshot

Manage modpacks

Factorio Server Manager Screenshot

Development

The backend is built as a REST API via the Go web application.

It also acts as the webserver to serve the front end react application

All api actions are accessible with the /api route. The frontend is accessible from /.

Requirements

  • Go 1.11
  • NodeJS >10.13.0

Building Releases

Creates a release zip for windows and linux: (this will install the dependencies listed in gopkgdeps)

git clone https://github.com/mroote/factorio-server-manager.git
cd factorio-server-manager
make gen_release

Building a Testing Binary:

git clone https://github.com/mroote/factorio-server-manager.git
cd factorio-server-manager
make
./factorio-server-manager/factorio-server-manager

Building the React Frontend alone

Frontend is built using React and the AdminLTE CSS framework.

The root of the UI application is served at app/index.html. Run the npm build script and the Go application during development to get live rebuilding of the UI code.

All necessary CSS and Javascript files are included for running the UI.

Transpiled bundle.js application is output to app/bundle.js, 'npm run build' script starts webpack to build the React application for development.

make app/bundle
For development

The frontend is completely build by npm with laravel-mix. All plugins are build into the compiled files. No plugins need to be load fro external sources.

It has different variants to build the frontend, provided by laravel-mix:

  • npm run dev Build the code for development. This will also generate map-files, so the browser, can show, what line and file causes the output.
  • npm run watch Build the code for development like the dev-command. This will not stop and automatically rebuild, when files are changed and saved.
  • npm run hot Build the code for development. It has the same behaviour like the watch-command and also causes a hotReload of the files inside the browser (in theory)
  • npm run build Build the code for deployment. It will generate no map-files and also minifies the bundle-files. In every of those cases, also images and fonts will be copied to the app-folder.

Building for Windows

  1. Download the latest release source zip file
  1. Unzip the Factorio Standalone server and move it to a known directory.
  2. Download and install Go 1.11 or newer. https://golang.org/dl/
  3. Download and install NodeJS 64-bit or 32-bit depending on your operating system, most users need 64-bit nowadays.

Once everything is installed and ready to go you will need to compile the source for windows

  1. Open the folder where ever you unzipped from step #2 above.
  2. My folder structure is like this "C:\FS\factorio-server-manager" C:\FS is where my factorio files are located C:\FS\factorio-server-manager\ is where the server manager files are.
  3. Now you will want to go into the src folder for example "C:\FS\factorio-server-manager\src" once there hold down shift and right click an empty area of the folder. Then click "Open command windows here"
  4. Type this into the command prompt then hit enter:
go build
  1. Once finished you will now see src.exe or src file inside the folder. You need to move that file to the C:\FS\factorio-server-manager\ or the folder that is before your src folder.
  2. From here you need to build the web front-end. Again hold shift and right click in an empty area then select open command prompt here. You then need to type this:
 npm install
 npm run build
  1. Now execute the src file created in step #4 above. You have to specify the directory, where the factorio-server is located, as parameter. More about the parameter under Usage
  2. You can now Visit localhost:8080 in your web browser to start using the Factorio server Manager

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Add your changes a in human readable way into CHANGELOG.md
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request :D

Authors

Special Thanks

License

This project is licensed under the MIT License - see the LICENSE.md file for details