|
| 1 | +--- |
| 2 | +icon: file |
| 3 | +--- |
| 4 | + |
| 5 | +# Gitea |
| 6 | + |
| 7 | +Gitea is an open-source forge software package for hosting software development version control using Git as well as other collaborative features like bug tracking, wikis and code review. It supports self-hosting but also provides a free public first-party instance. |
| 8 | + |
| 9 | +!!! |
| 10 | +It is important to thoroughly read and follow this guide, as one mistake might end up in you having to recreate the server. |
| 11 | +!!! |
| 12 | + |
| 13 | +!!! |
| 14 | +This guide is not fully completed yet. If you don't know what you're doing, then wait until the guide is completed. |
| 15 | +!!! |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | +## Requirements |
| 20 | + |
| 21 | +- Have an account created and linked to the panel. [Click here if you have not done so already.](/getting-started) |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +## Creating the server |
| 26 | + |
| 27 | +To create a free server, go into `#⌛╏commands` and run `DBH!server create gitea [optional server name]` to create a free server. Once you have done so, the bot should return the following output. |
| 28 | + |
| 29 | +``` |
| 30 | +Server Successfully Created |
| 31 | +Click Here to Access Your Server |
| 32 | +Status: User ID: Type: |
| 33 | +Created 16464 gitea |
| 34 | +Server Name: |
| 35 | +Untitled Server (settings -> server name) |
| 36 | +``` |
| 37 | + |
| 38 | +If you are creating a donator server, instead run `DBH!server create-donator gitea [optional server name]` |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +## Configuration |
| 43 | + |
| 44 | +Once the server has finished installing, go to files, then open the `custom` folder and finally open `app.ini`. |
| 45 | + |
| 46 | +Gitea has an SSL bug, so your browser won't access the server via the server's default domain because the SSL certificate is broken. **We recommend proxying the domain.** |
| 47 | +Now, edit the domain (just replace the 0.0.0.0) with your Proxied domain (if you have) or the server's default domain WITHOUT the port. Once done, the config should be something like this. |
| 48 | + |
| 49 | +```ini |
| 50 | +[server] |
| 51 | + LOCAL_ROOT_URL = http://0.0.0.0:7714/ |
| 52 | + DOMAIN = dono-XX.danbot.host |
| 53 | + HTTP_PORT = 7714 |
| 54 | + DISABLE_SSH = true |
| 55 | + SSH_PORT = 2020 |
| 56 | +``` |
| 57 | + |
| 58 | +--- |
| 59 | + |
| 60 | +## Creating a database |
| 61 | + |
| 62 | +If you want to use a database on a different server, follow the guide for [PostgreSQL](/server-types/postgres) and note the node, password and port down as you'll need it for [the database settings.](#database-settings) |
| 63 | + |
| 64 | +--- |
| 65 | + |
| 66 | +## Configuring the server |
| 67 | + |
| 68 | +Now start the server. It may take a bit, so wait patiently. |
| 69 | + |
| 70 | +Once it has started, open the site using the domain you put in the app.ini file with the server port. |
| 71 | + |
| 72 | +Once done, you should be at the configuration page for Gitea. |
| 73 | + |
| 74 | +You can close this page, but your configuration will not save until you finish it and click Install Gitea at the bottom of the page. |
| 75 | + |
| 76 | +### Database settings |
| 77 | + |
| 78 | +**Database Type:** Set it to which database you'll be using. In this case, PostgreSQL. |
| 79 | + |
| 80 | +**Host:** Use the node and port your PostgreSQL server is on. Example: `dono-03.danbot.host:1234` |
| 81 | + |
| 82 | +**Username:** Set it to pterodactyl. |
| 83 | + |
| 84 | +**Password:** Use the password you noted down earlier. If you forgot it, click [here](/server-types/postgres/#password) and follow what it says to find it. |
| 85 | + |
| 86 | +**Database Name:** Set it to postgres. |
| 87 | + |
| 88 | +**SSL:** Leave it as default. |
| 89 | + |
| 90 | +**Schema:** Leave it as default. |
| 91 | + |
| 92 | +### General settings |
| 93 | + |
| 94 | +**Site Title:** Leave it as default or give it a name. |
| 95 | + |
| 96 | +**Repository Root Path, Git LFS Root Path & Run As Username:** LEAVE IT AS DEFAULT. It's your fault if you edit them and Gitea doesn't work. |
| 97 | + |
| 98 | +**Server Domain:** If you set it up in `app.ini` you won't need to edit this. |
| 99 | + |
| 100 | +**SSH Server Port:** Leave the box empty. |
| 101 | + |
| 102 | +**Gitea HTTP Listen Port:** LEAVE IT AS DEFAULT. |
| 103 | + |
| 104 | +**Gitea Base URL:** Leave it as default unless you are using a proxied domain. If you are, then remove the port. |
| 105 | + |
| 106 | +**Log path:** Leave it as default. |
| 107 | + |
| 108 | +### Optional settings |
| 109 | + |
| 110 | +These settings will not be explained as thoroughly, but it is suggested to read this. |
| 111 | + |
| 112 | +**Email settings** |
| 113 | + |
| 114 | +This setting is not needed as Gitea is intended for private use, but if you want you can add an email server so you can get updates of your repositories. |
| 115 | + |
| 116 | +**Server and Third-Party Service Settings** |
| 117 | + |
| 118 | +Here you can set up Services that will work with Gitea. Hover your mouse over any option for more information. |
| 119 | + |
| 120 | +**Administrator Account Settings** |
| 121 | + |
| 122 | +You can add an admin account now to make it simpler, but if you don't, the first account created will be admin by default. |
| 123 | + |
| 124 | +--- |
| 125 | + |
| 126 | +## Configuration & installation conclusion |
| 127 | + |
| 128 | +After clicking "Install Gitea" you should be patient and **wait** until Gitea gets installed successfully. You can see the progress in the server's logs. |
| 129 | + |
| 130 | +--- |
| 131 | + |
| 132 | +## 504 Gateway Time-out and 503 Bad Gateway |
| 133 | + |
| 134 | +This is a very common error and may appear during installation. This is due to the server still installing and maybe rebooting. **DON'T RELOAD OR PRESS F5 AS YOU WILL START THE PROCESS AGAIN OR BREAK THE INSTALLATION.** To reload, just type the server's domain back in. **NEVER RELOAD.** |
| 135 | + |
| 136 | +--- |
| 137 | + |
| 138 | +Once it has installed, you should be brought to the main page of Gitea. Once you are here, you can safely reload the web page without issue. |
0 commit comments