Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Opinionated set of Bash scripts for cgit server setup

License

Notifications You must be signed in to change notification settings

valera-rozuvan-archive/cgit-server-setup

Repository files navigation

cgit server setup

wip has moved

Future work on this repository has moved to the monorepo valera-rozuvan/bash-scripts. This repo is archived for historic purposes (to preserve commit history). Navigate over to bash-scripts/cgit-server-setup to see updates (if any).

introduction

A bunch of shell scripts and config files to make life easier when setting up a cgit server.

getting latest source

A public git repo is available at git.rozuvan.net/cgit-server-setup. Several mirrors exist: mirror 1, mirror 2.

You can get a local copy by running the command:

git clone https://git.rozuvan.net/cgit-server-setup

prerequisites

This section is a work in progress.

setup

To setup a cgit server:

./setup-00.sh > ./setup-00.log 2>&1

You can watch the logs during the setup:

tail -f ./setup-00.log

old info

To setup server:

sudo aptitude install --without-recommends \
  ufw \
  fail2ban \
  cgit \
  git \
  nginx \
  fcgiwrap \
  certbot \
  python3 \
  python3-pygments \
  python3-markdown \
  python3-certbot-nginx \
  lighttpd \
  lighttpd-doc \
  pv \
  rsync

To make backup of LE certs:

sudo tar zpcvf /home/valera/le-bckp-20210613.tar.gz /etc/letsencrypt/

To get LE certs from backup:

sudo tar zxvf le-bckp-20210613.tar.gz -C /

To fetch new certs for new domains:

sudo certbot --nginx -d git.rozuvan.net --post-hook "/usr/sbin/service nginx restart"
sudo certbot --nginx -d test.rozuvan.net --post-hook "/usr/sbin/service nginx restart"
...

To renew certs:

sudo certbot renew

That's it!

license

This project is licensed under the MIT License. See LICENSE for more details.

maintainers