Jump to content

Install NixOS on Amazon EC2/zh: Difference between revisions

From Official NixOS Wiki
Weijia (talk | contribs)
Created page with "这些 AMI 的默认用户是 <code>root</code>。没有默认密码,而是使用在 EC2 创建过程中选择的 SSH 密钥进行身份验证。"
Weijia (talk | contribs)
Created page with "== 创建 NixOS AMI =="
Line 9: Line 9:
这些 AMI 的默认用户是 <code>root</code>。没有默认密码,而是使用在 EC2 创建过程中选择的 SSH 密钥进行身份验证。
这些 AMI 的默认用户是 <code>root</code>。没有默认密码,而是使用在 EC2 创建过程中选择的 SSH 密钥进行身份验证。


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Creating_a_NixOS_AMI"></span>
== Creating a NixOS AMI ==
== 创建 NixOS AMI ==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">

Revision as of 19:15, 28 August 2025

Amazon EC2 是一個廣泛使用的雲部署平台,隸屬於亞馬遜網絡服務 (AWS)。NixOS 主要通過 AMI 和 nixos-generators 項目支持該平台。

公共 NixOS AMIs

AWS 上可用的 NixOS AMI 列表位於 此處,更新的列表位於:此處(參見 此討論線程)。

這些 AMI 的默認用戶是 root。沒有默認密碼,而是使用在 EC2 創建過程中選擇的 SSH 密鑰進行身份驗證。

創建 NixOS AMI

The nixos-generators project is currently the best method to create your own NixOS AMI. Follow the directions provided by nixos-generators & then follow the instructions provided by AWS.

Additional Resources

Troubleshooting

SSH Asks For Password

When connecting to a newly launched EC2 instance via SSH, it may ask for a password. This seems to be because the amazon-init systemd service is still reading user data. Back out of the current SSH attempt and try again in a few minutes.