Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SNAP Installation instructions #17040

Closed
wants to merge 15 commits into from
Closed
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 51 additions & 2 deletions docs/content/doc/installation/from-package.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,58 @@ 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:

``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.
This can help: https://ssl-config.mozilla.org/#server=apache&version=2.4.41&config=intermediate&openssl=1.1.1d&guideline=5.6
osmosBe marked this conversation as resolved.
Show resolved Hide resolved

```nginx
server {
listen 80;
server_name gitea.example.com;

location / {
proxy_pass http://localhost:3000;
}
}
```

osmosBe marked this conversation as resolved.
Show resolved Hide resolved
* Restart nginx
```bash
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

Expand Down