Overview • Requirements • Installation • Common Questions • Updating • Contributing
A simple program to always claim Hoyolab's daily login system for Hoyoverse games. Script was originally made by vermaysha/Hoyolab-Auto-Daily-Checkin, but since the original repository is archived I decided to fork and maintain it myself, along with some improvements and installation guide.
- Supports multiple Hoyolab accounts
- Supports multiple game accounts
- Supports Geetest solving service (2captcha / Capsolver)
- Send Discord notification
- Configurable schedule
Hoyolab account cookie (COOKIE
)
Navigate to Hoyolab website with your account logged in, open developer tools on your browser (F12 for Firefox/Chrome), navigate to Console tab, enter document.cookie
in, and copy the long-string text output without the quotation marks.
(Optional) Discord Webhook URL (DISCORD_WEBHOOK
)
You can have the script notify on a Discord channel via webhook. On any channel where you have webhook permissions in, go into:
Channel Settings > Integrations > Webhooks > New Webhook
You can also choose to use existing one by clicking on Copy Webhook URL
.
You can also configure the script to notify (ping) your Discord ID in case of a login failure. To do this, append DISCORD_ID=1234567890; rest_of_cookie=; ...
at the start your cookie.
(Optional) Whether the script should (RUN_ONCE
) or continuously
This should either be left unset, or a value of True
. Set it to True
if you have an external scheduler (like CRON) to automatically start the script at a certain time. The script will run continuously as a process when this is unset.
(Optional) SCHEDULE
on what time of the day the script will run at
This should either be left unset, or a valid time format (00:00
to 23:59
).
You can also additionally specify the timezone in your env or leave the default as UTC, ex: TIMEZONE=Asia/Kuala_Lumpur
.
Refer to List of tz database time zones.
Running the script on Railway
Railway's Starter plan has an execution limit of 500 hours a month. Since Railway has no option to schedule runtime, this script will run constantly. Make sure you're under their Developer plan to lift the hour limit. It's still free if your resource usage is under their $5 free credit limit, which this script will consume at most $0.50 monthly.
- Sign Up on Railway if you haven't.
- Fork this repo
- Make a new project on Railway and select this option
- Select the new repo you just forked
- Click "Add Variables" and fill in your stuff, refer to the suggestions below it. After you're done it should look like this
- Wait for the build to finish and check your deployment logs to verify it's working
Running the script on Northflank
In addition to hosting your applications, Northflank also lets you schedule jobs to run in CRON format, and their free tier does not have an hourly limit unlike Railway. But in a free project, you are limited to 2 jobs at any time.
- Sign Up on Northflank if you haven't and create a free project. It should look like this:
- Create a new job and select 'Cron job' as the job type.
- Enter the time at which you want the script to run, in CRON format. Refer to crontab.guru for an explanation of cron formatting.
- Select 'External Image' under 'Job source' and use this URL for 'Image path':
ghcr.io/raidensakura/hoyolab-auto-login:master
- Fill in your credentials under 'Environmental Variables'. Make sure to set
RUN_ONCE
toTrue
in the env.
- Save your script. Now, execute it manually by clicking the 'Run job' button, as shown:
- You should see a new entry under 'Recent job runs', as follows:
- Click on it, and then click on its entry under 'Containers'. If your script is working correctly, it should show a log as follows:
Running the script on Zeabur
Zeabur has a free plan that doesn't require a payment method, but like Railway, it has no option to schedule runtime, so this script will run constantly as a Docker container. The downside is that it takes slightly longer to build a Docker image on Zeabur than the other platforms.
- Sign Up on Zeabur if you haven't.
- Fork this repo
- Make a new project and a new service in it, choosing the "Deploy from your source code" option
- Click "Configure GitHub APP" and select the repository you just forked
- Select the "master" branch and click "Deploy"
- Select the new service you just deployed, and fill in your credentials under "Variable". Make sure to not include
RUN_ONCE
otherwise your script will not loop every day. It should look like this afterward
- Under "Deployments", click "Redeploy" for the variable changes to take effect.
-
Which platform should I choose?
If you don't have a payment card for verification, choose Zeabur.
If you want a simple UI and don't mind upgrading to their developer plan, choose Railway.
If you don't want your script to run constantly, choose Northflank. -
If I play multiple Hoyoverse games, does it log into all of them?
The supported games for now are:- Honkai Impact 3rd
- Genshin Impact
- Honkai: Star Rail
If you've bound those game accounts to your Hoyolab account, it will claim the daily login in all of them.
-
How do I log in with multiple Hoyolab accounts?
Add a#
between your cookies.
Example:
COOKIE1#COOKIE2#COOKIE3
-
My
cookie_token
is missing!
Try logging out and logging back into your Hoyolab account. If it still doesn't work, try getting it from the code redemption or daily sign-in webpage instead:- Genshin Impact - Code Redemption | Daily Sign-in
- Honkai: Star Rail - Code Redemption | Daily Sign-in
- Honkai Impact 3 - Daily Sign-in
- Tears of Themis - Daily Sign-in
-
Why aren't you using GitHub Actions?
Using GitHub Actions may violate GitHub's Terms of Service and lead to this repository being taken down. -
If you have any other questions
Feel free to join my Discord server and post your question there. I'll try to reply as soon as I can.
If you're on a fork and want to keep it automatically updated, install and configure the Pull App for your repository.
When suggesting changes, please format your code with black and ruff.
Install dependencies and activate the pipenv with:
pipenv install
pipenv shell
For formatting:
pipenv install --dev
black . ; ruff .
Or alternatively, you can also install pre-commit hooks which run the linters automatically on every commit
pre-commit install
For testing:
pipenv run login