bookmark_borderInstalling Gitea on Ubuntu 22.10


In this week’s feature highlight, we look at How to Install Gitea on Ubuntu 22.10

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 hosted in China on DiDi’s cloud.


  • Full SSH root access or a user with Sudo privileges is required.
  • Gitea supports the following databases.
    • SQLite
    • PostgreSQL
    • MySQL
    • MariaDB

In our guide below, we’ll use SQLite as the database for Gitea. You can pick any of the supported databases in your installation as needed.

To Install SQLite use the following command,

apt install sqlite3

To check the version,

sqlite3 --version


root@crown:~# sqlite3 --version
3.39.3 2022-09-05 11:02:23 4635f4a69c8c2a8df242b384a992aea71224e39a2ccab42d8c0b0  

Install Git

Gitea is a painless self-hosted Git service. With features similar to ones in GitHub, Bitbucket, or GitLab. Git is the standard for distributed version control systems and can be installed on Ubuntu systems using apt.

Check for system updates and install them.

apt update

apt upgrade

Install the Git package using the following command,

apt install git

You can check the version of Git installed with the following command,

git --version


root@crown:~# git --version
git version 2.37.2

Create a Git user,

  sudo adduser \
  --system \
  --shell /bin/bash \
  --gecos 'Git Version Control' \
  --group \
  --disabled-password \
  --home /home/git \

Download the Gitea binary

Download the Gitea binary from download page and make it executable.

 apt install wget

 wget -O /tmp/gitea


