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 1 commit
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
49 changes: 46 additions & 3 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,52 @@ pacman -S gitea

There is a [Gitea Snap](https://snapcraft.io/gitea) package which follows the latest stable version.

``sh
snap install gitea
``
### This guide was tested with Ubuntu 20.04 and MySQL:

* Install needed Packages and the snap:
osmosBe marked this conversation as resolved.
Show resolved Hide resolved

```
osmosBe marked this conversation as resolved.
Show resolved Hide resolved
sudo snap install gitea
sudo apt install nginx mariadb-server
```
* Secure your mysql Installation
osmosBe marked this conversation as resolved.
Show resolved Hide resolved

``sudo mysql_secure_installation``
osmosBe marked this conversation as resolved.
Show resolved Hide resolved

* Create your Database and Database User:
osmosBe marked this conversation as resolved.
Show resolved Hide resolved

```
osmosBe marked this conversation as resolved.
Show resolved Hide resolved
sudo mysql -u root -p
CREATE DATABASE gitea;
GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'localhost' IDENTIFIED BY "StrongPassword";
osmosBe marked this conversation as resolved.
Show resolved Hide resolved
FLUSH PRIVILEGES;
QUIT;
```

* Create nginx Config to pass traffic to port 3000:
osmosBe marked this conversation as resolved.
Show resolved Hide resolved

``sudo nano /etc/nginx/conf.d/gitea.conf``
osmosBe marked this conversation as resolved.
Show resolved Hide resolved

* This could look something like this for a secure Installation you should redirect all Traffic to port 443 and use a Certificate.
osmosBe marked this conversation as resolved.
Show resolved Hide resolved
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

```
osmosBe marked this conversation as resolved.
Show resolved Hide resolved
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
`` sudo systemctl restart nginx ``
osmosBe marked this conversation as resolved.
Show resolved Hide resolved

* 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