Ofelia with Docker: Cron Jobs for Your Containers, Set with Labels (Linux, Windows, Mac)
Before you start
- 19 min read
Boxes marked Run in terminal are what you type; plain text explains why. Check what you need first

What you get in one minute#
Ofelia is a small, free, open-source scheduler for Docker: it runs commands on a timetable inside your running containers, in a fresh container, or in its own container, and you describe each job as Docker labels in your Compose file. It replaces cron jobs you would otherwise install inside every image.

Logo: the official Ofelia project (github.com/mcuadros/ofelia, file static/avatar.png at commit 754f920). The project does not state a licence for the artwork.
Typical jobs are a nightly database dump or a weekly clean-up. The job sits next to its app: one label for the time, one for the command. We build a PostgreSQL backup that runs every night and keeps 14 days. Ofelia has no web page and opens no port.
| What | Value (official sources, read 3 December 2026) |
|---|---|
| Current version | Ofelia 0.3.23, released 15 November 2026 (previous: 0.3.22, 11 April 2026). A beta, 0.4.0-beta.6, came out the same day |
| Image to pin | mcuadros/ofelia:0.3.23 (checked on Docker Hub; amd64, arm64, 386, arm/v7, arm/v6) |
| Time needed | About 40 minutes (our estimate, not measured) |
| Size | About 13 MB compressed for amd64. No official RAM figure |
| Ports | None |
| Licence | MIT |
| Official docs | README and jobs reference |
At a glance:
- What it is: one tiny container with the Docker socket mounted.
- Four job types:
job-exec,job-run,job-local,job-service-run. - Configure with: Docker labels or an INI file.
- Messages: Slack-style webhook or email only (no ntfy or Telegram in 0.3.23).
- The big warning: the Docker socket gives Ofelia root-level power over the host.
Is the project alive? Yes, calmly: last push 24 November 2026, about 150 open issues. The nine changes in 0.3.23 are all dependency or base-image updates; features go into the 0.4 betas. A fork, netresearch/ofelia, has a web page and a different start command: a separate project, so do not mix instructions. We did not test it.
How it fits together#
Ofelia reads the labels of your containers once at start, builds a timetable, and at each set time calls the Docker API to run your command. It then saves a report and can send a message.
Drawn for this guide from the official docs and the source code. The red box is the part to be careful with.
A job is one scheduled command. Ofelia reads labels only once, when it starts. That one fact explains most reported problems.
Before you start#
Note: every password, domain, webhook and e-mail address on this page is a dummy example (like
change-meorexample.com). Replace it with your own and keep real secrets out of Git.
| System | What to have |
|---|---|
| Linux | Docker Engine and the Compose plugin |
| Windows | Windows 10 or later, Docker Desktop (WSL 2), PowerShell |
| Mac | Docker Desktop, Intel or Apple Silicon |
docker --version docker compose version
- [ ] Both commands print a version
- [ ] You know your time zone name, such as
Europe/London - [ ] You accept that Ofelia gets control of Docker (see Security)
Tested by DIY Lab Hub: not yet. Commands come from the official README, the jobs reference and the source code at tag v0.3.23, read on 3 December 2026. We did not run them on a real machine, so log lines below are marked as examples.
Step 1: Create the folders and the secrets file#
Everything lives under ~/docker_volumes/ofelia. The demo PostgreSQL keeps its data in a Docker volume, so folder permissions on Windows and Mac cannot get in the way. If you already have a database, you only need the labels from Step 3.
Linux#
mkdir -p ~/docker_volumes/ofelia/{config,logs,backups}
cd ~/docker_volumes/ofelia
cat > .env << 'EOF'
POSTGRES_PASSWORD=change-me-to-a-long-random-password
TZ=Europe/London
EOF
chmod 600 .env
The password is a dummy: replace it, and TZ too.
Windows (PowerShell)#
$base = "$HOME\docker_volumes\ofelia"
foreach ($d in "config","logs","backups") {
New-Item -ItemType Directory -Force "$base\$d" | Out-Null
}
Set-Location $base
@'
POSTGRES_PASSWORD=change-me-to-a-long-random-password
TZ=Europe/London
'@ | Set-Content -Encoding ascii .env
Mac (Terminal)#
Same commands as Linux.
Check it worked. ls -la (Windows: Get-ChildItem -Force) shows .env and the three folders.
Tip: Ofelia runs in UTC unless you set
TZ, so "03:30" would mean 03:30 UTC. We passTZin Step 3. That it moves the schedule is our reading of the code; we did not run it.
Step 2: Write the backup script#
Ofelia does not run your command through a shell (see Common mistakes), so we put the work in a small script that Ofelia starts with sh. It runs inside the database container, where pg_dump exists. The official PostgreSQL image allows local socket connections without a password, so the script holds no secret.
Linux#
cd ~/docker_volumes/ofelia
cat > config/backup-db.sh << 'EOF'
#!/bin/sh
# appdb is a dummy database name - replace with yours
set -eu
umask 077
stamp=$(date -u +%Y%m%d-%H%M%S)
final="/backups/appdb-${stamp}.dump"
tmp="${final}.partial"
trap 'rm -f "$tmp"' EXIT
pg_dump --no-password --username=postgres --dbname=appdb --format=custom --file="$tmp"
mv "$tmp" "$final"
find /backups -name 'appdb-*.dump' -mtime +14 -delete
echo "Backup written: $final"
EOF
Windows (PowerShell)#
The script needs Unix line endings, or sh stops at the first line. This version writes it that way.
Set-Location "$HOME\docker_volumes\ofelia"
$script = @'
#!/bin/sh
# appdb is a dummy database name - replace with yours
set -eu
umask 077
stamp=$(date -u +%Y%m%d-%H%M%S)
final="/backups/appdb-${stamp}.dump"
tmp="${final}.partial"
trap 'rm -f "$tmp"' EXIT
pg_dump --no-password --username=postgres --dbname=appdb --format=custom --file="$tmp"
mv "$tmp" "$final"
find /backups -name 'appdb-*.dump' -mtime +14 -delete
echo "Backup written: $final"
'@
[System.IO.File]::WriteAllText("$HOME\docker_volumes\ofelia\config\backup-db.sh", $script.Replace("`r`n", "`n"))
Mac (Terminal)#
Same commands as Linux.
set -eu makes Ofelia see a failure. umask 077 keeps dumps private. The .partial file means an interrupted dump never looks finished. --format=custom makes an archive for pg_restore (PostgreSQL docs). find ... -delete removes dumps older than 14 days.
Check it worked. config/backup-db.sh exists. On Windows, Get-Content config\backup-db.sh -Raw prints without strange characters.
Step 3: Write the Compose file#
Two services: a demo PostgreSQL with the job labels, and Ofelia. The official examples use latest and a version: line; we pin the tag and leave the line out.
Linux#
cd ~/docker_volumes/ofelia
cat > compose.yaml << 'EOF'
services:
db:
image: postgres:17.12
restart: unless-stopped
environment:
POSTGRES_DB: appdb
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
- ./backups:/backups
- ./config/backup-db.sh:/scripts/backup-db.sh:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d appdb"]
interval: 10s
timeout: 5s
retries: 10
labels:
ofelia.enabled: "true"
ofelia.job-exec.pg-backup.schedule: "@every 1m"
ofelia.job-exec.pg-backup.command: "sh /scripts/backup-db.sh"
ofelia.job-exec.pg-backup.user: "postgres"
ofelia.job-exec.pg-backup.no-overlap: "true"
ofelia:
image: mcuadros/ofelia:0.3.23
restart: unless-stopped
command: daemon --docker
depends_on:
db:
condition: service_healthy
environment:
TZ: ${TZ}
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./logs:/reports
labels:
ofelia.save-folder: "/reports"
ofelia.save-only-on-error: "false"
volumes:
pgdata:
EOF
Windows (PowerShell)#
Set-Location "$HOME\docker_volumes\ofelia"
@'
services:
db:
image: postgres:17.12
restart: unless-stopped
environment:
POSTGRES_DB: appdb
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
- ./backups:/backups
- ./config/backup-db.sh:/scripts/backup-db.sh:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d appdb"]
interval: 10s
timeout: 5s
retries: 10
labels:
ofelia.enabled: "true"
ofelia.job-exec.pg-backup.schedule: "@every 1m"
ofelia.job-exec.pg-backup.command: "sh /scripts/backup-db.sh"
ofelia.job-exec.pg-backup.user: "postgres"
ofelia.job-exec.pg-backup.no-overlap: "true"
ofelia:
image: mcuadros/ofelia:0.3.23
restart: unless-stopped
command: daemon --docker
depends_on:
db:
condition: service_healthy
environment:
TZ: ${TZ}
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./logs:/reports
labels:
ofelia.save-folder: "/reports"
ofelia.save-only-on-error: "false"
volumes:
pgdata:
'@ | Set-Content -Encoding ascii compose.yaml
Mac (Terminal)#
Same commands as Linux.
| Line | Why |
|---|---|
ofelia.enabled: "true" | Ofelia only looks at containers with this label |
ofelia.job-exec.pg-backup.* | Format ofelia.<job type>.<job name>.<setting>; the name has no dot |
schedule: "@every 1m" | A fast test value; Step 6 replaces it |
user: "postgres" | The job-exec default is root |
no-overlap: "true" | A run that is still busy blocks the next one |
depends_on healthy | Ofelia must start AFTER its targets |
:ro on the socket | Does not make the Docker API read-only |
The Ofelia service needs no ofelia.enabled: the image already has the labels ofelia.enabled=true and ofelia.service=true (its Dockerfile at the tag). The second marks the scheduler.
Check it worked. docker compose config -q prints nothing when the file is valid. Do not share plain docker compose config: it shows your password. We did not run this on Docker Desktop; mounting the socket is the documented method there too.
Step 4: Start the database and test the script by hand#
Test the exact command yourself first. A job that fails at 03:30 teaches you nothing.
Linux#
cd ~/docker_volumes/ofelia
docker compose up -d db
docker compose ps
docker compose exec -u root db chown postgres:postgres /backups
docker compose exec db psql -U postgres -d appdb -c "CREATE TABLE notes (id serial PRIMARY KEY, body text);"
docker compose exec db psql -U postgres -d appdb -c "INSERT INTO notes (body) VALUES ('hello');"
docker compose exec -u postgres db sh /scripts/backup-db.sh
docker compose exec db ls -l /backups
Windows (PowerShell)#
Set-Location "$HOME\docker_volumes\ofelia"
docker compose up -d db
docker compose ps
docker compose exec -u root db chown postgres:postgres /backups
docker compose exec db psql -U postgres -d appdb -c "CREATE TABLE notes (id serial PRIMARY KEY, body text);"
docker compose exec db psql -U postgres -d appdb -c "INSERT INTO notes (body) VALUES ('hello');"
docker compose exec -u postgres db sh /scripts/backup-db.sh
docker compose exec db ls -l /backups
Mac (Terminal)#
Same commands as Linux.
We did not run this. A good result is the line Backup written: /backups/appdb-<date>-<time>.dump and a listing with that file.
Check it worked. db shows healthy and the dump file exists. The chown lets postgres write into your mounted folder; on Windows and Mac it may do nothing, which is fine if the script works.
Tip: On Linux the dump belongs to the numeric
postgresuser with mode 600, so your own user cannot read it. That is on purpose: usesudo, or look withdocker compose exec db ls -l /backups.
Step 5: Start Ofelia and watch it work#
Linux#
cd ~/docker_volumes/ofelia docker compose up -d docker compose logs --tail=30 ofelia
Windows (PowerShell)#
Set-Location "$HOME\docker_volumes\ofelia" docker compose up -d docker compose logs --tail=30 ofelia
Mac (Terminal)#
Same commands as Linux.
Wait two minutes, then read the log again and run docker compose exec db ls -l /backups. We did not run this. Issue reports and the source show lines of this shape (times differ): New job registered "pg-backup" - "sh /scripts/backup-db.sh" - "@every 1m", then per run Started - ..., StdOut: Backup written: ... and Finished in "<time>", failed: false, skipped: false, error: none.
Check it worked. The log shows New job registered, a new .dump appears about once a minute, and logs fills with files like <date>_<time>_pg-backup.stdout.log, .stderr.log and .json.
Step 6: Set the real schedule#
In Ofelia 0.3.x the FIRST of six fields is seconds. 0 30 3 * * * is 03:30:00 every day.
Linux#
cd ~/docker_volumes/ofelia sed -i 's/"@every 1m"/"0 30 3 * * *"/' compose.yaml docker compose up -d docker compose restart ofelia docker compose logs --tail=10 ofelia
Windows (PowerShell)#
Set-Location "$HOME\docker_volumes\ofelia" (Get-Content compose.yaml) -replace '"@every 1m"', '"0 30 3 * * *"' | Set-Content -Encoding ascii compose.yaml docker compose up -d docker compose restart ofelia docker compose logs --tail=10 ofelia
Mac (Terminal)#
cd ~/docker_volumes/ofelia sed -i '' 's/"@every 1m"/"0 30 3 * * *"/' compose.yaml docker compose up -d docker compose restart ofelia docker compose logs --tail=10 ofelia
Check it worked. The log shows New job registered "pg-backup" ... "0 30 3 * * *". The restart is required: up -d recreates the database because its labels changed, but Ofelia keeps the old timetable until it restarts.
| Schedule | Meaning |
|---|---|
@every 10s, @every 1h30m | Repeats at that interval. Go durations: s, m, h only, no d |
@hourly, @daily, @weekly, @monthly | Start of the hour, day, week, month |
0 */5 * * * * | Every five minutes |
Reports and messages#
Ofelia has three reporters. Their settings are labels on the Ofelia container (in an INI file, under [global]), wherever the job runs.
| Setting | What it does |
|---|---|
save-folder, save-only-on-error | Writes stdout, stderr and a JSON result per run. The folder must already exist |
slack-webhook, slack-only-on-error | Posts to a Slack-style incoming webhook |
smtp-host, smtp-port, smtp-user, smtp-password, smtp-tls-skip-verify, email-from, email-to, mail-only-on-error | Sends an email with the output attached. email-to may list several addresses separated by commas |
Each reporter has its own only-on-error switch; there is no general one. Add these labels to the ofelia service, with secrets in .env. All values are dummies, and we did not test Slack or email delivery:
labels:
ofelia.slack-webhook: "${SLACK_WEBHOOK}"
ofelia.slack-only-on-error: "true"
ofelia.smtp-host: "smtp.example.com"
ofelia.smtp-port: "587"
ofelia.smtp-user: "[email protected]"
ofelia.smtp-password: "${SMTP_PASSWORD}"
ofelia.email-from: "[email protected]"
ofelia.email-to: "[email protected]"
ofelia.mail-only-on-error: "true"
Tip: A command, label or webhook shows up in
docker inspect, in the log lineStarted - <command>and often in the Slack or email text. The source even logs the whole webhook URL when a Slack call fails. Never put a password into a command.
Ofelia never deletes old reports (we found no clean-up code), so rotate logs yourself. A mail server that wants a login on an unencrypted connection is refused with Mail error: "unencrypted connection" (issue 173, open).
Labels or config.ini#
Pick one per Ofelia container. daemon --docker reads labels; daemon --config=<file> reads an INI file. The source chooses one of the two, so a mounted INI file is ignored when --docker is set.
Labels keep the job next to the app but need the targets running first. An INI file reads no labels, so start order does not matter, but you write container = <Docker name> yourself.
The same backup as an INI file (the container name is what docker ps shows, such as ofelia-db-1):
[global] save-folder = /reports [job-exec "pg-backup"] schedule = 0 30 3 * * * container = ofelia-db-1 command = sh /scripts/backup-db.sh user = postgres no-overlap = true
Mount it read-only at /etc/ofelia/config.ini and use command: daemon --config=/etc/ofelia/config.ini. The INI reader treats # and ; as comments and rejects some backslash escapes (issue 92), so keep long commands in a script.
The four job types#
All need schedule. Only job-exec labels may sit on an app container; the other three count only on the Ofelia container (from the source; elsewhere they are silently ignored).
| Type | Runs | Needs |
|---|---|---|
job-exec | Inside a running container, like docker exec | command; container is set for you |
job-run | In a new container from an image, removed afterwards (delete defaults to true). Without image it starts a stopped container | image or container; optional command, volume, network, environment |
job-local | In the Ofelia container itself, not on the host | command |
job-service-run | As a one-off Swarm service | image; optional network, user. Not covered here |
A job-run example with labels on the Ofelia service (the alpine tag is the one Ofelia's own test setup uses; the path is a dummy):
labels:
ofelia.job-run.write-date.schedule: "@hourly"
ofelia.job-run.write-date.image: "alpine:3.24.4"
ofelia.job-run.write-date.command: "sh -c 'date >> /out/date.txt'"
ofelia.job-run.write-date.volume: "/path/on/the/docker/host:/out:rw"
Several volumes or variables go in as a JSON array inside a string, such as '["FOO=bar","BAZ=qux"]'. Bind-mount paths are paths on the Docker host. In the source, job-run also has a pull setting (default true, not in the jobs reference): it tries to pull the image before every run, which counts against registry limits. Set it to false for images you already have.
job-local surprises many people: Ofelia's small Alpine image has no curl, rsync or your scripts (issue 199). Use job-run with an image that has the tool.
Put it behind HTTPS with Traefik? You do not need to#
Ofelia serves no web page and listens on no port, so there is nothing to put behind Traefik or Caddy. The web page belongs to the fork.
With Traefik#
No labels are needed. For a browser tool to manage your containers, see our Traefik guide with Dockge, Komodo or Arcane.
Without Traefik: Caddy#
No reverse_proxy line is needed either. For HTTPS in front of other apps, see our Caddy guide.
Security and testing#
| Control | How |
|---|---|
| Docker socket | Root-level power over the host. Docker's docs say "only trusted users should be allowed to control your Docker daemon". :ro only protects the socket file, not API calls |
| Who may edit | Anyone who can change Ofelia's labels, image or INI file can run commands on your host. Guard the Compose files like root passwords |
| Socket proxy | Ofelia needs write calls (exec, create container), so a read-only proxy cannot serve it, and one that allows writes is wide (our socket proxy guide). We did not test a proxy and give no recipe |
| Secrets and data | .env with chmod 600, never in Git or a command. Dumps and reports hold your data: keep the folders private |
Quick tests:
cd ~/docker_volumes/ofelia docker compose ps docker compose logs --tail=50 ofelia docker compose exec db ls -l /backups
Common mistakes#
| Mistake | Why it happens | Do this instead |
|---|---|---|
0 2 * * * or * * * * * as in classic cron (issue 56) | In 0.3.x the first field is seconds, the last may be left out. * * * * * runs every second; 0 2 * * * runs at minute 2 of every hour (from the source) | Six fields, 0 0 2 * * *, or @daily |
| Targets that start after Ofelia or are recreated later (issue 78: only the scheduler's own job appeared) | Labels are read once at start | depends_on for every target; docker compose restart ofelia after recreating one |
Quotes inside list labels, or two labels: keys (issue 99, 134) | The quote marks become part of the value: New job registered "datecron" - "\"date\"" - "\"@every 1s\"", or "postrges_backup" - "" - "". Then unable to start a empty scheduler. | One labels: mapping with quoted values: ofelia.job-exec.x.schedule: "@every 1s" |
A command with >, a pipe, backticks or $(...) (issue 92: error non-zero exit code: 1) | Ofelia splits the command into words for Docker, like docker exec. No shell reads it | sh -c '...' or a script as in Step 2 |
container = php with a Compose service name (issue 222: error creating exec: No such container: php) | Ofelia knows Docker container names such as project-php-1 | Copy the name from docker ps, or label the target |
job-local with curl or a host script (issue 199: exec: "curl": executable file not found in $PATH) | "Local" is Ofelia's own container | job-run with an image that has the tool |
AI assistants: 0 2 * * *, a latest tag, "automatic discovery of new containers", or a --enable-web flag | The 0.4 beta and the fork are mixed into 0.3.x. Our version has no web page | Pin 0.3.23, six fields, daemon --docker, restart Ofelia after changes |
AI assistants: job-run labels on the app container, or @every 1d | Only job-exec labels work there; @every takes Go durations | Put them on Ofelia; @every 24h |
Tip: After any label change run
docker compose up -din the app's folder, thendocker compose restart ofelia. Editing the file alone changes nothing that runs.
Tip: See what Docker really holds with
docker inspect <container> --format '{{json .Config.Labels}}'(Windows: keep the single quotes). A label missing there was never seen by Ofelia.
Tip: Keep
no-overlap: "true"on slow jobs. A 30-minute job on@every 10mwould pile up without it.
Troubleshooting#
| Problem | Solution |
|---|---|
| Ofelia restarts again and again | docker compose logs ofelia. An empty timetable makes it exit, and restart: starts it again. Fix the labels |
| A job never runs | No New job registered line means no label was read. Is the target running before Ofelia? |
| The job runs but fails | Run the command by hand: docker compose exec -u <user> <service> ... |
| Wrong run time | Set TZ; the first field is seconds |
Exact error texts#
unable to start a empty scheduler.(99, 134, 398): no usable job. Check quotes, a duplicatelabels:,ofelia.enabled, and that the socket is reachable. In issue 398DOCKER_HOSTwas listed without a value.Failed to register job "<name>" - "<command>" - "<schedule>"(from the source): the schedule could not be read, such as@every 1d. The job is dropped.error unexpected, docker has returned exit code -1, maybe wrong user?(from the source): usually auserthat is not in the container.dial unix /var/run/docker.sock: connect: no such file or directory(issue 155): the socket is not mounted. Mount it in every mode, also with an INI file.dial unix /var/run/docker.sock: connect: permission denied(issue 176, open): user-namespace remapping. Do notchmod 666the socket.
Known bugs (open, December 2026)#
Issue 474: job-service-run splits quoted arguments on spaces. Issue 318: job-run cannot start a Compose container that was never created (No such container: cert), for example behind a profile. Issue 357: in the 0.4 beta, targets are not updated after a redeploy. We found nothing that stops a normal 0.3.23 install.
Updates and backups#
Update Ofelia. Read the release notes, change the tag, then:
cd ~/docker_volumes/ofelia docker compose pull docker compose up -d
The 0.4 beta makes seconds optional, so 5-field schedules mean something different, and since beta 5 it listens to Docker events. We have not used it. Our Diun guide tells you when a new tag appears.
What to back up. .env, compose.yaml, config and backups; Ofelia stores nothing. A dump on the same disk is not a backup: copy backups to another machine, or see our docker-volume-backup guide.
Linux and Mac#
Save as ~/docker_volumes/ofelia/backup.sh:
#!/usr/bin/env bash set -euo pipefail base="$HOME/docker_volumes/ofelia" out="$base/ofelia-config-$(date +%F).tar.gz" tar -czf "$out" -C "$base" .env compose.yaml config chmod 600 "$out"
Run chmod 700 on it and add this line with crontab -e (on a Mac write /Users/<your-user>/...). Plain cron is fine here: it needs no container.
0 4 * * * /home/<your-user>/docker_volumes/ofelia/backup.sh
Windows (PowerShell)#
Save as $HOME\docker_volumes\ofelia\backup.ps1:
$base = "$HOME\docker_volumes\ofelia" $out = "$base\ofelia-config-$(Get-Date -Format yyyy-MM-dd).tar.gz" tar.exe -czf $out -C $base .env compose.yaml config
In Task Scheduler run powershell.exe -NoProfile -File <full-path-to-the-script> daily at 04:00.
Restore test#
A backup counts only after a restore works. Restore the newest dump into a scratch database (use a real file name from ls):
cd ~/docker_volumes/ofelia docker compose exec db createdb -U postgres restore_test docker compose exec db pg_restore -U postgres -d restore_test /backups/appdb-<date>-<time>.dump docker compose exec db psql -U postgres -d restore_test -c "SELECT count(*) FROM notes;" docker compose exec db dropdb -U postgres restore_test
The count should be 1 for our demo row. A dump covers one database, not the users and settings of the whole server (PostgreSQL docs).
Performance and resources#
The docs give no RAM or CPU figure and we measured none; run docker stats. The image is about 13 MB compressed. The load is small: one Go process that wakes at the set times. Output is kept in memory per run, capped at 10 MB in the source.
FAQ#
Is Ofelia just cron in a container? Almost. It speaks the Docker API, so it can run a command inside another container, start a fresh one and report the result.
Do I need Ofelia for one backup? No. A host cron job that calls docker exec works too. Ofelia pays off with many jobs, kept next to their apps, with reports.
Why did my new container not get its job? Labels are read at start. Restart Ofelia after you add or recreate a target.
Should I try the 0.4 beta or the fork? Not for a first setup. Both change schedules, discovery or the start command, and we tested neither.
Sources#
- Ofelia repository, release v0.3.23 (15 November 2026), LICENSE (MIT)
- At tag v0.3.23: README, jobs reference, Dockerfile, label parsing, scheduler; 0.4 beta README
- robfig/cron v1.2.0, image tags on Docker Hub (
latesthas the same digest as0.3.23), fork netresearch/ofelia (read, not tested) - Docker daemon attack surface, PostgreSQL pg_dump, PostgreSQL image
- Issues read (all linked above): 56, 78, 92, 99, 134, 155, 173, 176, 199, 222, 318, 357, 398, 474
Checked against the official docs on 2026-12-03. Nothing was run on a real machine by DIY Lab Hub; the commands come from the docs, the source and the issues above.