freenom
Freenom 域名自动续期(Docker 版本)。Automatically renew your freenom domain.
500K+
中文文档请参考 这里
This program is used to automatically renew your freenom domain name. As you know, freenom is the only merchant in the world that offers free top-level domains, but it needs to be renewed every year, which is a hassle, and this tedious task should be left to the program. You just need to do a little simple configuration to get the program running.
Note that you need to prepare a Docker environment first, see Docker Official Installation Guide for details on how to install Docker on various Linux distributions.
Github repository:
https://github.com/luolongfei/freenom
latest ( Dockerfile )0.6.1 0.6.20.5 0.5.1 0.5.3 0.5.40.4.3 0.4.4 0.4.50.3koyeblinux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
(Theoretically supports Synology, QNAP, Raspberry Pi and various types of VPS)
The commands are as follows
$ docker run -d --name freenom --restart always -v $(pwd):/conf -v $(pwd)/logs:/app/logs luolongfei/freenom
Or, if you want to customize the script execution time, the command is as follows
$ docker run -d --name freenom --restart always -v $(pwd):/conf -v $(pwd)/logs:/app/logs -e RUN_AT="11:24" luolongfei/freenom
The only difference between the two commands here is that the following command has more -e RUN_AT="11:24" parameters than the above command, where 11:24 means that the task is executed at 11:24 every day, and you can customize this time. The RUN_AT parameter here also supports the time form in the CRON command, for example, -e RUN_AT="9 11 * * *", which means that the renewal task is executed at 11:09 every day. It is worth noting that all the times mentioned here refer to Beijing time (UTC+8)
Note: Customizing the script execution time is not recommended. Because you may define the same time point with many people, which may lead to a group of people launching requests to Freenom's server at the same time, making Freenom unable to provide services stably. If you do not customize the time, the program will automatically specify a random time as the execution time. It will be reassigned every time the container is restarted.
| Command | Meaning |
|---|---|
| docker run | Start running a container |
| -d | The container runs in the background and outputs the container ID |
| --name | Assign an identifier to the container to facilitate future operations such as start, stop, delete, etc. |
| --restart | Configure the container startup type, always means restart the container automatically |
| -v | Mounted volume (volume), the path of the container after the colon, the path of the host before the colon (only absolute paths are supported), $(pwd) indicates the current directory, if it is a Windows system, you can replace $(pwd) with ${PWD} |
| -e | Specify the environment variables in the container |
| luolongfei/freenom | This is the full pathname of the image downloaded from docker hub |
At this point, your auto-renewal container is up and running, after executing ls -a you can see that in your current directory, there is a .env file and a logs directory, the logs directory is used to store the program logs, .env is the configuration file, now directly execute vim .env to change all the configuration items in the .env file to your own and save it. Then execute docker restart freenom to restart the container, and if the configuration is correct, you will soon receive notifications from the program.
| Variable Name | Meaning | Default Value | Must | Remarks |
|---|---|---|---|---|
| FREENOM_USERNAME | Freenom Account | - | yes | If you are using a third-party social account, please bind your email address on the Freenom admin page, and then you can use your email account to log in. |
| FREENOM_PASSWORD | Freenom Password | - | yes | Some special characters may need to be escaped, see the comments in the .env file for details |
| MULTIPLE_ACCOUNTS | Configure multiple accounts | - | no | The format of multiple accounts and passwords must be "<account1>@<password1>|<account2>@<password2>|<account3>@<password3>", if multiple accounts are set here, the above FREENOM_USERNAME and FREENOM_PASSWORD can be configured without |
| MAIL_USERNAME | Robot email account | - | no | Support Gmail, QQ mailbox, 163 mailbox and Outlook mailbox. For details, please refer to Configuring the mail delivery function |
| MAIL_PASSWORD | Robot's email password | - | no | Recommend filling in the application-specific password for gmail: https://support.google.com/mail/answer/185833 |
| TO | Mailbox for receiving notifications | - | no | Your own most commonly used email address for receiving domain-related emails from the bot |
| MAIL_ENABLE | Whether to enable the email push function | 0 | no | 1: enabled0: not enabledNot enabled by default, if set to 1 to enable the email push function, the MAIL_USERNAME, MAIL_PASSWORD, TO variables above will become required fields |
| TELEGRAM_CHAT_ID | Your chat_id | - | no | You can get your own id by sending /start to @userinfobot |
| TELEGRAM_BOT_TOKEN | The token for your Telegram bot | - | no | |
| TELEGRAM_BOT_ENABLE | Whether to enable Telegram Bot push function | 0 | no | 1: enabled0: not enabledNot enabled by default, if set to 1, the TELEGRAM_CHAT_ID and TELEGRAM_BOT_TOKEN variables above must be set |
| NOTICE_FREQ | Notification frequency | 1 | no | 0: only when there is a renewal operation1: executed every time |
| CUSTOM_LANGUAGE | Application language configuration | zh | yes | zh: zh means Chineseen: en means English |
For the meaning of the various configuration items in the .env file, please refer to the .env.example file.
After modifying and saving the .env file, execute docker restart freenom to restart the container, wait for about 5 seconds, then execute docker logs freenom to check the output, and observe the word executed successfully in the output.
then the configuration is correct.
In the directory where .env is located, execute docker rm -f freenom to delete the existing container, then execute docker rmi -f luolongfei/freenom to delete the old image, then execute the above docker run -d --name freenom --restart always -v $(pwd):/conf -v $(pwd)/logs:/app/logs luolongfei/freenom to redeploy it, so that it is the latest code after deployment. Of course, there may be changes in the .env file corresponding to the new version, don't worry, the program will automatically update the .env file content and migrate the existing configuration over.
A one-sentence operation, i.e. execute the following command in the directory where the .env file is located, will complete the update and upgrade:
docker rm -f freenom && docker rmi -f luolongfei/freenom && docker run -d --name freenom --restart always -v $(pwd):/conf -v $(pwd)/logs:/app/logs luolongfei/freenom
You just need to set the value of CUSTOM_LANGUAGE in the .env file to en to switch the program to English.
View container online status and size
$ docker ps -as
View the log of the container output
$ docker logs freenom
Restart container
$ docker restart freenom
Stop container
$ docker stop freenom
Remove container
$ docker rm -f freenom
View docker container resource usage information (CPU, memory, etc.)
$ docker stats --no-stream
Restart Docker (not container)
$ systemctl restart docker
Show logs
$ docker logs -tf --tail 10 freenom
If you find this project helpful, please consider supporting the project going forward. Your support is greatly appreciated.
PayPal: https://www.paypal.me/mybsdc
Content type
Image
Digest
sha256:10237c853…
Size
36.9 MB
Last updated
over 2 years ago
docker pull luolongfei/freenom