Skip to content

Commit d0b1ed2

Browse files
authored
Merge branch 'main' into ubuntu-24
2 parents d2f071e + 7e1ae65 commit d0b1ed2

File tree

11 files changed

+197
-32
lines changed

11 files changed

+197
-32
lines changed

.github/workflows/docker.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@ jobs:
55
push:
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v2
8+
- uses: actions/checkout@v4
99

1010
- name: Login to DockerHub
11-
uses: docker/login-action@v1
11+
uses: docker/login-action@v3
1212
with:
1313
username: ${{ secrets.DOCKER_USERNAME }}
1414
password: ${{ secrets.DOCKER_PASSWORD }}
1515

1616
- name: Login to GitHub Packages
17-
uses: docker/login-action@v1
17+
uses: docker/login-action@v3
1818
with:
1919
registry: ghcr.io
2020
username: ${{ github.actor }}
2121
password: ${{ secrets.GITHUB_TOKEN }}
2222

2323
- name: Docker meta
2424
id: meta
25-
uses: docker/metadata-action@v3
25+
uses: docker/metadata-action@v5
2626
with:
2727
# list of Docker images to use as base name for tags
2828
images: |
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: Build and push to DockerHub
3636
id: docker_build
37-
uses: docker/build-push-action@v2
37+
uses: docker/build-push-action@v6
3838
with:
3939
push: true
4040
tags: |

.github/workflows/linting.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- name: Checkout code
9-
uses: actions/checkout@v2
9+
uses: actions/checkout@v4
10+
1011
- name: Run Shellcheck
1112
uses: azohra/shell-linter@latest
1213
with:
@@ -15,7 +16,8 @@ jobs:
1516
runs-on: ubuntu-latest
1617
steps:
1718
- name: Checkout code
18-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
20+
1921
- name: Validate Dockerfile
2022
uses: ghe-actions/dockerfile-validator@v1
2123
with:

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ jobs:
77
release:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v4
1111

1212
- name: Login to DockerHub
13-
uses: docker/login-action@v1
13+
uses: docker/login-action@v3
1414
with:
1515
username: ${{ secrets.DOCKER_USERNAME }}
1616
password: ${{ secrets.DOCKER_PASSWORD }}
1717

1818
- name: Login to GitHub Packages
19-
uses: docker/login-action@v1
19+
uses: docker/login-action@v3
2020
with:
2121
registry: ghcr.io
2222
username: ${{ github.actor }}
2323
password: ${{ secrets.GITHUB_TOKEN }}
2424

