StockazNG is a free and open-source self-hosted web application for managing expenses and invoices. In this tutorial, we will guide you through the steps of installing StockazNG on your Manjaro system.
Open a terminal window on your Manjaro system.
Install the necessary dependencies:
sudo pacman -S git nginx php php-fpm php-pgsql composer
Clone the StockazNG repository:
git clone https://dev.sigpipe.me/dashie/StockazNG.git
Navigate to the project directory:
cd StockazNG
Install the required PHP packages:
composer install
Edit the config.php
file with your database credentials:
cp config.php.dist config.php
nano config.php
In the config.php
file, update the database section to match your PostgreSQL database configuration:
'database' => [
'dsn' => 'pgsql:host=localhost;dbname=stockazng',
'username' => 'postgres',
'password' => '',
],
Create a new database in PostgreSQL:
sudo -u postgres createdb stockazng
Run the following command to set up the database schema:
./bin/console doctrine:schema:create
Create a virtual host for StockazNG in the /etc/nginx/sites-available/
directory:
sudo nano /etc/nginx/sites-available/stockazng
Add the following Nginx server block to the stockazng
file:
server {
listen 80;
server_name example.com;
root /path/to/stockazng/web;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ ^/(index)\.php(/|$) {
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~ \.php$ {
return 404;
}
error_log /var/log/nginx/stockazng-error.log;
access_log /var/log/nginx/stockazng-access.log;
}
Enable the StockazNG virtual host:
sudo ln -s /etc/nginx/sites-available/stockazng /etc/nginx/sites-enabled/
Restart Nginx to apply the changes:
sudo systemctl restart nginx
Grant the required permissions to the var/
directory:
sudo chown -R www-data:www-data var/
Finally, open your web browser and navigate to http://localhost
to access StockazNG.
Congratulations! You have successfully installed StockazNG on your Manjaro system. You can now start using it to manage expenses and invoices.
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!