root@crown:~#  wget -O /tmp/gitea
--2022-10-20 18:22:43--
Resolving (, 2400:52e0:1e01::883:1
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 112413616 (107M) [application/octet-stream]
Saving to: ‘/tmp/gitea’

Move the Gitea binary file to ‘/usr/local/bin’.

mv /tmp/gitea /usr/local/bin

Make the binary executable.

chmod +x /usr/local/bin/gitea   

Create the directory structure and set the required permissions and ownership.

 mkdir -p /var/lib/gitea/{custom,data,indexers,public,log}
 chown git: /var/lib/gitea/{data,indexers,log}
 chmod 750 /var/lib/gitea/{data,indexers,log}
 mkdir /etc/gitea
 chown root:git /etc/gitea
 chmod 770 /etc/gitea

To create a Systemd Unit File.

Download the file to the “/etc/systemd/system/” directory using the following command.

wget -P /etc/systemd/system/  

To reload and enable the Gitea service,

systemctl daemon-reload

systemctl enable --now gitea


root@crown:~# systemctl enable --now gitea
Created symlink /etc/systemd/system/ → /etc/systemd/system/gitea.service.

To check the status of the Gitea service,

systemctl status gitea


root@crown:~# systemctl status gitea
● gitea.service - Gitea (Git with a cup of tea)
     Loaded: loaded (/etc/systemd/system/gitea.service; enabled; preset: enabled)
     Active: active (running) since Thu 2022-10-20 18:23:42 UTC; 15s ago
   Main PID: 14144 (gitea)
      Tasks: 8 (limit: 2227)
     Memory: 129.4M
        CPU: 1.190s
     CGroup: /system.slice/gitea.service
             └─14144 /usr/local/bin/gitea web --config /etc/gitea/app.ini

Configure Gitea

If you’re running ufw firewall on your server, allow the port 3000

ufw allow 3000/tcp

Navigate to your browser. http://yourserver-ip-address:3000 to access the Gitea dashboard.

Follow the on-screen instructions to complete the Gitea setup. Click on Register to start the database initialization.

Database Settings:

  • Database Type: SQLite3
  • Path: Use an absolute path, /var/lib/gitea/data/gitea.db

Application General Settings:

  • Site Title: Enter username.
  • Repository Root Path: keep the default /home/git/gitea-repositories.
  • Git LFS Root Path: keep the default /var/lib/gitea/data/lfs.
  • Run As Username: git
  • SSH Server Domain: Enter your domain name or your IP address.
  • SSH Port: 22, change it if SSH is listening on other Port
  • Gitea HTTP Listen Port: 3000
  • Gitea Base URL: Use http with your domain name or server IP address.
  • Log Path: Leave the default /var/lib/gitea/log

Click on Install to Install Gitea.


Once the installation is completed then create the first user. Open http://yourip:3000/user/sign_up in a web browser and fill in the required details.


Once the form has been submitted, you are logged into your Gitea account.


Upgrading Gitea

To upgrade to a new version first stop the Gitea service.

To stop the Gitea service.

systemctl stop gitea

Download the Gitea binary from download page.

At the time of writing this article, the latest Gitea version is 1.17.3 If there is a newer version available on the link above, change the VERSION variable before using the following command.


wget -O /tmp/gitea${VERSION}/gitea-${VERSION}-linux-amd64

Move the Gitea binary file to /usr/local/bin and make the binary executable.

mv /tmp/gitea /usr/local/bin

chmod +x /usr/local/bin/gitea

To restart the Gitea service,

systemctl restart gitea


bookmark_borderInstalling Node.js on Ubuntu 22.10


Elevate Your Development Game with Node.js: A Beginner-Friendly Guide to Installing on Ubuntu 22.10

Login to the Ubuntu 22.10 server.

Install stable nodejs from the Ubuntu repository by running the following command.

apt install nodejs


root@crown:~# apt install nodejs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libevent-pthreads-2.1-7 libmecab2 libprotobuf-lite23 mecab-ipadic
  mecab-ipadic-utf8 mecab-utils
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libc-ares2 libnode108 nodejs-doc
Suggested packages:
The following NEW packages will be installed:
  libc-ares2 libnode108 nodejs nodejs-doc
0 upgraded, 4 newly installed, 0 to remove and 1 not upgraded.
Need to get 15.0 MB of archives.

Then check the version of the nodejs once the installation is done.

node --version


root@crown:~# node --version

Installing a different version of Node.js from the source

Install NVM manager by using “wget”.

wget -qO- | bash


root@crown:~# wget -qO- | bash
=> Downloading nvm from git to '/root/.nvm'
=> Cloning into '/root/.nvm'...
remote: Enumerating objects: 264, done.
remote: Counting objects: 100% (264/264), done.
remote: Compressing objects: 100% (230/230), done.
remote: Total 264 (delta 31), reused 100 (delta 24), pack-reused 0
Receiving objects: 100% (264/264), 116.37 KiB | 5.54 MiB/s, done.
Resolving deltas: 100% (31/31), done.
Note: switching to '7ad6d98cedde01809e32d56ab8ced064f6f28175'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain the commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

=> Compressing and cleaning up git repository

=> Appending nvm source string to /root/.bashrc
=> Appending bash_completion source string to /root/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/" ] && \. "$NVM_DIR/"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

Update your shell ~/.profile by running following command

source ~/.profile

Next, Check if NVM is installed or not by checking for its version.

nvm --version


root@crown:~# nvm --version

List out all available Node.js versions. you can see all Node.js versions from the first version to the latest version.

nvm ls-remote


root@vps:~# nvm ls-remote

Now install Node.js with the version you want by running “nvm install” command.

eg: Here v18.11.0

 nvm install 18.11.0


root@crown:~# nvm install 18.11.0
Downloading and installing node v18.11.0...
######################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v18.11.0 (npm v8.19.2)
Creating default alias: default -> 18.11.0 (-> v18.11.0)

And check the version of the nodejs once the installation is done.

node -v


root@crown:~# node -v


bookmark_borderInstalling Answer Q&A Community Software on Ubuntu 22.04


In this week’s feature highlight, we look at How To Install Answer Q&A Community Software on Ubuntu 22.04

Answer is a open-source knowledge based community software. You can use it to quickly build your Q&A community for product technical support, customer support, user communication, and more.


Install Docker Compose

To install Docker Compose, run the command,

apt install docker-compose

Running Answer with Docker

To install Answer via docker, run the command,

mkdir answer && cd answer
docker-compose up

Reboot the docker by running the following command,

systemctl restart docker

You can now navigate to your browser to the URL http://yourserver-ip-address:9080 and you will see the Answer Q&A Community Software installation screen.

Replace “yourserver-ip-address” with the actual IP Address of your server

Choose the language


Config database

Note – Answer supports MySQL, PostgreSQL, and SQLite as the database backend.

If you are testing Answers for the first time, you can go ahead with sqlite it does not require any additional configuration.


Enter the basic information




Running Answer in the background with Docker

To start Answers in the background (detached mode), you can use the following command.

docker-compose up --detach


root@vps:~/answer# docker-compose up --detach
Starting answer_db_1 ... done
Starting answer_answer_1 ... done

This concludes the Installation and Answer Q&A Community Software on Ubuntu 22.04.