<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Server on 自建 VPS 服务器的一些攻略</title><link>https://selfhostvps.github.io/tags/server/</link><description>Recent content in Server on 自建 VPS 服务器的一些攻略</description><generator>Hugo</generator><language>zh-CN</language><copyright>Copyright © 2025, Jane Doe.</copyright><lastBuildDate>Fri, 08 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://selfhostvps.github.io/tags/server/index.xml" rel="self" type="application/rss+xml"/><item><title>Gitea，自建 git 服务器</title><link>https://selfhostvps.github.io/post/5511-gitea/</link><pubDate>Fri, 08 May 2026 00:00:00 +0000</pubDate><guid>https://selfhostvps.github.io/post/5511-gitea/</guid><description>本篇教程适用于熟悉 git 操作的用户。关于如何使用 git / gitea，请参阅其它教程。
Gitea 是一款开源的、轻量级、自托管的 Git 代码托管平台，类似于 GitHub 或 GitLab。用户将代码或者文档托管在自己的服务器上，更好地保护了安全隐私。
官网：https://gitea.com/ 数据库依赖：MySQL、PostgreSQL、SQLite 中文界面：有 开销： CPU &amp;lt; 1% 内存 &amp;lt; 200 MB Docker Image：250 MB 本地存储：0 当前最新版本：1.26.1 默认 docker 端口号：3000 &amp;amp; 22 本网站分配的端口号：5511 &amp;amp; 5512 备份重要性：高 备份方式：打包整个 docker compose 文件夹即可 如果使用非 SQLite 的数据库：额外导出数据库记录 本文的安装配置，使用 SQLite 数据库，对于个人使用足够了。更复杂的配置，可以参见官网的 docker 安装教程。
常见的 2 种使用 git 的方式：https 和 ssh。如果只用到 https，配置相对更简单一些。本文会在后面介绍使用 ssh 需要的额外操作。
docker compose 目录结构
/DOCKERS/gitea ├── gitea # 数据文件夹 └── docker-compose.yml # 配置文件 docker-compose.</description></item></channel></rss>