From ArchWiki
Revision as of 14:31, 25 June 2018 by Pulec (talk | contribs) (thx for signing notice, strk at #gitea (freenode) noted the superuser option + sockets for better security)
Jump to navigation Jump to search

PostgreSQL draft

Install and configure and start the PostgreSQL, then do this to create gitea user and db:

Switch to posgres user:

$ sudo -u postgres -i

Start create db wizzard:

[postgres]$ createuser --interactive

name gitea, superuser: no (TODO add explanation why not superuser) then createdb named gitea using gitea user (its ok to launch the createdb command as regular user as well)

[postgres]$ createdb gitea -U gitea

then try access the the DB via localhost, cause that's how the gittea will try to access it

[postgres]$ psql -d gitea -U gitea -h -W (connect to gitea db as gitea user, host localhost and -W without anything for empty password)

Now to edit the /etc/gitea/app.ini

Default PostgreSQL port is 5432 if you haven't changed it

DB_TYPE = postgres
HOST =;5432
NAME = gitea
USER = postgres
SSL_MODE = disable

TODO setup a password, SSL_MODE wanted? TODO using localhost:port might be unsecure, better to connect directly at the socket (in "/run/postgresql"); (try connecting to db psql -d gitea -U gitea and typing \conninfo for details)

--—This unsigned comment is by Pulec (talk) 22 June 2018‎. Please sign your posts with ~~~~!

Please sign your posts. :)
Any recommendations from Gitea/Gogs for setting up PostgreSQL?
Francoism (talk) 09:38, 24 June 2018 (UTC)