# 全新安装（Hetzner VPS）失败

**URL:** <https://meta.discourse.org/t/fresh-install-hetzner-vps-failing/411664>\
**Category:** Support\
**Created:** [2026年九月4日 15:29 UTC](https://meta.discourse.org/t/fresh-install-hetzner-vps-failing/411664 "2026-09-04T15:29:34Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![apidevlab](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/apidevlab/32/423316_2.png) [@apidevlab](https://meta.discourse.org/u/apidevlab)\
**Post date:** [2026年九月4日 15:29 UTC](https://meta.discourse.org/t/fresh-install-hetzner-vps-failing/411664/1 "2026-09-04T15:29:34Z")

</div>

过去几天我一直在 Layer7 和 Hetzner VPS 上尝试安装 Discourse。在 Layer7 上安装没有任何问题，我按照“使用 Virtualmin 安装”的指南操作，目前运行良好。

Virtualmin 还推出了一个新的 Podman 模块，其中包含一个 Discourse 配方，虽然能工作，但有点小 bug。

我在 Hetzner 的机器上尝试了多次安装，但每次都在 bootstrap 阶段失败。

我已经设置了 2GB 的交换空间，该 VPS 拥有 4 核 CPU 和 8GB 内存。

错误信息如下，我想看看是否有人能指出正确的方向。据我了解，`doctor` 命令并没有真正揭示问题的所在。

如果需要，我很乐意提供日志或命令输出。

```plaintext
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && sudo -H -E -u discourse bash -c '
  set -o errexit
  git fetch --tags --prune-tags --prune --force origin
  if [[$(git symbolic-ref --short HEAD) == latest]] ; then
      git pull
  else
      git -c advice.detachedHead=false checkout latest
  fi
' failed with return #<Process::Status: pid 179 exit 128>
Location of failure: /usr/local/lib/ruby/gems/3.4.0/gems/pups-1.4.0/lib/pups/exec_command.rb:138:in 'Pups::ExecCommand#spawn'

```

```plaintext
Location of failure: /usr/local/lib/ruby/gems/3.4.0/gems/pups-1.4.0/lib/pups/exec_command.rb:138:in 'Pups::ExecCommand#spawn'
exec failed with the params {"cd" => "$home", "tag" => "build", "hook" => "code", "cmd" => ["sudo -H -E -u discourse git clean -f", "sudo -H -E -u discourse bash -c '\n set -o errexit\n git fetch --tags --prune-tags --prune --force origin\n if [[$(git symbolic-ref --short HEAD) == $version]] ; then\n git pull\n else\n git -c advice.detachedHead=false checkout $version\n fi\n'", "sudo -H -E -u discourse git config user.discourse-version $version", "mkdir -p tmp", "chown discourse:www-data tmp", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p /shared/log/rails", "bash -c \"touch -a /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log\"", "bash -c \"ln -s /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log $home/log\"", "bash -c \"mkdir -p /shared/{uploads,backups}\"", "bash -c \"ln -s /shared/{uploads,backups} $home/public\"", "bash -c \"mkdir -p /shared/tmp/{backups,restores}\"", "bash -c \"ln -s /shared/tmp/{backups,restores} $home/tmp\"", "find /shared/log/rails /shared/uploads /shared/backups /shared/tmp ! \\( -user discourse -group www-data \\) -exec chown discourse:www-data {} \\+", "[! -d public/plugins] || find public/plugins/ -maxdepth 1 -xtype l -delete"]}
bootstrap failed with exit code 128
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

```

磁盘诊断输出

```plaintext
==================== MEMORY INFORMATION ====================
RAM (MB): 8127

               total used free shared buff/cache available
Mem: 7751 1146 318 8 6604 6604
Swap: 2047 0 2047

==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 75G 13G 60G 18% /

==================== DISK INFORMATION ====================
Disk /dev/sda: 76.3 GiB, 81923145728 bytes, 160006144 sectors
Disk model: QEMU HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 818C9A1D-5D5F-4F06-9432-7B4B83510711

Device Start End Sectors Size Type
/dev/sda1 528384 160006110 159477727 76G Linux filesystem
/dev/sda14 2048 4095 2048 1M BIOS boot
/dev/sda15 4096 528383 524288 256M EFI System

Partition table entries are not in disk order.

==================== END DISK INFORMATION ====================

```

---

_[View the full topic](https://meta.discourse.org/t/fresh-install-hetzner-vps-failing/411664)._
