w3surf our Gitea installation script doesn't do much other than download Gitea, create a few directories and scripts, and run a couple of Gitea commands. If you want to modify it to install Forgejo instead of Gitea you can copy the script from our public installer repository.
I was curious to see if I could just drop Forgejo into an existing Gitea and that seemed to work. Here's what I did:
- Created a new Gitea app at https://my.opalstack.com/apps/.
- Added the app to a site at https://my.opalstack.com/domains/.
- Edited the new
custom/conf/app.ini
to set the site name and domain.
- Dowloaded Forgejo and made it executable, eg:
cd ~/apps/my_app
wget -O forgejo https://codeberg.org/forgejo/forgejo/releases/download/v8.0.3/forgejo-8.0.3-linux-amd64
chmod 700 forgejo
- Edited the start script to change "gitea" to "forgejo". Note that if the app is named "gitea" or contains "gitea" then don't change that, just change the log names and the
$PWD/gitea
bit at the end of the script.
- Stop the app and restart it.
- Edit the stop script to change "gitea" to "forgejo".
- Do a final stop/start to make sure everything works.
It worked for me!