gogs (tor version)
gogs
self hosted github as tor hiddenservice
what is gogs?
Gogs is a painless self-hosted Git service.
- its good for maintaining and publishing your own code/releases.
- its bad for team-development, because of the missing network effect (everybody is on github)
video - gogs ! self hosted github as tor hiddenservice
[...]
00:02:40 installation
00:03:02 first start
00:04:51 connecting to gogs website
00:05:18 gogs setup wizard
[...]
video: https://peertube.satoshishop.de/w/k3P7JpscjFWtQ9ef2Yw7FP
example gogs instance: http://mvztvtnr7hku47jcz5qb7jfok6zn34dkl44j7wqwuufc2ddifgnvisad.onion
prerequisites
server
$ apt install docker-compose
client
$ apt install tor
setup
installation
docker-compose.yml
version: '3.9'
services:
tor:
image: goldy/tor-hidden-service:latest
restart: unless-stopped
environment:
GOGSSSH_TOR_SERVICE_VERSION: '3'
GOGSSSH_TOR_SERVICE_HOSTS: 22:gogs:22
GOGSWEB_TOR_SERVICE_VERSION: '3'
GOGSWEB_TOR_SERVICE_HOSTS: 80:gogs:3000
TOR_EXTRA_OPTIONS: |
HeartbeatPeriod 1 hours
HiddenServiceNonAnonymousMode 1
HiddenServiceSingleHopMode 1
volumes:
- ./volumes/tor/keys:/var/lib/tor/hidden_service/
- ./volumes/tor/data:/run/tor/data
networks:
internet:
no-internet:
database:
image: mysql
restart: unless-stopped
volumes:
- ./volumes/db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: pH7bUBWDrNVEjKmhpd43FzHQaSmFbB
MYSQL_DATABASE: gogs
MYSQL_USER: gogs
MYSQL_PASSWORD: pH7bUBWDrNVEjKmhpd43FzHQaSmFbB
networks:
no-internet:
gogs:
image: gogs/gogs
restart: unless-stopped
volumes:
- ./volumes/gogs:/data
networks:
no-internet:
networks:
internet: {}
no-internet:
internal: true
get tor hidden service urls
$ ls -l ./volumes/tor/keys
$ cat ./volumes/tor/keys/*/hostname
Generating public/private rsa key pair
$ ssh-keygen
$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3N...t/Xulz97eb/8= mk@mk-MS-7976
import ssh key in gogs
http://[tor-address.onion]/user/settings/ssh -> Add Key
create the first repository
clone repository
$ torify git clone git@s2re2ucib6tol3getmtayfhutjprbvled6crpfmfwezb2xusihveddid.onion:satoshishop.de/print_lnbits_wallets.git
push code
$ torify git push -u origin master