@@ -24,6 +24,42 @@ Both modules and projects are likely to diverge further with each release.
2424Which might lead to an even more involved migration.
2525:::
2626
27+ ::: {.warning}
28+ The last supported version of Forgejo which supports migration from Gitea is
29+ * 10.0.x* . You should * NOT* try to migrate from Gitea to Forgejo ` 11.x ` or
30+ higher without first migrating to ` 10.0.x ` .
31+
32+ See [ upstream migration guide] ( https://forgejo.org/docs/latest/admin/gitea-migration/ )
33+
34+ The last supported version of * Gitea* for this migration process is * 1.22* . Do
35+ * NOT* try to directly migrate from Gitea * 1.23* or higher, as it will likely
36+ result in data loss.
37+
38+ See [ upstream news article] ( https://forgejo.org/2024-12-gitea-compatibility/ )
39+ :::
40+
41+ In order to migrate, the version of Forgejo needs to be pinned to ` 10.0.x `
42+ * before* using the latest version. This means that nixpkgs commit
43+ [ ` 3bb45b041e7147e2fd2daf689e26a1f970a55d65 ` ] ( https://github.com/NixOS/nixpkgs/commit/3bb45b041e7147e2fd2daf689e26a1f970a55d65 )
44+ or earlier should be used.
45+
46+ To do this, temporarily add the following to your ` configuration.nix ` :
47+
48+ ``` nix
49+ { pkgs, ... }:
50+ let
51+ nixpkgs-forgejo-10 = import (pkgs.fetchFromGitHub {
52+ owner = "NixOS";
53+ repo = "nixpkgs";
54+ rev = "3bb45b041e7147e2fd2daf689e26a1f970a55d65";
55+ hash = "sha256-8JL5NI9eUcGzzbR/ARkrG81WLwndoxqI650mA/4rUGI=";
56+ }) {};
57+ in
58+ {
59+ services.forgejo.package = nixpkgs-forgejo-10.forgejo;
60+ }
61+ ```
62+
2763### Full-Migration {#module-forgejo-migration-gitea-default}
2864
2965This will migrate the state directory (data), rename and chown the database and
@@ -49,6 +85,8 @@ chown -R forgejo:forgejo /var/lib/forgejo
4985systemctl restart forgejo
5086```
5187
88+ Afterwards, the Forgejo version can be set back to a newer desired version.
89+
5290### Alternatively, keeping the gitea user {#module-forgejo-migration-gitea-impersonate}
5391
5492Alternatively, instead of renaming the database, copying the state folder and
0 commit comments