Embedded App: do not extract sources
Open
@dunglas is already working on this.
Since Mar 26, 2026.
enhancement
- Dominant language
- Go
- Stars
- 11.3k
- Forks
- 488
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 11
Description
Describe your feature request
Is your feature request related to a problem? Please describe.
The extraction to /tmp/frankenphp_... brings a few issues with it.
- /tmp must be writable.
- systemd ProtectTmp can lead to unexpected paths
- startup extracts the tar, can be slow
- old files linger in /tmp until restart of the machine
- source code is human readable without any reverse engineering
Describe the solution you'd like
Embedded filesystem inside the binary, rather than extracting the tares?
- possibly encrypted? not a goal to truly make it "secure", but not immediately showing the source code is a plus
Describe your approach
- create named virtual filesystem in go
- redirect caddy to use that vfs for e.g. file_server and matchers
- overwrite php file handlers to redirect to the vfs
- work around possible opcache issues (?)
- find a good solution for folders that need write access (e.g. symfony cache)?
- embed a database...? not sure how this could be possible, but who knows. otherwise create a proof of concept using sqlite.
I'll work on this slowly over the next weeks. Don't expect anything immediately. I think @dunglas mentioned that something like this was planned as a potential commercial offering, so if you don't want me to pick it up, just let me know now before I start.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.