You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Rename h3 title
* Add intro
Should work on Ubuntu Xenial, but should work on any Linux distros.
* Indirect edit files
Instead of providing `sudo vim`, invite to edit files.
* enable now instead of enable and start
* Re-add systemctl enable && systemctl start
* Revert service enablement back to status quo
* Add enable now counterpart for systemd > v220
* Apply suggestions from @sapk
Strip `vim` from editor usage
Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/content/doc/installation/run-as-service-in-ubuntu.en-us.md
+17-15
Original file line number
Diff line number
Diff line change
@@ -13,16 +13,13 @@ menu:
13
13
identifier: "linux-service"
14
14
---
15
15
16
-
### Run as service in Ubuntu 16.04 LTS
16
+
### Run Gitea as Linux service
17
17
18
-
#### Using systemd
18
+
You can run Gitea as service, using either systemd or supervisor. The steps below tested on Ubuntu 16.04, but those should work on any Linux distributions (with little modification).
19
19
20
-
Run the below command in a terminal:
21
-
```
22
-
sudo vim /etc/systemd/system/gitea.service
23
-
```
20
+
#### Using systemd
24
21
25
-
Copy the sample [gitea.service](https://github.com/go-gitea/gitea/blob/master/contrib/systemd/gitea.service).
22
+
Copy the sample [gitea.service](https://github.com/go-gitea/gitea/blob/master/contrib/systemd/gitea.service) to `/etc/systemd/system/gitea.service`, then edit the file with your favorite editor.
26
23
27
24
Uncomment any service that needs to be enabled on this host, such as MySQL.
28
25
@@ -35,6 +32,10 @@ sudo systemctl enable gitea
35
32
sudo systemctl start gitea
36
33
```
37
34
35
+
If you have systemd version 220 or later, you can enable and immediately start Gitea at once by:
36
+
```
37
+
sudo systemctl enable gitea --now
38
+
```
38
39
39
40
#### Using supervisor
40
41
@@ -49,19 +50,20 @@ Create a log dir for the supervisor logs:
0 commit comments