Kallithea is a free and open-source source code management system that lets you manage repositories of different revision control systems. If you want to manage your repositories, Kallithea is a great option. This tutorial will guide you on how to install Kallithea on a Fedora Server Latest.
Update the system packages:
sudo dnf update
Install the required dependencies for Kallithea:
sudo dnf install python3-gunicorn python3-pg8000 python3-pygments python3-kombu python3-redis python3-kallithea python3-supervisor python3 python3-pip
Install the PostgreSQL server:
sudo dnf install postgresql-server
Initialize the PostgreSQL database:
sudo postgresql-setup --initdb
Start the PostgreSQL service:
sudo systemctl start postgresql
Set the PostgreSQL service to start at boot:
sudo systemctl enable postgresql
Create a new PostgreSQL user and database for Kallithea:
sudo su - postgres
createuser -P kallithea # Enter a secure password when prompted
createdb -O kallithea kallithea
exit
Configure PostgreSQL to allow connections from localhost:
sudo vi /var/lib/pgsql/data/pg_hba.conf
Add the following line at the end of the file:
host all all 127.0.0.1/32 md5
Save and exit the file.
Restart the PostgreSQL service:
sudo systemctl restart postgresql
Install Gunicorn:
sudo pip3 install gunicorn
Install Kallithea:
sudo pip3 install kallithea
Create a configuration file for Kallithea:
sudo vi /etc/kallithea.ini
Copy and paste the following configuration into the file:
[server:main]
use = egg:gunicorn#main
host = 127.0.0.1
port = 5000
workers = 4
[app:main]
use = egg:kallithea#main
kallithea.config = %(here)s/kallithea.ini
kallithea.redis_url = redis://127.0.0.1:6379/0
[filter:i18n]
# HTTP_ACCEPT_LANGUAGE based selection
use = egg:Paste#httpexceptions
language_selector = kallithea.lib.i18n.LanguageSelector
gettext_domain = kallithea
[filter:editor]
# Remove this filter because it causes encoding problems
paste.filter_factory = kallithea.lib.utils:remove_filter_factory_factory(editor)
[app:static]
use = egg:kallithea#static
[composite:app]
use = egg:Paste#urlmap
/admin = admin
/ = main
[app:admin]
use = egg:kallithea#admin
[app:main_without_auth]
use = egg:kallithea#main_without_auth
[app:api]
use = egg:kallithea#api
[app:git_http_backend]
use = egg:kallithea#git_http_backend
[app:git_web]
use = egg:kallithea#git_web
[app:blocked]
# This should only be used for development and debugging
use = egg:kallithea#blocked
Save and exit the file.
Create a Supervisor configuration file for Kallithea:
sudo vi /etc/supervisord.d/kallithea.ini
Copy and paste the following configuration into the file:
[program:kallithea]
command=/usr/local/bin/gunicorn --paste /etc/kallithea.ini
autostart=true
autorestart=true
startretries=3
environment=LANG=en_US.UTF-8,LC_ALL=en_US.UTF-8
user=kallithea
group=kallithea
Save and exit the file.
Restart the Supervisor service:
sudo systemctl restart supervisord
Open your web browser and navigate to:
http://127.0.0.1:5000
You should now see the Kallithea login page.
Log in with the default administrator account:
Username: admin
Password: admin
After logging in, you should be able to create repositories and manage your code.
Congratulations! You have successfully installed and configured Kallithea on a Fedora Server Latest.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!