[首页](https://servprivate.com/zh) /
使用场景 /
Git 托管






自托管代码


# Git 托管



代码是您的心血。通过 Gitea 或 Forgejo 等轻量级代码托管平台自托管 Git，可将私有及公开仓库保存在您掌控的 VPS 上，而非存放在可能随时更改条款、扫描您的代码或将您锁定在外的平台上。离岸部署，无需 KYC，加密货币支付。


[推荐方案](#plans)
[寻找最佳司法管辖区](https://servprivate.com/zh/jurisdiction-selector)






#### 关键要求




- 完整 root 权限以安装 Git 代码托管平台

- 稳定在线，确保仓库随时可访问

- 足够的磁盘空间用于存储仓库及历史记录

- 无 KYC 注册，加密货币支付

- 高速 NVMe 存储，加快克隆与 CI 速度






无需KYC
仅限加密货币
零日志
忽略 DMCA
完整Root权限
NVMe固态硬盘






## 为何自托管 Git 仓库



托管式 Git 平台固然便捷，但您的代码存放在该公司服务器上并受其条款约束 — 这些条款可能随时更改，账户可能遭到封禁，代码库也可能被扫描或用于训练模型。使用 Gitea 或 Forgejo 等轻量级代码托管平台自托管，可在您自己的服务器上获得同样的拉取请求、议题和 Web 界面。您的仓库完全听命于您：不受任何平台政策约束，没有意外，没有锁定。





## 轻量运行，功能完整



现代自托管代码平台非常高效。Gitea 和 Forgejo 可在小型 VPS 上流畅运行，提供简洁的 Web 界面、议题跟踪、拉取请求以及内置 CI 选项。小到中型套餐适合个人账户或小团队使用；主要需要考量的是磁盘容量，以满足仓库及其历史记录的存储需求。完整的 root 权限意味着您可以按需安装和配置代码平台 — 包括默认将仓库设为私有。





## 私密且离岸



在离岸无 KYC VPS 上自托管，可增添托管平台所无法提供的隐私保障。服务器购买时无需身份验证且以加密货币支付，并且部署在您选择的司法管辖区。对于专有代码、敏感项目，或仅仅是不想放在大型平台上的工作，这些仓库将存放在不关联任何身份信息、法律环境由您自主选择的基础设施上。





最佳司法管辖区

## Git 托管的最佳司法管辖区

您的仓库受服务器所在司法管辖区的法律约束。以下地区兼具完善的法律保障、良好的网络连接与可靠的托管环境。


[### 冰岛
言论自由港

严格的隐私法律，可再生能源，欧盟以外。


$10.00/mo VPS起价](https://servprivate.com/zh/use-cases/git-hosting/iceland)
[### 罗马尼亚
反数据留存

法院裁定数据留存法违宪。与欧盟连接优良。


$8.50/mo VPS起价](https://servprivate.com/zh/use-cases/git-hosting/romania)
[### 瑞士
高端隐私保护

严格的隐私法律，政治中立，顶级基础设施。


$11.00/mo VPS起价](https://servprivate.com/zh/use-cases/git-hosting/switzerland)
[### 荷兰
最佳对等互联

优质网络连接，宽容的托管政策，AMS-IX对等互联。


$9.00/mo VPS起价](https://servprivate.com/zh/use-cases/git-hosting/netherlands)


推荐方案

## 推荐的 Git 代码平台套餐

Gitea 和 Forgejo 十分轻量 — 小型或中型 VPS 即可流畅运行个人或团队代码平台；磁盘容量请根据您的仓库规模选择。




### 冰岛
言论自由港


| 方案 | CPU | 内存 | 存储 | 上行链路 | 价格 | |
| --- | --- | --- | --- | --- | --- | --- |
| VPS · IS-S | 2 vCPUAMD EPYC 7643 | 4 GB DDR4 | 60 GB NVMe | 1 Gbps | $10.00/mo | [订单](https://servprivate.com/zh/order?type=vps&plan=IS-S&location=iceland) |
| VPS · IS-M | 4 vCPUAMD EPYC 7643 | 8 GB DDR4 | 120 GB NVMe | 1 Gbps | $16.00/mo | [订单](https://servprivate.com/zh/order?type=vps&plan=IS-M&location=iceland) |
| VPS · IS-L | 6 vCPUAMD EPYC 7643 | 16 GB DDR4 | 200 GB NVMe | 1 Gbps | $23.00/mo | [订单](https://servprivate.com/zh/order?type=vps&plan=IS-L&location=iceland) |





### 罗马尼亚
反数据留存


| 方案 | CPU | 内存 | 存储 | 上行链路 | 价格 | |
| --- | --- | --- | --- | --- | --- | --- |
| VPS · RO-S | 2 vCPUAMD EPYC 7443P | 4 GB DDR4 | 60 GB NVMe | 1 Gbps | $8.50/mo | [订单](https://servprivate.com/zh/order?type=vps&plan=RO-S&location=romania) |
| VPS · RO-M | 4 vCPUAMD EPYC 7443P | 8 GB DDR4 | 120 GB NVMe | 1 Gbps | $13.50/mo | [订单](https://servprivate.com/zh/order?type=vps&plan=RO-M&location=romania) |
| VPS · RO-L | 6 vCPUAMD EPYC 7443P | 16 GB DDR4 | 200 GB NVMe | 1 Gbps | $19.50/mo | [订单](https://servprivate.com/zh/order?type=vps&plan=RO-L&location=romania) |





### 瑞士
高端隐私保护


| 方案 | CPU | 内存 | 存储 | 上行链路 | 价格 | |
| --- | --- | --- | --- | --- | --- | --- |
| VPS · CH-S | 2 vCPUAMD EPYC 75F3 (3.2 GHz) | 4 GB DDR4 | 60 GB NVMe | 1 Gbps | $11.00/mo | [订单](https://servprivate.com/zh/order?type=vps&plan=CH-S&location=switzerland) |
| VPS · CH-M | 4 vCPUAMD EPYC 75F3 (3.2 GHz) | 8 GB DDR4 | 120 GB NVMe | 1 Gbps | $17.00/mo | [订单](https://servprivate.com/zh/order?type=vps&plan=CH-M&location=switzerland) |
| VPS · CH-L | 6 vCPUAMD EPYC 75F3 (3.2 GHz) | 16 GB DDR4 | 200 GB NVMe | 1 Gbps | $24.50/mo | [订单](https://servprivate.com/zh/order?type=vps&plan=CH-L&location=switzerland) |





### 荷兰
最佳对等互联


| 方案 | CPU | 内存 | 存储 | 上行链路 | 价格 | |
| --- | --- | --- | --- | --- | --- | --- |
| VPS · NL-S | 2 vCPUAMD EPYC 7543 | 4 GB DDR4 | 60 GB NVMe | 1 Gbps | $9.00/mo | [订单](https://servprivate.com/zh/order?type=vps&plan=NL-S&location=netherlands) |
| VPS · NL-M | 4 vCPUAMD EPYC 7543 | 8 GB DDR4 | 120 GB NVMe | 1 Gbps | $14.50/mo | [订单](https://servprivate.com/zh/order?type=vps&plan=NL-M&location=netherlands) |
| VPS · NL-L | 6 vCPUAMD EPYC 7543 | 16 GB DDR4 | 200 GB NVMe | 1 Gbps | $21.00/mo | [订单](https://servprivate.com/zh/order?type=vps&plan=NL-L&location=netherlands) |




常见问题

## Git 托管 — 常见问题





### 01
自托管 Git 可以运行哪些软件？



Gitea 和 Forgejo 是最受欢迎的轻量级代码托管平台 — 两者均提供 Web 界面、议题、拉取请求和 CI，并可在小型 VPS 上高效运行。GitLab 更为重量级，但也是一个可选方案。有了完整的 root 权限，您可以安装自己偏好的任何一款。





### 02
我需要多大的 VPS？



配置适中即可。Gitea 或 Forgejo 等轻量级代码平台可在小型或中型 VPS 上流畅运行。关键变量是磁盘容量，需根据仓库及其历史记录的大小来决定 — 从小配置起步，随代码库增长再按需扩容。





### 03
我可以将仓库设为私有吗？



可以。自托管代码平台允许您默认将仓库设为私有 — 仅您授权的账户才能访问。由于服务器归您所有，没有任何平台能够查看、扫描或更改您代码的可见性。





### 04
为什么要自托管 Git 而不使用托管平台？



掌控权。托管平台拥有条款制定权，可封禁账户，还可能扫描您的代码。自托管将仓库放在您掌控的服务器上，不受任何平台政策干预 — 而在离岸无 KYC 主机上，也不会关联任何身份信息。





### 05
我可以在同一台服务器上运行 CI/CD 吗？



可以。Gitea 和 Forgejo 均内置 CI 选项，您可以在同一台 VPS 或独立服务器上运行运行器。中型或更高配置的套餐可为 CI 任务与代码平台的并行运行提供充足资源。






## 在私有 VPS 上自托管您的代码



专为 Gitea 或 Forgejo 提供的离岸 VPS 套餐，低至每月 10 美元 — 无需 KYC，加密货币支付，完整 root 权限。您的仓库，您的服务器，您的规则。


[立即开始](https://servprivate.com/zh/vps)
[寻找最佳司法管辖区](https://servprivate.com/zh/jurisdiction-selector)


## Structured data (JSON-LD)

```json
{
    "@context": "https://schema.org",
    "@type": "Organization",
    "@id": "https://servprivate.com/#organization",
    "name": "ServPrivate",
    "alternateName": "ServPrivacy",
    "url": "https://servprivate.com",
    "description": "7 个隐私友好司法管辖区的离岸 VPS 和独立服务器。无KYC、无日志、仅加密货币支付。隐私即架构。",
    "logo": {
        "@type": "ImageObject",
        "url": "https://servprivate.com/ServPrivate.webp",
        "width": 512,
        "height": 512
    },
    "foundingDate": "2025",
    "areaServed": [
        {
            "@type": "Country",
            "name": "Iceland"
        },
        {
            "@type": "Country",
            "name": "Panama"
        },
        {
            "@type": "Country",
            "name": "Moldova"
        },
        {
            "@type": "Country",
            "name": "Romania"
        },
        {
            "@type": "Country",
            "name": "Switzerland"
        },
        {
            "@type": "Country",
            "name": "Netherlands"
        },
        {
            "@type": "Country",
            "name": "Russia"
        }
    ],
    "knowsAbout": [
        "Offshore hosting",
        "Offshore VPS",
        "Bare-metal dedicated servers",
        "DMCA-ignored hosting",
        "No KYC hosting",
        "Cryptocurrency payments",
        "Privacy engineering",
        "Token-based authentication",
        "Anonymous domain name registration",
        "No-KYC domain registrar",
        "WHOIS privacy",
        "Cheap .com domains",
        "Crypto-paid domain names",
        "NVIDIA GPU compute",
        "Windows RDP hosting",
        "Agentic commerce"
    ],
    "contactPoint": {
        "@type": "ContactPoint",
        "contactType": "customer support",
        "url": "https://servprivate.com/contact",
        "availableLanguage": [
            "en",
            "ru",
            "zh",
            "es",
            "fr",
            "de",
            "pt",
            "ar",
            "ja",
            "ko",
            "hi",
            "id",
            "it",
            "tr",
            "fa",
            "vi"
        ]
    },
    "sameAs": [
        "https://servprivate.com/canary",
        "https://servprivate.com/press"
    ]
}
```

```json
{
    "@context": "https://schema.org",
    "@type": "WebSite",
    "@id": "https://servprivate.com/#website",
    "url": "https://servprivate.com",
    "name": "ServPrivate",
    "publisher": {
        "@id": "https://servprivate.com/#organization"
    },
    "inLanguage": [
        "en",
        "ru",
        "zh",
        "es",
        "fr",
        "de",
        "pt",
        "ar",
        "ja",
        "ko",
        "hi",
        "id",
        "it",
        "tr",
        "fa",
        "vi"
    ]
}
```

```json
{
    "@context": "https://schema.org",
    "@type": "Service",
    "serviceType": "Git 托管",
    "provider": {
        "@id": "https://servprivate.com/#organization"
    },
    "description": "在离岸 VPS 上使用 Gitea 或 Forgejo 自托管 Git 仓库：私有代码，完全由您掌控。无 KYC，加密货币支付，低至每月 10 美元。",
    "image": "https://servprivate.com/assets/img/hero-vps.webp",
    "areaServed": [
        {
            "@type": "Country",
            "name": "冰岛"
        },
        {
            "@type": "Country",
            "name": "罗马尼亚"
        },
        {
            "@type": "Country",
            "name": "瑞士"
        },
        {
            "@type": "Country",
            "name": "荷兰"
        }
    ],
    "offers": {
        "@type": "AggregateOffer",
        "lowPrice": "8.50",
        "highPrice": "24.50",
        "priceCurrency": "USD",
        "offerCount": 12,
        "availability": "https://schema.org/InStock",
        "offers": [
            {
                "@type": "Offer",
                "sku": "uc-git-hosting-vps-iceland-is-s",
                "name": "IS-S — 冰岛",
                "price": "10.00",
                "priceCurrency": "USD",
                "priceSpecification": {
                    "@type": "UnitPriceSpecification",
                    "price": "10.00",
                    "priceCurrency": "USD",
                    "unitCode": "MON"
                },
                "availability": "https://schema.org/InStock",
                "url": "https://servprivate.com/order?type=vps&plan=IS-S&location=iceland",
                "seller": {
                    "@id": "https://servprivate.com/#organization"
                }
            },
            {
                "@type": "Offer",
                "sku": "uc-git-hosting-vps-iceland-is-m",
                "name": "IS-M — 冰岛",
                "price": "16.00",
                "priceCurrency": "USD",
                "priceSpecification": {
                    "@type": "UnitPriceSpecification",
                    "price": "16.00",
                    "priceCurrency": "USD",
                    "unitCode": "MON"
                },
                "availability": "https://schema.org/InStock",
                "url": "https://servprivate.com/order?type=vps&plan=IS-M&location=iceland",
                "seller": {
                    "@id": "https://servprivate.com/#organization"
                }
            },
            {
                "@type": "Offer",
                "sku": "uc-git-hosting-vps-iceland-is-l",
                "name": "IS-L — 冰岛",
                "price": "23.00",
                "priceCurrency": "USD",
                "priceSpecification": {
                    "@type": "UnitPriceSpecification",
                    "price": "23.00",
                    "priceCurrency": "USD",
                    "unitCode": "MON"
                },
                "availability": "https://schema.org/InStock",
                "url": "https://servprivate.com/order?type=vps&plan=IS-L&location=iceland",
                "seller": {
                    "@id": "https://servprivate.com/#organization"
                }
            },
            {
                "@type": "Offer",
                "sku": "uc-git-hosting-vps-romania-ro-s",
                "name": "RO-S — 罗马尼亚",
                "price": "8.50",
                "priceCurrency": "USD",
                "priceSpecification": {
                    "@type": "UnitPriceSpecification",
                    "price": "8.50",
                    "priceCurrency": "USD",
                    "unitCode": "MON"
                },
                "availability": "https://schema.org/InStock",
                "url": "https://servprivate.com/order?type=vps&plan=RO-S&location=romania",
                "seller": {
                    "@id": "https://servprivate.com/#organization"
                }
            },
            {
                "@type": "Offer",
                "sku": "uc-git-hosting-vps-romania-ro-m",
                "name": "RO-M — 罗马尼亚",
                "price": "13.50",
                "priceCurrency": "USD",
                "priceSpecification": {
                    "@type": "UnitPriceSpecification",
                    "price": "13.50",
                    "priceCurrency": "USD",
                    "unitCode": "MON"
                },
                "availability": "https://schema.org/InStock",
                "url": "https://servprivate.com/order?type=vps&plan=RO-M&location=romania",
                "seller": {
                    "@id": "https://servprivate.com/#organization"
                }
            },
            {
                "@type": "Offer",
                "sku": "uc-git-hosting-vps-romania-ro-l",
                "name": "RO-L — 罗马尼亚",
                "price": "19.50",
                "priceCurrency": "USD",
                "priceSpecification": {
                    "@type": "UnitPriceSpecification",
                    "price": "19.50",
                    "priceCurrency": "USD",
                    "unitCode": "MON"
                },
                "availability": "https://schema.org/InStock",
                "url": "https://servprivate.com/order?type=vps&plan=RO-L&location=romania",
                "seller": {
                    "@id": "https://servprivate.com/#organization"
                }
            },
            {
                "@type": "Offer",
                "sku": "uc-git-hosting-vps-switzerland-ch-s",
                "name": "CH-S — 瑞士",
                "price": "11.00",
                "priceCurrency": "USD",
                "priceSpecification": {
                    "@type": "UnitPriceSpecification",
                    "price": "11.00",
                    "priceCurrency": "USD",
                    "unitCode": "MON"
                },
                "availability": "https://schema.org/InStock",
                "url": "https://servprivate.com/order?type=vps&plan=CH-S&location=switzerland",
                "seller": {
                    "@id": "https://servprivate.com/#organization"
                }
            },
            {
                "@type": "Offer",
                "sku": "uc-git-hosting-vps-switzerland-ch-m",
                "name": "CH-M — 瑞士",
                "price": "17.00",
                "priceCurrency": "USD",
                "priceSpecification": {
                    "@type": "UnitPriceSpecification",
                    "price": "17.00",
                    "priceCurrency": "USD",
                    "unitCode": "MON"
                },
                "availability": "https://schema.org/InStock",
                "url": "https://servprivate.com/order?type=vps&plan=CH-M&location=switzerland",
                "seller": {
                    "@id": "https://servprivate.com/#organization"
                }
            },
            {
                "@type": "Offer",
                "sku": "uc-git-hosting-vps-switzerland-ch-l",
                "name": "CH-L — 瑞士",
                "price": "24.50",
                "priceCurrency": "USD",
                "priceSpecification": {
                    "@type": "UnitPriceSpecification",
                    "price": "24.50",
                    "priceCurrency": "USD",
                    "unitCode": "MON"
                },
                "availability": "https://schema.org/InStock",
                "url": "https://servprivate.com/order?type=vps&plan=CH-L&location=switzerland",
                "seller": {
                    "@id": "https://servprivate.com/#organization"
                }
            },
            {
                "@type": "Offer",
                "sku": "uc-git-hosting-vps-netherlands-nl-s",
                "name": "NL-S — 荷兰",
                "price": "9.00",
                "priceCurrency": "USD",
                "priceSpecification": {
                    "@type": "UnitPriceSpecification",
                    "price": "9.00",
                    "priceCurrency": "USD",
                    "unitCode": "MON"
                },
                "availability": "https://schema.org/InStock",
                "url": "https://servprivate.com/order?type=vps&plan=NL-S&location=netherlands",
                "seller": {
                    "@id": "https://servprivate.com/#organization"
                }
            },
            {
                "@type": "Offer",
                "sku": "uc-git-hosting-vps-netherlands-nl-m",
                "name": "NL-M — 荷兰",
                "price": "14.50",
                "priceCurrency": "USD",
                "priceSpecification": {
                    "@type": "UnitPriceSpecification",
                    "price": "14.50",
                    "priceCurrency": "USD",
                    "unitCode": "MON"
                },
                "availability": "https://schema.org/InStock",
                "url": "https://servprivate.com/order?type=vps&plan=NL-M&location=netherlands",
                "seller": {
                    "@id": "https://servprivate.com/#organization"
                }
            },
            {
                "@type": "Offer",
                "sku": "uc-git-hosting-vps-netherlands-nl-l",
                "name": "NL-L — 荷兰",
                "price": "21.00",
                "priceCurrency": "USD",
                "priceSpecification": {
                    "@type": "UnitPriceSpecification",
                    "price": "21.00",
                    "priceCurrency": "USD",
                    "unitCode": "MON"
                },
                "availability": "https://schema.org/InStock",
                "url": "https://servprivate.com/order?type=vps&plan=NL-L&location=netherlands",
                "seller": {
                    "@id": "https://servprivate.com/#organization"
                }
            }
        ]
    }
}
```

```json
{
    "@context": "https://schema.org",
    "@type": "Article",
    "headline": "Git 托管",
    "description": "在离岸 VPS 上使用 Gitea 或 Forgejo 自托管 Git 仓库：私有代码，完全由您掌控。无 KYC，加密货币支付，低至每月 10 美元。",
    "image": "https://servprivate.com/assets/img/hero-vps.webp",
    "author": {
        "@id": "https://servprivate.com/#organization"
    },
    "publisher": {
        "@id": "https://servprivate.com/#organization"
    },
    "datePublished": "2026-05-28T11:23:56+00:00",
    "dateModified": "2026-05-28T11:23:56+00:00",
    "mainEntityOfPage": "https://servprivate.com/use-cases/git-hosting",
    "inLanguage": "zh",
    "keywords": "self-hosted Git hosting, private Git server, Gitea VPS hosting, offshore code repository hosting, Forgejo hosting"
}
```

```json
{
    "@context": "https://schema.org",
    "@type": "FAQPage",
    "mainEntity": [
        {
            "@type": "Question",
            "name": "自托管 Git 可以运行哪些软件？",
            "acceptedAnswer": {
                "@type": "Answer",
                "text": "Gitea 和 Forgejo 是最受欢迎的轻量级代码托管平台 — 两者均提供 Web 界面、议题、拉取请求和 CI，并可在小型 VPS 上高效运行。GitLab 更为重量级，但也是一个可选方案。有了完整的 root 权限，您可以安装自己偏好的任何一款。"
            }
        },
        {
            "@type": "Question",
            "name": "我需要多大的 VPS？",
            "acceptedAnswer": {
                "@type": "Answer",
                "text": "配置适中即可。Gitea 或 Forgejo 等轻量级代码平台可在小型或中型 VPS 上流畅运行。关键变量是磁盘容量，需根据仓库及其历史记录的大小来决定 — 从小配置起步，随代码库增长再按需扩容。"
            }
        },
        {
            "@type": "Question",
            "name": "我可以将仓库设为私有吗？",
            "acceptedAnswer": {
                "@type": "Answer",
                "text": "可以。自托管代码平台允许您默认将仓库设为私有 — 仅您授权的账户才能访问。由于服务器归您所有，没有任何平台能够查看、扫描或更改您代码的可见性。"
            }
        },
        {
            "@type": "Question",
            "name": "为什么要自托管 Git 而不使用托管平台？",
            "acceptedAnswer": {
                "@type": "Answer",
                "text": "掌控权。托管平台拥有条款制定权，可封禁账户，还可能扫描您的代码。自托管将仓库放在您掌控的服务器上，不受任何平台政策干预 — 而在离岸无 KYC 主机上，也不会关联任何身份信息。"
            }
        },
        {
            "@type": "Question",
            "name": "我可以在同一台服务器上运行 CI/CD 吗？",
            "acceptedAnswer": {
                "@type": "Answer",
                "text": "可以。Gitea 和 Forgejo 均内置 CI 选项，您可以在同一台 VPS 或独立服务器上运行运行器。中型或更高配置的套餐可为 CI 任务与代码平台的并行运行提供充足资源。"
            }
        }
    ]
}
```

```json
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "name": "首页",
            "item": "https://servprivate.com/"
        },
        {
            "@type": "ListItem",
            "position": 2,
            "name": "使用场景",
            "item": "https://servprivate.com/"
        },
        {
            "@type": "ListItem",
            "position": 3,
            "name": "Git 托管",
            "item": "https://servprivate.com/use-cases/git-hosting"
        }
    ]
}
```

