PHPackages                             wgd33952/aliddns - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wgd33952/aliddns

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wgd33952/aliddns
================

通过阿里云提供的DDNS，动态将域名解析到本机公网IP

00PHP

Since Dec 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/wgd33952/AliDDNS)[ Packagist](https://packagist.org/packages/wgd33952/aliddns)[ RSS](/packages/wgd33952-aliddns/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

AliDDNS
=======

[](#aliddns)

通过阿里云提供的DDNS，动态将域名解析到本机公网IP

### 1. 安装Composer

[](#1-安装composer)

armbain系统：`apt install composer`

centos：`yum install composer`

其它系统，请参照composer指南进行安装\[[https://pkg.xyz/#how-to-install-composer\]。](https://pkg.xyz/#how-to-install-composer]。)

### 2. 从源码库拉取代码，并拉取包：

[](#2-从源码库拉取代码并拉取包)

```
$ git clone wgd33952/aliddns
$ composer update
```

### 3. 获取AccessKey ID和AccessKey Secret值

[](#3-获取accesskey-id和accesskey-secret值)

- 登录阿里云控制台后台
- 右上角头像处选择点击“AccessKey管理”页面
- 创建AccessKey，并获得AccessKey ID和AccessKey Secret的值

### 4. 配置需要解析的域名参数

[](#4-配置需要解析的域名参数)

根据实际情况，更改example/demo.php中对应的配置参数

```
$config = [
    // 开启调试模式
    "debug" => true,
    // 阿里云 AccessKey ID
    "accessKeyId" => "accessKeyId",
    // 阿里云 AccessKey Secret
    "accessKeySecret" => "accessKeySecret",
    // 域名
    "domain" => "domain.com",
    // 主机记录
    "rr" => "www",
    // TTL
    "ttl" => 600
];
```

### 5. 运行

[](#5-运行)

```
$ php example/demo.php
```

### 6.定时更新域名解析

[](#6定时更新域名解析)

通过linux的crontab，可以定时调用更新程序，在不在家时也能自动更新解析，一劳永逸

编辑crontab文件：

```
$ crontab -e
```

输入任务内容并保存：

```
# 每5分钟检查本地IP变动情况，并更新解析
*/5 * * * * /usr/bin/php /root/AliDDNS/example/demo.php
```

重启crontab

```
// Armbain
$ service cron restart
// CentOS
$ systemctl restart cronb
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8849e0ff805e1688f1d66896e1c2b3c22b38bbf52c02413fbf73738aa2a7d431?d=identicon)[junec](/maintainers/junec)

---

Top Contributors

[![wgd33952](https://avatars.githubusercontent.com/u/20485311?v=4)](https://github.com/wgd33952 "wgd33952 (2 commits)")

### Embed Badge

![Health badge](/badges/wgd33952-aliddns/health.svg)

```
[![Health](https://phpackages.com/badges/wgd33952-aliddns/health.svg)](https://phpackages.com/packages/wgd33952-aliddns)
```

###  Alternatives

[cebe/assetfree-yii2

A meta package that allows you to install yii2 without composer-asset-plugin.

50105.4k4](/packages/cebe-assetfree-yii2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
