Docker Compose
Run the open-source FoxDesk edition with Docker Compose: the application, MariaDB and a background worker, started from the prebuilt image.
These instructions apply only to the open-source FoxDesk edition installed on infrastructure you manage.
None of the server, PHP, database, cron, backup, or update requirements on this page apply to FoxDesk Cloud.
Try FoxDesk CloudWhat Docker Compose starts
The FoxDesk repository includes a docker-compose.yml with three services:
| Service | Purpose |
|---|---|
app |
Web server with PHP 8.2 and Apache. Publishes port 8080 on 127.0.0.1 by default. |
cron |
Runs FoxDesk background tasks once a minute: email intake, recurring tickets, reminders and scheduled reports. |
db |
MariaDB 11. It is not published outside the Compose network. |
Application files, config.php, uploads, storage, backups and the database live in named volumes, so they survive container restarts and image upgrades.
Start with the prebuilt image
You need Docker Engine with the Compose plugin (docker compose).
git clone https://github.com/lukashanes/foxdesk.git
cd foxdesk
cp .env.example .env
Edit .env and set DB_PASSWORD and DB_ROOT_PASSWORD. Compose refuses to start without them. One way to generate a value is openssl rand -hex 24.
Every release is published as an image for amd64 and arm64 on GitHub Container Registry. Pin the release in .env and start the stack without a local build:
echo "FOXDESK_IMAGE=ghcr.io/lukashanes/foxdesk:X.Y.Z" >> .env
docker compose pull app cron
docker compose up -d --no-build
docker compose ps
Replace X.Y.Z with the current version from the release list. Pin a version instead of latest, so a restart never changes the release unexpectedly. app and db should report healthy.
To build the image from the source instead, skip the FOXDESK_IMAGE line and run:
docker compose up -d --build
Run the installer
Open http://localhost:8080/install.php and complete the two installer steps. In the database step enter:
| Field | Value |
|---|---|
| Database host | db |
| Port | 3306 |
| Database name | DB_NAME from .env (default foxdesk) |
| Database user | DB_USER from .env (default foxdesk) |
| Password | DB_PASSWORD from .env |
The installer creates the database schema and writes config.php into its own volume. It also stores the address you used as the application URL, so run it through the public HTTPS address if FoxDesk will sit behind a reverse proxy.
Put HTTPS in front
FoxDesk redirects plain HTTP to HTTPS for every host name except localhost and 127.0.0.1. A real deployment therefore needs a TLS reverse proxy in front of the app service. Keep the published port on 127.0.0.1, so only the proxy can reach the container. With Caddy on the host:
helpdesk.example.com {
reverse_proxy 127.0.0.1:8080
}
Updates and backups
Install new FoxDesk releases with the in-app updater in Admin > Settings > System. It backs up the files and the database first and offers a one-click rollback. To move the image to a newer release, change the version in FOXDESK_IMAGE and run the same pull and up -d --no-build commands. The container backs up the database and files before it upgrades them.
In-app backups do not include uploads or storage. The full Docker guide on GitHub describes complete backups, restore, Traefik and every configuration variable.
