From ArchWiki
Revision as of 01:00, 2 July 2018 by Pulec (talk | contribs) (learned how to sign and minor edits)
Jump to navigation Jump to search

PostgreSQL draft

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

1. Switch to posgres user:

$ sudo -u postgres -i

2. Start create db wizzard (TODO add explanation why not superuser):

[postgres]$ createuser --interactive
name: gitea
superuser: no

3. then createdb named gitea using gitea user (its ok to launch the createdb command as regular user as well)

[postgres]$ createdb gitea -U gitea

4. 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)

Pulec (talk) 01:00, 2 July 2018 (UTC)

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