Introduction
Since Tencent Cloud Functions started charging in June, I’ve moved my setup to my own server.
Why write this now? Well, my miHoYo BBS cookies expired and needed replacing, so I’m documenting the process for future reference.
Tools & Original Tutorial
Genshin Impact Helper - Yindan’s Blog
The original post covers many methods, which can be a bit cluttered. This post focuses on the specific method I use.
Tencent Cloud Function Cleanup
Make sure to freeze your Tencent Cloud Functions to avoid any unexpected charges.
If you don’t need the service anymore, you can cancel your account, but be aware that account deletion requires a photo of you holding your ID.
Prerequisites
Your server must be able to reach miHoYo’s servers: https://mihoyo.com
Run ping mihoyo.com in your SSH terminal to verify connectivity.
One of my servers couldn’t connect, so I had to switch to another one.
Docker Installation
Use the official one-click script. It’s verified to work on Debian 10 and CentOS 7 (use the root account).
Installation command:
| |
For users in Mainland China, you can use the DaoCloud mirror:
| |
Script Installation
Pull the image with the following command:
| |
CentOS Error
I encountered a Can't Connect to Docker Daemon error on CentOS.
Ensure you are root, then run:
| |
Basic Usage
Getting the Cookie
To get your miHoYo Cookie, refer to: Genshin Resin Tracker/Push – yexca’Blog
Note: The Cookie must include the account_id and cookie_token fields.
For multiple accounts, separate Cookies with a #, for example: Cookie1#Cookie2#Cookie3.
Simple Configuration
| |
Just replace <COOKIE_MIHOYOBBS> with your actual Cookie.
Reconfiguring/Updating Cookies
To reconfigure, you usually need to remove and redeploy the container.
Alternatively, if using a configuration file, you just need to swap the Cookie (though Cookies tend to last a long time).
Common Commands
| |
Advanced Usage
You can download the example file and modify it.
- Github: config.json
- Telegram: https://t.me/genshinhelperupdates/5
Installation
Assuming your config file is at /etc/genshin/config.json, use this command to map the volume:
| |
Configuration
You can strip the config file down to only the parameters you need. If you only need the Cookie, it can look like this:
| |
Config Parameters
RANDOM_SLEEP_SECS_RANGE: Random sleep range in seconds before check-in. Set to “0-0” to disable.CHECK_IN_TIME: Daily check-in time. This depends on the environment time, not the timezone. For Docker, set the timezone usingTZ=Asia/Shanghai.CHECK_RESIN_SECS: Interval for checking Genshin Original Resin (in seconds).COOKIE_RESIN_TIMER: Cookies for accounts that need resin tracking.SHOPTOKEN: WeChat points mall token (obtained via packet capture).ONEPUSH: Notification configuration.notifieris the service name,paramsare the required arguments.
OnePush Parameters Overview
bark /
notifier: barkparams:{'required': ['key'], 'optional': ['title', 'content', 'sound', 'isarchive', 'icon', 'group', 'url', 'copy', 'autocopy']}custom /
notifier: customparams:{'required': ['url'], 'optional': ['method', 'datatype', 'data']}dingtalk /
notifier: dingtalkparams:{'required': ['token'], 'optional': ['title', 'content', 'secret', 'markdown']}discord /
notifier: discordparams:{'required': ['webhook'], 'optional': ['title', 'content', 'username', 'avatar_url', 'color']}pushplus /
notifier: pushplusparams:{'required': ['token', 'content'], 'optional': ['title', 'topic', 'markdown']}qmsg /
notifier: qmsgparams:{'required': ['key'], 'optional': ['title', 'content', 'mode', 'qq']}serverchan /
notifier: serverchanparams:{'required': ['sckey', 'title'], 'optional': ['content']}serverchanturbo /
notifier: serverchanturboparams:{'required': ['sctkey', 'title'], 'optional': ['content', 'channel', 'openid']}telegram /
notifier: telegramparams:{'required': ['token', 'userid'], 'optional': ['title', 'content', 'api_url']}wechatworkapp /
notifier: wechatworkappparams:{'required': ['corpid', 'corpsecret', 'agentid'], 'optional': ['title', 'content', 'touser', 'markdown']}wechatworkbot /
notifier: wechatworkbotparams:{'required': ['key'], 'optional': ['title', 'content', 'markdown']}
Push Examples
| |
Docker config mapping directory: /etc/genshin:/app/genshincheckinhelper/config