> For the complete documentation index, see [llms.txt](https://docs.ipcheck.ing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ipcheck.ing/developer/zh/getting-started/quickstart.md).

# 快速入门

运行 MyIP 的最快方式是预构建的 Docker 镜像。你需要 Docker 和一个免费的 MaxMind GeoLite2 账户。

{% stepper %}
{% step %}

#### 获取 MaxMind 凭据

MyIP 使用免费的 **GeoLite2** 数据库用于 IP 地理定位和 ASN 查询。请在 [maxmind.com/en/geolite2/signup](https://www.maxmind.com/en/geolite2/signup)，然后从 **管理许可证密钥** 页面。

完整教程： [MaxMind 设置](/developer/zh/getting-started/maxmind-setup.md).
{% endstep %}

{% step %}

#### 运行容器

{% code title="docker run" %}

```bash
docker run -d \\
  -p 18966:18966 \\
  -e MAXMIND_ACCOUNT_ID="your-account-id" \\
  -e MAXMIND_LICENSE_KEY="your-license-key" \\
  -e MAXMIND_AUTO_UPDATE="true" \\
  --name myip \\
  --restart always \\
  jason5ng32/myip:latest
```

{% endcode %}
{% endstep %}

{% step %}

#### 打开应用

访问 <http://localhost:18966>.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**首次启动会下载 GeoLite2 数据库。** 后端会在开始监听之前尝试下载，并在 5 分钟后放弃，因此错误的凭据不会阻止启动。请结合 `docker logs -f myip` ——你要找的是这一行 `📦 MaxMind 数据库已加载`.
{% endhint %}

{% hint style="warning" %}
**`localhost` 开箱即用。真实域名则不行。** 后端会拒绝所有 `/api/*` 其 `Referer` 主机名不是 `localhost` 并且未列在 `ALLOWED_DOMAINS`。在把 MyIP 部署到域名上之前，请阅读 [反向代理与域名](/developer/zh/getting-started/reverse-proxy-and-domains.md).
{% endhint %}

## 下一步

* [使用 Docker 部署](/developer/zh/getting-started/deploy-with-docker.md) ——Compose、升级、端口映射、数据存放位置
* [使用 Node.js 部署](/developer/zh/getting-started/deploy-with-nodejs.md) ——从源码构建，在 pm2 下运行
* [可选 API 密钥](/developer/zh/configuration/optional-api-keys.md) ——额外的 IP 数据源、地图、MAC 查询
* [环境变量](/developer/zh/reference/environment-variables.md) ——完整列表


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ipcheck.ing/developer/zh/getting-started/quickstart.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
