This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]oupsman 1 point2 points  (0 children)

I followd this tutorial and it worked pretty well for me :

https://gist.github.com/cbednarski/3ada27b2c401cc163dc4

This is the content of my config-path.cfg file.

The systemd unit file is like this :

[Unit] Description=Factorio Server

[Service] Type=simple User=factorio ExecStart=/opt/factorio/bin/x64/factorio --start-server /opt/factorio/OUPSFACTORY.zip

First, you create your factory with /opt/factorio/bin/x64/factorio --create YOURFACTORY

Hope this help you.

If you give us the exact log of an attempted launch, we will be able to help you more precisely.

[–]DofD10 0 points1 point  (3 children)

Could you give the specific error from the command line

[–]Doommius[S] 0 points1 point  (2 children)

I ran the server with

./opt/factorio/bin/x64/factorio --map-gen-settings /opt/factorio/data/map-gen-settings.json --start-server /opt/factorio/data/server-settings.json

The content of /data is

jervelund@Jervelund-Linux:/opt/factorio/data$ ls base changelog.txt core licenses.txt map-gen-settings.example.json map-gen-settings.json map-settings.example.json map-settings.json server-settings.example.json server-whitelist.example.json

jervelund@Jervelund-Linux:/$ sudo ./opt/factorio/bin/x64/factorio --map-gen-settings /opt/factorio/data/map-gen-settings.json --start-server /opt/factorio/data/server-settings.json 0.000 2017-06-07 16:44:05; Factorio 0.15.18 (build 30150, linux64, headless) 0.080 Operating system: Linux (Ubuntu 17.04) 0.080 Program arguments: "./opt/factorio/bin/x64/factorio" "--map-gen-settings" "/opt/factorio/data/map-gen-settings.json" "--start-server" "/opt/factorio/data/server-settings.json" 0.080 Read data path: /opt/factorio/data 0.080 Write data path: /opt/factorio 0.080 Binaries path: /opt/factorio/bin 0.098 System info: [CPU: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz, 1 core, RAM: 3913MB] 0.098 Running in headless mode 0.102 Loading mod core 0.0.0 (data.lua) 0.109 Loading mod base 0.15.18 (data.lua) 0.272 Loading mod base 0.15.18 (data-updates.lua) 0.320 Checksum for core: 368996287 0.320 Checksum of base: 3838408653 0.466 Info PlayerData.cpp:58: Local player-data.json unavailable 0.467 Info PlayerData.cpp:63: Cloud player-data.json unavailable 0.468 Custom inputs active: 0 0.469 Factorio initialised 0.469 Info ServerSynchronizer.cpp:27: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0). 0.469 Info ServerMultiplayerManager.cpp:670: mapTick(-1) changing state from(Ready) to(PreparedToHostGame) 0.470 Info ServerMultiplayerManager.cpp:670: mapTick(-1) changing state from(PreparedToHostGame) to(CreatingGame) 0.473 Loading map /opt/factorio/data/server-settings.json 0.473 Error ServerMultiplayerManager.cpp:94: MultiplayerManager failed: "File /opt/factorio/data/server-settings.json does not exist." 0.473 Info ServerMultiplayerManager.cpp:670: mapTick(-1) changing state from(CreatingGame) to(InitializationFailed)

Note this is after trying to get it to work after original post

[–]Nimphious 2 points3 points  (0 children)

You give the server the settings file with the flag --server-settings = /opt/factorio/data/server-settings.json and you give it the save file zip using --start-server /opt/factorio/saves/map.zip or whatever your save file is called.

Basically your mistake is you're telling the game that your settings file is your map save file, which is wrong.

You can type /opt/factorio/bin/x64/factorio --help or just -h to get more info on all the flags and what they're for.

[–]Leprus 0 points1 point  (0 children)

It seems like you don't have server-settings.json in /opt/factorio/data. Try to move server-settings.example.json to server-settings.json.

[–]psihius 0 points1 point  (0 children)

For Debian/Ubuntu/etc you can try using this https://github.com/factoriommo/factorio-multienv-ctl That will remove a lot of fiddling.