Caution WIP, this tutorial is unfinished but in a working state.
As many people already know, I operate the gitlab server at
i2pgit.org
and
git.idk.i2p
, however, I would not recommend Gitlab for a small operation like the one I donate to I2P. Self-Hosting gitlab is difficult, demanding, and time-consuming due to the need to update gitlab very frequently in order to keep up with security updates, and the tendency of gitlab updates to break the gitlab instance. We use gitlab for I2P right now because of it’s many advanced features, but there are several far simpler git hosts available to set up over I2P.
One git host which is especially easy to deply on the Java I2P distribution is the “Gitbucket” git host, which is written is Scala, a JVM compatible language, and which uses Servlet 3.0, making it compatible with the “Jetty” web server used in Java I2P to provide a default hidden service.
Servlet is a Java technology which is used to deploy webapps to a web server. Java I2P is compatible with Servlet 3.0. In order to deploy a webapp to Java I2P, one needs to:
$I2P/eepsite/webapps/
directory
Let’s use Gitbucket as an example.
First , go to the I2P Hidden Services Manager and “Stop” the hidden service for the default HTTP Server as seen below:
It will take a few seconds for the hidden service to shut down. The indicator to the left of the stop button will turn red when the tunnel is fully stopped.
Next
, download the Gitbucket
.war
file somewhere. You can download it directly to the
$I2P/eepsite/webapps/
directory if you want, but it may be better to download it somwhere else and copy it where you need to later.
release_tag=$(wget -O - https://api.github.com/repos/gitbucket/gitbucket/releases/latest | jq -r ".tag_name")
wget -O ~/Downloads/gitbucket.war https://github.com/gitbucket/gitbucket/releases/download/$release_tag/gitbucket.war
https://github.com/gitbucket/gitbucket/releases/latest
in your browser and click the
gitbucket.war
download.
Then
, copy the
gitbucket.war
file into the
$I2P/eepsite/webapps/
directory.
cp ~/Downloads/gitbucket.war ~/.i2p/eepsite/webapps/gitbucket.war
Finally , re-start the I2P router and test the gitbucket
i2prouter graceful
while i2prouter status | grep STARTED; do sleep 10s; done
i2prouter start
Once I2P has restarted, visit gitbucket locally and change your password at:
http://localhost:7658/gitbucket/admin/users/root/_edituser
You are now the proud hoster of a new Gitbucket server on I2P.
MIT License
Copyright (c) 2023 idk
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Hide license