Giter Club home page Giter Club logo

factorio-server-manager's Introduction

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.
  • ./factorio-server-manager --dir /home/user/.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")

Example:

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

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.7
  • NodeJS 4.2.6

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. See app/dist/ for AdminLTE included files and license.

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.js

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.7 or newer. https://golang.org/dl/
  3. Download and install NodeJS 4.2.6 64-bit or 32-bit depending on your operating system, if unsure download 32-bit
  1. Download and install NVM, when asked if you want it to use NodeJS 4.2.6 accept
  1. You will need to setup GOPATH in environmental settings in windows. You will want to go into Control Panel\System and Security\System From there on the left hand side click "Advanced system settings". A window will open and you need to click Environment Variables.
  2. Under System Variables click New. For Variable name use GOPATH and Variable value C:\Go\

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. You will now need to install some dependencies for Go. You will need to open up a command prompt and one at a time type each of these and hit enter before typing the next one.
go get github.com/apexskier/httpauth
go get github.com/go-ini/ini
go get github.com/gorilla/mux
go get github.com/hpcloud/tail
go get github.com/gorilla/websocket
go get github.com/majormjr/rcon
  1. Now you will want to go into the src folder for example "C:\FS\factorio-server-manager\src" once there hold down left shift and right click an empty area of the folder. Then click "Open command windows here"
  2. 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 by going into your ui folder for me its C:\FS\factorio-server-manager\ui\ and again hold shift and left 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
  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. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Authors

License

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

factorio-server-manager's People

Contributors

bostelk avatar ja-ko avatar jake-walker avatar jakenveina avatar jarvis2point0 avatar jcormier avatar jjcf89 avatar knoxfighter avatar leodj avatar mplewis avatar mroote avatar niels-be avatar rand0m-cloud avatar sean-callahan avatar tmathmeyer avatar willglynn avatar xeroiv avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.