Skip to content

Commit 1a337cf

Browse files
committed
Update docker readme
1 parent 44b330d commit 1a337cf

File tree

1 file changed

+42
-22
lines changed

1 file changed

+42
-22
lines changed

docker/README.md

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,73 @@
1-
# Factorio Server Manager Docker Image
2-
### with SSL reverse-proxy pre-configured
1+
# Factorio Server Manager Docker Image
32

4-
## How to use?
3+
## Getting started?
54

65
Pull the Docker container from Docker Hub using the pull command
6+
77
```
88
docker pull majormjr/factorio-server-manager
99
```
1010

1111
Now you can start the container by running:
1212

1313
```
14-
docker run --name factorio-manager -d -p 80:80 -p 443:443 -p 34197:34197/udp majormjr/factorio-server-manager
14+
docker run --name factorio-manager -d \
15+
-p 80:80 \
16+
-p 443:443 \
17+
-p 34197:34197/udp \
18+
majormjr/factorio-server-manager
1519
```
1620

1721
If you want persistent data in your container also mount the data volumes when starting:
22+
1823
```
19-
docker run --name factorio-manager -d -v [yourpath]:/opt/factorio/saves [yourpath]:/opt/factorio/mods [yourpath]:/opt/factorio/config -p 80:80 -p 443:443 -p 34197:34197/udp majormjr/factorio-server-manager
24+
docker run --name factorio-manager -d \
25+
-v [yourpath]:/opt/factorio/saves \
26+
-v [yourpath]:/opt/factorio/mods \
27+
-v [yourpath]:/opt/factorio/config \
28+
-v [yourpath]:/security \
29+
-p 80:80 \
30+
-p 443:443 \
31+
-p 34197:34197/udp \
32+
majormjr/factorio-server-manager
2033
```
2134

22-
## Security
23-
This container will auto-generate self-signed ssl certificates on your machine.
35+
## Accessing the application
2436

25-
It's advisable that you CHANGE the private key and certificate to one you generated yourself. Do not trust me! Trust yourselves!
37+
Go to the port specified in your `docker run` command in your web browser. If running on localhost host access the application at https://localhost
38+
39+
## Updating Credentials, adding and deleting users.
2640

27-
Also if you get an actual SSL certificate for your key it will hide the annoying "the certificate is not trusted blablabla" message.
41+
An admin user is created initially using the credentials defined in the factorio-server-manager config file.
2842

29-
### But how do I change it?
30-
Nothing easier than that:
43+
Users can be added and deleted on the settings page.
3144

32-
When first running the container you need to mount the security volume to your host machine by running `docker run --name factorio-manager -d -v [yourpath]:/security -p 80:80 -p 443:443 -p 34197:34197/udp factorio-server-manager`
45+
## Updating Factorio
3346

34-
The directory will contain a "server.key" file and a "server.crt" file.
47+
For now you can't update/downgrade the Factorio version from the UI.
3548

36-
If you replace these with a trusted SSL certificate and key, you should check that "server.crt" contains the whole certificate chain from the root of your CA.
49+
You can however do this using docker images while sustaining your security settings and map/modfiles.
3750

38-
## Updating Credentials, adding and deleting users.
39-
An admin user is created initially using the credentials defined in the factorio-server-manager config file.
51+
This guide assumes that you mounted the volumes /security, /opt/factorio/saves, /opt/factorio/config and /opt/factorio/mods to your file system. Before doing anything we need to stop the old container using `docker stop factorio-manager`. To update Factorio you should then open the Dockerfile and change the Factorio version to the one desired. After that you need to rebuild the image using `docker build -t factorio-server-manager .`. Once completed you can simply rerun the command that you used to run the image in the first place. It's recommended to change the name to something including the version to keep track of the containers.
4052

41-
The default admin credentials are `user:admin password:factorio`.
53+
Pull the latest container with `docker pull majormjr/factorio-server-manager` and start with the `docker run` command.
4254

43-
Users can be added and deleted on the settings page.
55+
## Security
4456

45-
## Updating Factorio
46-
For now you can't update/downgrade the Factorio version from the UI.
57+
A self generated SSL/TLS certificate is created when the container is first created and the webserver is accessible via HTTPS.
4758

48-
You can however do this using docker images while sustaining your security settings and map/modfiles.
59+
Authentication is supported in the application but it is recommended to ensure access to the Factorio manager UI is accessible via VPN or internal network.
4960

50-
This guide assumes that you mounted the volumes /security, /opt/factorio/saves, /opt/factorio/config and /opt/factorio/mods to your file system. Before doing anything we need to stop the old container using `docker stop factorio-manager`. To update Factorio you should then open the Dockerfile and change the Factorio version to the one desired. After that you need to rebuild the image using `docker build -t factorio-server-manager .`. Once completed you can simply rerun the command that you used to run the image in the first place. It's recommended to change the name to something including the version to keep track of the containers.
61+
### Changing SSL/TLS certificate
62+
63+
If you have your own SSL/TLS certificate then you can supply it to the Factorio Server Manager container.
64+
65+
When first running the container you need to mount the security volume to your host machine by adding the security volume parameter `-v [yourpath]:/security`
66+
67+
The directory will contain a "server.key" file and a "server.crt" file.
68+
69+
If you replace these with a trusted SSL certificate and key, you should ensure that "server.crt" contains the whole certificate chain from the root of your CA.
5170

5271
## For everyone who actually read this thing to the end
72+
5373
And now go and build some nice factories!

0 commit comments

Comments
 (0)