Thanks; here are my thoughts and followup questions:
You don’t need php-fpm if you’re using FrankenPHP, because FrankenPHP has PHP built in. It replaces php-fpm.
How are you running Caddy/FrankenPHP? Are you running it as a systemd service? If so, how did you set up the service?
What do you have in Caddy/FrankenPHP’s logs? Seeing the logs is important to see how it’s behaving.
Depending on how you installed it, the Nextcloud files should match the user/group that Caddy/FrankenPHP is running as. If you’re running it as a systemd service, then it should be owned by the caddy user, or have the www-data group at least.
Yes, I know I don’t need that. It’s just for information purposes and to understand how it’s set up.
I am using a systemd config:
#
# See https://caddyserver.com/docs/install for instructions.
#
# WARNING: This service does not use the --resume flag, so if you
# use the API to make changes, they will be overwritten by the
# Caddyfile next time the service is restarted. If you intend to
# use Caddy's API to configure it, add the --resume flag to the
# `caddy run` command or use the caddy-api.service file instead.
[Unit]
Description=Caddy Web Server
Documentation=https://caddyserver.com/docs/
After=network-online.target
Requires=network-online.target
StartLimitIntervalSec=14400
StartLimitBurst=10
[Service]
Type=notify
User=caddy
Group=caddy
ExecStartPre=/usr/bin/caddy validate --config /etc/caddy/Caddyfile
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile --force
# Do not allow the process to be restarted in a tight loop. If the
# process fails to start, something critical needs to be fixed.
Restart=on-abnormal
# Use graceful shutdown with a reasonable timeout
TimeoutStopSec=5s
LimitNOFILE=1048576
LimitNPROC=512
PrivateTmp=true
ProtectSystem=full
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
As I said: You can not change the user nor the group of the FrankenPHP Worker. You can only change globally your user and give permission to everything instead of two users.
You can only use one user for everything.
The Problem here is I want to use a seperate user and group but also want to run a seperate user for the normal caddy(frankenphp) webserver
I’m not sure I understand your concern regarding users. Since FrankenPHP is Caddy+PHP in one binary, it doesn’t make sense to use two different users for that. They’re inherently tied together. What’s the actual problem here? Just make sure your Nextcloud files are usable by the caddy user.
How are you running FrankenPHP? How did you install it or build it? It should have all those extensions in by default if you’re using a stock build of FrankenPHP.
Please provide as much information as possible. We can’t help you if you only give limited info, we need a full picture of what you’re trying. All we can see if what you write here, don’t assume we know more than we do.