Install Docker&Docker compose

## Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
## Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/download/latest/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version

Create config file

First create and enter directory: mkdir epic && cd epic

Use nano config.json to create config file,sample config file as follows:

{
      "searchStrategy": "promotion",
      "runOnStartup": true,
      "timezone": "America/Chicago",
      "cronSchedule": "30 12 * * *",
      "logLevel": "info",
      "webPortalConfig": {
        "baseUrl": "http://localhost:3000",
      },
      "accounts": [
        {
          "email": "[email protected]",
          "password": "abc1234",
        },
      ],
       "notifiers": [
         // You may configure as many of any notifier as needed
         // Here are some examples of each type
         {
           "type": "telegram",
           "token": "123456789:XXXXXXXXXXXXXXXXXXXX",
           "chatId": "123456789",
         },
       ],
}

Use ctrl+x to exit editing and enter Y to confirm.

Properties description:

  • cronSchedule:schedule runtime,follow Crontab format,sample config above runs every day at 12:30
  • baseUrl:the URL base that will be returned when a captcha must be remotely solved,default is http://localhost:3000,if you use your own domain, you need to setup reverse proxy
  • email:your epic account email
  • password:your epic account password
  • totp:if your account enable 2FA, you need to fill in the totp
  • type:notification type, sample config use telegram as an example
  • token:TG bot token
  • chatId:group or personal ID, you can use @getuseridbot to get it

Run the program

Once finished configuration, use following command to run the program

docker run -d -v /root/epic/:/usr/app/config:rw -p 3000:3000 -m 2g charlocharlie/epicgames-freegames:latest
  • /root/epic/: Program directory
  • -m 2g: limit maximum memory usage to 2G

Reference

Last modification:June 15, 2022
If you like my post, you can donate to buy me a cup of coffee.