Skip to content

Installation and Usage

knoxfighter edited this page Jan 27, 2022 · 7 revisions

Installation Docker

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

    docker pull ofsm/ofsm:latest
    
  2. Now you can start the container by running:

    docker run --name ofsm -d -p 80:80 -p 34197:34197/udp ofsm/ofsm:latest
    

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

conf.json

All fields for conf.json:

 - factorio_dir string
 - saves_dir string
 - basemod_dir string
 - mods_dir string
 - mod_pack_dir string
 - config_file string
 - config_directory sring
 - logfile string
 - factorio_binary string
 - rcon_pass string
 - factorio_credentials_file string
 - factorio_ip string
 - server_ip string
 - server_port string
 - max_upload_size int64
 - database_file string
 - sq_lite_database_file string
 - cookie_encryption_key string
 - settings_file string
 - log_file string
 - console_cache_size int
 - secure bool | default: `true`
    	Set this to `false`, if you are running without ssl/tls.
Clone this wiki locally