Skip to content

Repository files navigation

Typing SVG

Docker Node.js Discord License Polish


Fork of vogler/free-games-claimer — adds Discord webhooks, slim Dockerfile and structured logging.


✨ What this fork adds

Feature Details
💬 Discord webhook 🟢 started · ✅ claimed · ℹ️ nothing to claim · ❌ error + screenshot
🐳 Slim Dockerfile FROM upstream — builds in ~15 seconds
📋 Structured logging Timestamps + INFO / WARN / ERROR in docker logs
Daemon scheduler No cron needed — sleeps until next 07:00

🎮 Supported platforms


Epic Games

Prime Gaming

GOG

Steam
🛒
AliExpress
FreeGames FreeGames FreeGames FreeGames Points

🚀 Quick Start

Step 1 — Discord webhook

  1. Discord server → Channel settings → IntegrationsWebhooksNew webhook
  2. Copy the webhook URL

Step 2 — Stack

Portainer → Stacks → Add stack → Web editor, paste and fill in your details:

services:
  free-games-claimer:
    container_name: free-games-claimer-dev
    build:
      context: https://github.com/DoSpamu/free-games-claimer.git#master
    restart: unless-stopped
    ports:
      - "6080:6080"   # noVNC — browser preview
      - "5900:5900"   # VNC
    volumes:
      - /mnt/data:/fgc/data

    # Choose platforms — remove or add script names.
    # sleep calculates seconds until next 07:00.
    command: >
      bash -c "node run.js prime-gaming gog epic-games aliexpress;
      sleep $$(( $$(date -d 'tomorrow 07:00' +%s) - $$(date +%s) ))s"

    environment:
      - TZ=Europe/Warsaw
      - SHOW=1
      - LOG_LEVEL=INFO

      # ------ Discord (required for notifications) ------
      - DISCORD_WEBHOOK=https://discord.com/api/webhooks/YOUR_ID/TOKEN

      # ------ VNC ------
      # - VNC_PASSWORD=secretpassword   # recommended!

      # ------ AliExpress ------
      - ALIEXPRESS_EMAIL=your@email.com
      - ALIEXPRESS_PASSWORD=yourpassword

      # ------ Other platforms (OPTIONAL) ------
      # Log in once manually via noVNC (http://IP:6080) — session is saved.
      # Or set credentials here for fully automatic login:
      # - EMAIL=your@email.com        # shared for all platforms
      # - PASSWORD=yourpassword
      # - EG_OTPKEY=                  # Epic Games 2FA key
      # - PG_OTPKEY=                  # Prime Gaming 2FA key
      # - STEAM_USERNAME=             # Steam login name (not email)
      # - STEAM_PASSWORD=

    healthcheck:
      test: curl --fail http://localhost:6080 || exit 1
      interval: 30s
      timeout: 10s
      start_period: 20s
      retries: 3

First build takes ~15 seconds — Portainer pulls the upstream image and applies this fork's overlay.

Step 3 — First login

On first run each platform requires manual login:

  1. Open http://YOUR_IP:6080 — noVNC with Chromium browser
  2. Log in in the open tabs or enter credentials in the terminal
  3. The script waits LOGIN_TIMEOUT seconds (default 180s)

Session is saved in the volume (/mnt/data) — subsequent runs are fully automatic.


💬 Discord notifications

Embed When
🟢 Container started At the beginning of every run
Games claimed When a platform claims games (per platform)
ℹ️ No new games When a platform has nothing to claim
Error + screenshot When a platform script exits with an error

If DISCORD_WEBHOOK is not set — all Discord notifications are skipped, Apprise works normally.


⚙️ Environment variables

General
Variable Default Description
TZ Europe/Warsaw Container timezone
LOG_LEVEL INFO DEBUG / INFO / WARN / ERROR
SHOW 1 Show browser in VNC
VNC_PASSWORD Password for noVNC on :6080
EMAIL Shared email for all platforms
PASSWORD Shared password for all platforms
Discord
Variable Description
DISCORD_WEBHOOK Discord webhook URL (required for notifications)
Epic Games
Variable Description
EG_EMAIL Epic Games email (overrides EMAIL)
EG_PASSWORD Epic Games password
EG_OTPKEY 2FA key — OTP generated automatically
Prime Gaming
Variable Description
PG_EMAIL Prime Gaming email (overrides EMAIL)
PG_PASSWORD Prime Gaming password
PG_OTPKEY 2FA key — OTP generated automatically
GOG
Variable Description
GOG_EMAIL GOG email (overrides EMAIL)
GOG_PASSWORD GOG password
Steam
Variable Description
STEAM_USERNAME Steam login name (not email)
STEAM_PASSWORD Steam password
AliExpress
Variable Description
ALIEXPRESS_EMAIL AliExpress email
ALIEXPRESS_PASSWORD AliExpress password

Full list of upstream options: src/config.js


🕐 Scheduling — no crontab needed

deploy at 15:00  →  scripts run immediately
                 →  sleep calculates: until tomorrow 07:00 = 16h
next day 07:00   →  container wakes up → scripts → sleep until next 07:00
and so on...

TZ=Europe/Warsaw makes date calculate time in the correct timezone.

Override which platforms run:

# Only Prime Gaming and GOG:
command: bash -c "node run.js prime-gaming gog; sleep ..."

# All platforms:
command: bash -c "node run.js steam-games epic-games prime-gaming gog aliexpress; sleep ..."

Available scripts: steam-games · epic-games · prime-gaming · gog · aliexpress


🖥️ noVNC

Open http://YOUR_IP:6080 in your browser — Chromium running inside the container. Useful for first login and debugging.

📋 Logs

docker logs free-games-claimer-dev -f

Or Portainer → Containers → free-games-claimer-dev → Logs.


📝 Changes from upstream

See CHANGES.md.

About

Automatically claim free games on Epic Games, Prime Gaming, GOG, Steam & AliExpress — Discord notifications, Docker deploy, no cron needed

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages