Backing up your records to your own database

Timeclock Backup is a free app that copies your people, shifts, rosters, time off, jobs and visitor sign-ins into your own PostgreSQL database every 4 hours. It runs in Docker on Windows, Mac or Linux.

You need

  • Docker (Docker Desktop on Windows and Mac).
  • A PostgreSQL database (version 12 or newer). Don't have one? See below.
  • An API key from the portal: Settings > API.

Set it up

  1. Make a folder and save this in it as compose.yml:

    services:
      timeclock-backup:
        image: ghcr.io/timeclock-kiwi/timeclock-backup:latest
        restart: unless-stopped
        ports:
          - "127.0.0.1:8080:8080"
        volumes:
          - timeclock-backup-data:/data
        extra_hosts:
          - "host.docker.internal:host-gateway"
    
    volumes:
      timeclock-backup-data:
    
  2. Open a terminal in that folder and run:

    docker compose up -d
    
  3. Go to http://localhost:8080 and choose a user name and password for the app.

  4. In Settings, paste your API key and enter your database details. If PostgreSQL is on the same computer, the server is host.docker.internal.

  5. Press Test connection, then Save.

The first backup starts within a minute. The Status page shows each backup, and Back up now runs one straight away.

No database yet?

Add this under services: in compose.yml, choose your own password, and add postgres-data: under volumes: at the bottom:

  postgres:
    image: postgres:17
    restart: unless-stopped
    environment:
      POSTGRES_DB: timeclock_backup
      POSTGRES_USER: timeclock
      POSTGRES_PASSWORD: choose-a-password
    volumes:
      - postgres-data:/var/lib/postgresql/data

In Settings use server postgres, database timeclock_backup, user timeclock and your password.

Update it

docker compose pull
docker compose up -d

Your settings and backups are kept.

Good to know

  • The tables are in the timeclock schema. shift_report lists finished shifts with names, ready for Excel or Power BI.
  • Nothing is deleted from your copy. Records removed from Timeclock get a removed_at date.
  • The app only opens on the computer it runs on. To use it from other computers, change the port line to "8080:8080" and put it behind HTTPS.
  • Forgot the app password? Remove the "admin" section from config.json in the timeclock-backup-data volume and restart the container.