2525
- name: Docker meta
2626
id: meta
27-
uses: docker/metadata-action@v3
27+
uses: docker/metadata-action@v5
2828
with:
2929
# list of Docker images to use as base name for tags
3030
images: |
@@ -41,7 +41,7 @@ jobs:
4141
4242
- name: Build and push to DockerHub & GitHub Packages
4343
id: docker_build
44-
uses: docker/build-push-action@v2
44+
uses: docker/build-push-action@v6
4545
with:
4646
push: true
4747
tags: ${{ steps.meta.outputs.tags }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ STOPSIGNAL SIGINT
4747

4848
EXPOSE 7777/udp 7777/tcp
4949

50-
ENTRYPOINT [ "/init.sh" ]
50+
ENTRYPOINT [ "/init.sh" ]

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ following directories:
5959
- `/backups` - the server will automatically backup your saves when the container first starts
6060
- `/gamefiles` - this is for the game's files. They're stored outside the container to avoid needing to redownload
6161
8GB+ every time you want to rebuild the container
62-
- `/logs` - this holds Steam's logs, and contains a pointer to Satisfactory's logs (empties on startup unless `LOG=true`)
62+
- `/logs` - this holds Steam's logs, and contains a pointer to Satisfactory's logs (empties on startup unless
63+
`LOG=true`)
6364
- `/saved` - this contains the game's blueprints, saves, and server configuration
6465

6566
Before running the server image, you should find your user ID that will be running the container. This isn't necessary
@@ -142,6 +143,12 @@ services:
142143
memory: 4G
143144
```
144145
146+
### SSL Certificate with Certbot (Optional)
147+
148+
You can use Certbot with Let's Encrypt to issue a signed SSL certificate for your server. Without this,
149+
Satisfactory will use a self-signed SSL certificate, requiring players to manually confirm them when they initially
150+
connect. [Learn more](https://github.com/wolveix/satisfactory-server/tree/main/ssl).
151+
145152
### Kubernetes
146153
147154
If you are running a [Kubernetes](https://kubernetes.io) cluster, we do have

cluster/service.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,20 @@ metadata:
66
labels:
77
app: satisfactory
88
spec:
9-
type: NodePort
9+
type: LoadBalancer
10+
allocateLoadBalancerNodePorts: true
11+
externalTrafficPolicy: Cluster
12+
internalTrafficPolicy: Cluster
13+
# might be necessary for your cluster:
14+
# loadBalancerIP: <external-IP>
1015
ports:
11-
- port: 7777
12-
nodePort: 7777
16+
- name: "game"
17+
port: 7777
1318
protocol: UDP
14-
name: "game"
1519
targetPort: 7777
16-
- port: 7777
17-
nodePort: 7777
20+
- name: "api"
21+
port: 7777
1822
protocol: TCP
19-
name: "gametcp"
2023
targetPort: 7777
2124
selector:
22-
app: satisfactory
25+
app: satisfactory

cluster/statefulset.yaml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,25 @@ spec:
3131
- name: STEAMBETA
3232
value: "false"
3333
ports:
34-
- containerPort: 7777
35-
name: "gameTCP"
34+
- name: "api"
35+
containerPort: 7777
3636
protocol: TCP
37-
- containerPort: 7777
38-
name: "game"
37+
- name: "game"
38+
containerPort: 7777
3939
protocol: UDP
4040
volumeMounts:
41-
- name: satisfactory-data
41+
- name: satisfactory-config
4242
mountPath: /config
43+
- name: satisfactory-data
44+
mountPath: /config/gamefiles
4345
volumeClaimTemplates:
46+
- metadata:
47+
name: satisfactory-config
48+
spec:
49+
accessModes: [ "ReadWriteOnce" ]
50+
resources:
51+
requests:
52+
storage: 1Gi
4453
- metadata:
4554
name: satisfactory-data
4655
spec:

run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fi
104104

105105
cd /config/gamefiles || exit 1
106106

107-
chmod +x FactoryServer.sh
107+
chmod +x FactoryServer.sh || true
108108
./FactoryServer.sh -Port="$SERVERGAMEPORT" "${ini_args[@]}" "$@" &
109109

110110
sleep 2

saveshare/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Satisfactory Save Sharing
22

3-
**_Note: this is a work in progress. The group I play with have been relying on solely this for the last few months, but
4-
I'm still working on making it more user-friendly._**
3+
**_Note: this is a work in progress. Prior to 1.0's release, the group I played with had been relying on solely this for many months. Now that 1.0 is released, dedicated servers are much more reliable, meaning we haven't really been using SaveShare._**
54

65
The dedicated server for Satisfactory introduces a few unique bugs to the game, where multiplayer (through joining a
76
friend) doesn't. This application introduces save sharing with friends. It's designed to function similarly to how the
@@ -15,7 +14,7 @@ leaves, anyone else can pick up from where they left off.
1514

1615
Download the release from the releases tab. When you initially run it, it'll ask for the following information:
1716

18-
- Server address (IP and port, e.g. `localhost:15770`)
17+
- Server address (IP and port, e.g. `localhost:7790`)
1918
- Server password (the SFTP password)
2019
- Session name (this must be EXACTLY as it is formatted within Satisfactory)
2120

@@ -31,7 +30,7 @@ services:
3130
volumes:
3231
- /opt/saveshare:/home/saveshare/upload
3332
ports:
34-
- "15770:22"
33+
- "7790:22"
3534
command: saveshare:PASSWORD_HERE:1001
3635
```
3736

ssl/README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# SSL Certificate with Certbot
2+
3+
The instructions below will help you to deploy a signed SSL certificate for your Satisfactory server.
4+
5+
## Docker Compose
6+
7+
```yaml
8+
services:
9+
satisfactory-server:
10+
container_name: 'satisfactory-server'
11+
hostname: 'satisfactory-server'
12+
image: 'wolveix/satisfactory-server:latest'
13+
ports:
14+
- '7777:7777/udp'
15+
- '7777:7777/tcp'
16+
volumes:
17+
- './satisfactory-server:/config'
18+
- './certs/live/${DOMAIN}/fullchain.pem:/config/gamefiles/FactoryGame/Certificates/cert_chain.pem'
19+
- './certs/live/${DOMAIN}/privkey.pem:/config/gamefiles/FactoryGame/Certificates/private_key.pem'
20+
environment:
21+
- MAXPLAYERS=4
22+
- PGID=1000
23+
- PUID=1000
24+
- ROOTLESS=false
25+
- STEAMBETA=false
26+
restart: unless-stopped
27+
depends_on:
28+
certbot:
29+
condition: service_completed_successfully
30+
healthcheck:
31+
test: bash /healthcheck.sh
32+
interval: 30s
33+
timeout: 10s
34+
retries: 3
35+
start_period: 120s
36+
deploy:
37+
resources:
38+
limits:
39+
memory: 6G
40+
reservations:
41+
memory: 4G
42+
43+
certbot:
44+
image: certbot/certbot
45+
command: certonly --standalone --non-interactive --agree-tos -m ${CERTBOT_MAIL} -d ${DOMAIN}
46+
ports:
47+
- '80:80/tcp'
48+
volumes:
49+
- ./certs:/etc/letsencrypt
50+
environment:
51+
- CERTBOT_MAIL=certbot@domain.tld
52+
- DOMAIN=satisfactory.domain.tld
53+
```
54+
55+
The `docker-compose.yml` file above should replace the `docker-compose.yml` file you already have configured. Adjust the
56+
`CERTBOT_MAIL` and `DOMAIN` environment variables under the `certbot` service to be a real email address, and the domain
57+
you'd like to issue the SSL certificate for. Ensure prior to running this that you've already created the necessary DNS
58+
record for your domain. If you don't certbot will fail, and you'll likely hit your rate limit and need to wait a while
59+
to try again (check the `certbot` container's logs for further information).
60+
61+
**Ensure that you open/port forward for port `80/tcp`.**
62+
63+
You can now launch the Docker Compose configuration in the same way you normally would. Do note that if Certbot fails,
64+
the game server will not start.
65+
66+
## Troubleshooting
67+
68+
### What if port 80 is already in-use with a reverse-proxy?
69+
70+
Change the port for the certbot service (e.g. `7800:80/tcp`), and forward HTTP traffic from your reverse proxy through
71+
to your `certbot` container.
72+
73+
Here are examples on how you can do this with Caddy and NGINX
74+
75+
#### Caddy
76+
77+
Modify your Caddyfile to include your given domain above. Ensure that you put `http://` **before** the domain, otherwise
78+
Caddy will _also_ request an SSL certificate for it.
79+
80+
```
81+
http://satisfactory.domain.tld {
82+
reverse_proxy :7780
83+
}
84+
```
85+
86+
87+
#### NGINX
88+
89+
Modify your NGINX configuration file to include the following virtual host:
90+
91+
```
92+
server {
93+
listen 80;
94+
server_name satisfactory.domain.tld;
95+
96+
location / {
97+
proxy_pass http://localhost:7780;
98+
}
99+
}
100+
```

0 commit comments

Comments
 (0)