Sign inSign up

zacharmstrong/autoshift

By zacharmstrong

•Updated 3 months ago

Autoshift docker container based on Fabbi/autoshift on github

Image
2

10K+

zacharmstrong/autoshift repository overview

⁠AutoSHiFt Docker Image

Automatically redeem Gearbox SHiFT codes from a container.

This image runs auto.py and keeps its state in /autoshift/data.

⁠Quick Start

docker run \
  --restart=always \
  -e SHIFT_USER='<username>' \
  -e SHIFT_PASS='<password>' \
  -e SHIFT_ARGS='--redeem bl3:steam --schedule -v' \
  -v autoshift:/autoshift/data \
  -e TZ='America/Chicago' \
  zacharmstrong/autoshift:latest
  • Mount /autoshift/data to persist the cookie and database.
  • Pass your credentials with environment variables or secrets.
  • Prefer --redeem inside SHIFT_ARGS for explicit game-to-platform mapping.

⁠Main Environment Variables

VariableRequiredDefaultPurpose
SHIFT_USERYesnoneSHiFT username or email
SHIFT_PASSYesnoneSHiFT password
SHIFT_ARGSNo--scheduleExtra CLI flags passed to auto.py
SHIFT_REDEEMNobl4:steam ttw:epic bl3:epic bl2:epic,steam blps:epic,steam bl1:steamDirect game-to-platform mapping used when set
SHIFT_GAMESNobl4 bl3 blps bl2 bl1Legacy game list fallback
SHIFT_PLATFORMSNoepic steamLegacy platform list fallback
SHIFT_SOURCENobundled default sourceOverride SHiFT code source URL or file
AUTOSHIFT_PROFILENononeUse profile-specific state under /autoshift/data/<profile>/
TZNoAmerica/ChicagoContainer timezone

⁠Usage Patterns

Use SHIFT_ARGS when you want full CLI control:

docker run \
  -e SHIFT_USER='<username>' \
  -e SHIFT_PASS='<password>' \
  -e SHIFT_ARGS='--redeem bl3:steam,epic bl2:epic --schedule --golden -v' \
  -v autoshift:/autoshift/data \
  zacharmstrong/autoshift:latest

Use SHIFT_REDEEM when you want the container defaults plus an explicit mapping:

docker run \
  -e SHIFT_USER='<username>' \
  -e SHIFT_PASS='<password>' \
  -e SHIFT_REDEEM='bl3:steam,epic bl2:epic' \
  -e SHIFT_ARGS='--schedule -v' \
  -v autoshift:/autoshift/data \
  zacharmstrong/autoshift:latest

⁠Docker Compose

services:
  autoshift:
    image: zacharmstrong/autoshift:latest
    container_name: autoshift
    restart: always
    environment:
      TZ: America/Chicago
      SHIFT_USER: <username>
      SHIFT_PASS: <password>
      SHIFT_ARGS: --redeem bl3:steam --schedule -v
    volumes:
      - autoshift:/autoshift/data

volumes:
  autoshift:

⁠Notes

  • The container stores cookies and the redemption database in /autoshift/data.
  • If SHIFT_REDEEM is set, it takes precedence over the legacy SHIFT_GAMES and SHIFT_PLATFORMS flow.
  • Avoid committing credentials in compose files; prefer Docker secrets or environment injection from your runtime.

Full project documentation: https://github.com/zarmstrong/autoshift⁠

Tag summary

Content type

Image

Digest

sha256:0df6a652b…

Size

41.6 MB

Last updated

3 months ago

docker pull zacharmstrong/autoshift