diff --git a/docs/content/doc/installation/from-package.en-us.md b/docs/content/doc/installation/from-package.en-us.md index e4081024bd0e7..52537c22659f2 100644 --- a/docs/content/doc/installation/from-package.en-us.md +++ b/docs/content/doc/installation/from-package.en-us.md @@ -47,9 +47,68 @@ pacman -S gitea There is a [Gitea Snap](https://snapcraft.io/gitea) package which follows the latest stable version. +### This guide was tested with Ubuntu 20.04 and MariaDB: + +* Install needed packages: + +```sh +sudo snap install gitea +sudo apt install nginx mariadb-server +``` +* Improve the security of your MariaDB Installation + ``sh -snap install gitea -`` +sudo mysql_secure_installation`` +More information can be found on this website: https://mariadb.com/kb/en/mysql_secure_installation/ + +* Create your database and database user: + +```sql +sudo mysql -u root -p + CREATE DATABASE gitea; + GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost' IDENTIFIED BY 'the same password for gitea config'; + FLUSH PRIVILEGES; + QUIT; +``` +Detailed information about Database preperation can be found by following this link: https://docs.gitea.io/en-us/database-prep/ + +* Create nginx config to pass traffic to port 3000: + +```sh +sudo nano /etc/nginx/conf.d/gitea.conf +``` + +* The Nginx config should look something like the following code block. +To use `HTTPS`, you should additionally pass a certificate and redirect all traffic to port 443. +The following link covers some information about a secure setup: +https://docs.gitea.io/en-us/https-setup/ + +This link may help to create a secure nginx configuration: https://ssl-config.mozilla.org/#server=nginx&version=2.4.41&config=intermediate&openssl=1.1.1d&guideline=5.6 + +For junior users this blogpost may help to get you started with securing your installation with nginx as reverse proxy and certbot for certificate issuing: +https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/ + + +```nginx +server { + listen 80; + server_name gitea.example.com; + + location / { + proxy_pass http://localhost:3000; + } +} +``` +More information about reverse proxies can be found here: +https://docs.gitea.io/en-us/reverse-proxies/ +* Restart nginx +```sh +sudo systemctl restart nginx +``` + +* Create correct DNS entry on your DNS Server if not done already +* Configure your gitea settings + The config file for the Snap can be found here if you want to make changes later: /var/snap/gitea/common/conf/app.ini ## SUSE and openSUSE