
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
!freenom logo
中文文档请参考 https://github.com/luolongfei/freenom#-%E9%80%9A%E8%BF%87-docker-%E9%83%A8%E7%BD%B2
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 ( https://github.com/luolongfei/freenom/blob/main/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
shell$ 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
shell$ 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 https://github.com/luolongfei/freenom/blob/main/README_EN.md#-Setting-up-Gmail |
| MAIL_PASSWORD | Robot's email password | - | no | Recommend filling in the application-specific password for gmail: [***] |
| 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 |
| ***_CHAT_ID | Your chat_id | - | no | You can get your own id by sending /start to @userinfobot |
| ***_BOT_TOKEN | The token for your Telegram bot | - | no | |
| ***_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 https://github.com/luolongfei/freenom/blob/main/.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:
shelldocker 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
shell$ docker ps -as
View the log of the container output
shell$ docker logs freenom
Restart container
shell$ docker restart freenom
Stop container
shell$ docker stop freenom
Remove container
shell$ docker rm -f freenom
View docker container resource usage information (CPU, memory, etc.)
shell$ docker stats --no-stream
Restart Docker (not container)
shell$ systemctl restart docker
Show logs
shell$ docker logs -tf --tail 10 freenom
If you find this project helpful, please *** supporting the project going forward. Your support is greatly appreciated.
![]([]
: []
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务