How to Install Family Accounting Tool on Ubuntu Server Latest

The Family Accounting Tool (FACTO) is an open-source accounting tool developed for managing household finances. It allows families to track their expenses, income, assets, and liabilities. In this tutorial, we will explain how to install the FACTO on Ubuntu Server Latest.

Prerequisites

For this tutorial, we assume that you have:

Step 1: Install Required Dependencies

Before we proceed with the installation, we need to install some of the required dependencies. Open the terminal and execute the following command:

sudo apt update
sudo apt install git libssl-dev libpq-dev libsqlite3-dev

This command will update the package list and install Git, SSL, PostgreSQL, and SQLite.

Step 2: Clone FACTO from Git

To proceed with the installation of FACTO, we need to clone the code from the Git repository. Execute the following command in the terminal:

git clone https://github.com/nymanjens/facto.git

This command will clone the code in the current working directory.

Step 3: Install RVM

To manage the Ruby version, we will install RVM. Execute the following command in the terminal:

curl -sSL https://get.rvm.io | bash

This command will install RVM.

Step 4: Install Ruby and Bundler

We need to install Ruby and Bundler to execute the FACTO application. Execute the following command in the terminal:

rvm install 2.5.3
gem install bundler

These commands will install Ruby version 2.5.3 and Bundler.

Step 5: Install FACTO Dependencies

We need to install the dependencies required for FACTO. Navigate to the FACTO directory and execute the following command:

bundle install

This command will install the required dependencies.

Step 6: Configure FACTO

Before running the application, we need to configure the database settings. Create the config/database.yml file by copying the config/database.example.yml and add the database configuration:

cp config/database.example.yml config/database.yml
nano config/database.yml

In the file, specify the database configuration:

production:
  adapter: postgresql
  encoding: utf8
  host: localhost
  database: facto
  username: db_user
  password: db_password
  pool: 5

Replace the database: facto, username: db_user & password: db_password with the actual PostgreSQL database credentials.

Step 7: Create Database

We will create the PostgreSQL database for FACTO. Execute the following command in the terminal:

sudo -u postgres psql -c "CREATE DATABASE facto;"
sudo -u postgres psql -c "CREATE USER db_user WITH PASSWORD 'db_password';"
sudo -u postgres psql -c "ALTER ROLE db_user SET client_encoding TO 'utf8';"
sudo -u postgres psql -c "ALTER ROLE db_user SET default_transaction_isolation TO 'read committed';"
sudo -u postgres psql -c "ALTER ROLE db_user SET timezone TO 'UTC';"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE facto TO db_user;"

Replace the db_user and db_password with the actual username and password.

Step 8: Execute Database Scripts

Execute the following command in the terminal to apply the database changes:

RAILS_ENV=production bundle exec rails db:migrate
RAILS_ENV=production bundle exec rails db:seed

This command will create the required database schema.

Step 9: Start FACTO

To start FACTO, execute the following command in the terminal:

RAILS_ENV=production bundle exec rails s -e production -p 80

This command will start the application, and it will run on port 80. Access the application using your browser with the server IP.

Conclusion

In this tutorial, we have explained how to install Family Accounting Tool on the Ubuntu Server Latest. By following the above steps, you should be able to install and run the FACTO application without any issues.

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!