Running your own package server
This page is for developers, agencies and hosts who want installations to download site packages from a server of their own: for packages that are not public yet, for a set tested for one customer, or as a mirror. Nothing on a package server runs code; it is a folder of files served over HTTPS.
7x and the Exponential Foundation strongly encourage you to also submit your site package by pull request to se7enxweb/exponential.packages.exponential.earth, the server every installation reads by default: see Contribute your site package.
Contents
- What a server must answer
- The folder layout
- A complete index.xml
- Hosting on GitHub Pages
- Hosting on any web server
- Limits and checks of the clients
- Checklist
What a server must answer
The clients read one file, <index URL>/index.xml, and then each archive at the url the index gives:
| Client | Reads | Code |
|---|---|---|
setup wizard, kickstarter, exp:install | package.ini [RepositorySettings] RemotePackagesIndexURL + /index.xml | kernel/setup/steps/ezstep_site_types.php |
ezupdate (Package servers, fetch) | the server's URL + /index.xml | extension/ezupdate/classes/ezupdatepackageservers.php |
The 7x server answers at https://exponential.packages.exponential.earth/exponential/6.0/6.0.15/index.xml. More on
What the package server is.
The folder layout
Mirror the 7x layout, so RemotePackagesIndexURLBase works for your server too (the kernel appends
/<major.minor>/<version> when RemotePackagesIndexURL is empty):
https://packages.example.com/exponential/
└── 6.0/
└── 6.0.15/
├── index.xml
├── acme_site.ezpkg
├── acme_site_democontent.ezpkg
└── thumbnails/
└── acme_site.pngOne folder per Exponential release keeps old installations working: an installation of 6.0.14 keeps reading its folder while you publish for the next release.
A complete index.xml
<packages vendor="acme">
<package name="acme_site_democontent" type="contentobject"
url="https://packages.example.com/exponential/6.0/6.0.15/acme_site_democontent.ezpkg"/>
<package name="sevenx_classes" type="contentclass"
url="https://exponential.packages.exponential.earth/exponential/6.0/6.0.15/sevenx_classes.ezpkg"/>
<package name="acme_site" version="1.0.0-1" type="site"
summary="Acme starter site"
description="What an editor gets after installing it."
url="https://packages.example.com/exponential/6.0/6.0.15/acme_site.ezpkg"
thumbnail_url="https://packages.example.com/exponential/6.0/6.0.15/thumbnails/acme_site.png"/>
</packages>- The root element must be
<packages>; the wizard reports "Malformed index file." otherwise. - Every
<package>needsnameandurl; site packages alsotype="site"(the wizard lists only those), asummary, aversionand athumbnail_url. The 7x index uses the same attributes. - Every package a site package requires must be in the same index. The wizard looks a required package up in the
index it read, not on other servers. Its
urlmay point anywhere, including the 7x server, assevenx_classesdoes above.
The format in full: The index.xml format.
Hosting on GitHub Pages
The 7x server is the repository se7enxweb/exponential.packages.exponential.earth published by GitHub Pages:
| File | Role |
|---|---|
exponential/6.0/<version>/ | the release folders |
CNAME | the custom domain the Pages site answers on |
.github/workflows/workflow.yml | on every push: checks out the branch master, generates directory listings with jayanta525/github-pages-directory-listing, uploads the tree and deploys it with actions/deploy-pages; one deployment at a time (concurrency: pages) |
To do the same: create a repository, add the folders and a copy of the workflow (change ref: to your default
branch), enable GitHub Pages for the repository, and optionally add a CNAME with your domain.
Details on The package server on GitHub.
Note
Each deployment publishes the whole tree as of its commit, and, as settings/package.ini puts it, "a package server
that is being republished answers with errors for a few minutes". The setup wizard retries for that reason (DownloadAttempts, DownloadRetryDelays[]); see
When the package server cannot be reached.
Hosting on any web server
Any server that serves static files over HTTPS works:
rsync -av exponential/ [email protected]:/srv/packages/exponential/
curl -sI https://packages.example.com/exponential/6.0/6.0.15/index.xml | head -1Serve the folder read-only, with no scripts, and keep the files in git so every published state can be traced.
Limits and checks of the clients
| Check | Setup wizard | ezupdate |
|---|---|---|
| Scheme | any URL PHP can fetch | https:// only, also for redirects |
| HTTP status | an answer other than 200 fails the attempt | an error status fails |
| Archive | must start with the gzip signature, must not be empty or shorter than announced | at most 256 MiB |
| Index | parsed as XML, root <packages> | at most 1 MiB, root <packages> |
| Retries | DownloadAttempts (3) with DownloadRetryDelays[] (2, 5, 10 s) | none |
| Timeouts | DownloadTimeout 300 s, DownloadConnectTimeout 30 s | 300 s, connect 15 s |
Use HTTPS for every URL in your index so both clients accept it.
Checklist
- To do:
curl -sIonindex.xml, each archive and each thumbnail answers200. - To do:
xmllint --noout index.xmlpasses. - To do: Each archive passes
php ezpm.php validate(Rebuilding with build.sh). - To do: Every
<require>of every site package has an entry in the index. - To do: Index
versionvalues equal the archives'<number>-<release>. - To do: A dry run against the server succeeds (Testing in a sandbox).
Related pages
- Making your own site package
- Contribute your site package
- Pointing a site at your package server
- Offline installs and mirrors
- Package server settings
- Site packages: start here
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.