Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autostart on docker on debian not working #426

Open
kevindstanley1988 opened this issue Dec 6, 2024 · 1 comment
Open

Autostart on docker on debian not working #426

kevindstanley1988 opened this issue Dec 6, 2024 · 1 comment

Comments

@kevindstanley1988
Copy link

kevindstanley1988 commented Dec 6, 2024

Hi I am having trouble getting autostart to work. I have tried all of the flags,env settings, and conf.json's as described below, but in none of the cases do I get the factorio server to start on run of the docker container.

With environment variable FSM_AUTOSTART=true - this server starts the web server, and if i click 'start' in the web ui it does start the game, but no autostart if i restart the container.

docker run --name ofsm -e FACTORIO_VERSION=2.0.23 -e FSM_AUTOSTART=true -v ./fsm-data:/opt/fsm-data -v ./factorio-data/saves:/opt/factorio/saves -v ./factorio-data/mods:/opt/factorio/mods -v ./factorio-data/config:/opt/factorio/config -v ./factorio-data/mod_packs:/opt/fsm/mod_packs -d -p 80:80 -p 34197:34197/udp --restart=always ofsm/ofsm:latest

With flag --autostart - same deal, no autostart, otherwise is functioning.

docker run --name ofsm -e FACTORIO_VERSION=2.0.23 -v ./fsm-data:/opt/fsm-data -v ./factorio-data/saves:/opt/factorio/saves -v ./factorio-data/mods:/opt/factorio/mods -v ./factorio-data/config:/opt/factorio/config -v ./factorio-data/mod_packs:/opt/fsm/mod_packs -d -p 80:80 -p 34197:34197/udp --restart=always ofsm/ofsm:latest --autostart

i also tried --autostart true to test if it required a value, but still not working
docker run --name ofsm -e FACTORIO_VERSION=2.0.23 -v ./fsm-data:/opt/fsm-data -v ./factorio-data/saves:/opt/factorio/saves -v ./factorio-data/mods:/opt/factorio/mods -v ./factorio-data/config:/opt/factorio/config -v ./factorio-data/mod_packs:/opt/fsm/mod_packs -d -p 80:80 -p 34197:34197/udp --restart=always ofsm/ofsm:latest --autostart true

no environment variable, no flag, modified conf.json file

docker run --name ofsm -e FACTORIO_VERSION=2.0.23 -v ./fsm-data:/opt/fsm-data -v ./factorio-data/saves:/opt/factorio/saves -v ./factorio-data/mods:/opt/factorio/mods -v ./factorio-data/config:/opt/factorio/config -v ./factorio-data/mod_packs:/opt/fsm/mod_packs -d -p 80:80 -p 34197:34197/udp --restart=always ofsm/ofsm:latest

image

Any ideas for what to try next?

@kevindstanley1988 kevindstanley1988 changed the title Autostart on docker on debian no working Autostart on docker on debian not working Dec 6, 2024
@kevindstanley1988
Copy link
Author

My quick repeatable steps for replication of this issue - with Proxmox as the base environment, but should work even if docker is installed in any linux environment with docker and docker compose installed.

First create a docker LXC, and use helper scripts to do so.
https://community-scripts.github.io/ProxmoxVE/scripts?id=docker
say yes to docker compose when asked

login as root to your proxmox container

apt update
apt install git
cd /home

git clone this repo

git clone https://github.com/OpenFactorioServerManager/factorio-server-manager.git
cd /home/factorio-server-manager/docker
docker compose -d -f docker-compose.simple.yml

once the docker container is created, navigate to the file(s) to edit them
First try environment variable

cd /home/factorio-server-manager/docker
nano docker-compose.simple.yml

edit the environment variable to include AUTOSTART
I also tried AUTOSTART=true
ctrl-x to close and save the file
restart the proxmox virtual machine
the ui comes up, but the factorio server remains offline

all of the files mentioned in the original post with this testing method, and recreated the docker containers each time to make sure there was nothing different between the runs, except for each file edit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant