Natvps.id – Managing finances is quite troublesome for some people. Moreover, if you have more than one source of funds that are also managed. Fortunately, there are several applications that can help us to recap income/expenses. One of them is Firefly III, a Finance Manager free and open-source.
In this article we will discuss the Firefly III installation steps in NAT VPS, along with Nginx configurations for Reverse-Proxy. This article uses Ubuntu 22.04 as a reference, but you can use other distributions such as Debian and Centos. Make sure the OS used supports the docker.
Port forwarding configuration
Considering we use grout, we need to add 2 Port Forwarding Configuration on the virtualizor panel (or other VPS panels according to the provider), namely Port Forwarding HTTP and HTTPS for the Firefly III domain.
For example, in this article will use a domain budget-tutorial.mdinata.my.id To access Firefly III. You are free to change the domain according to your choice. Record this port and domain, because we will use it again in the deploy process.
Don’t forget to add DNS Records to go to your NAT VPS public IP, like this:
Install Docker
We will use a docker and compile a docker for men-spread Firefly III.
First, install curly Using Orders:
apt update && apt install curl -y
Then, run manuscript Automatic installation from the docker by entering:
curl -fsSL get.docker.com | sh
Wait until the installation process is complete.
Spreading Firefly III
Create a new directory with a name firefly_iii
cd ~/ mkdir firefly_iii cd firefly_iii
Download Compose Docker Configuration from Firefly III Repository:
wget
Also download the Firefly III configuration and the database:
wget -O .env wget -O .db.env
Before changing the configuration, we need to make a random token with a length of 32 characters. This token will be used by Firefly III to communicate between containers.
tr -dc 'A-Za-z0-9' </dev/urandom | head -c 32 && echo
Copy this code, we will use it after this.
Edit the file docker-compose.yml
using nano:
apt install nano -y nano docker-compose.yaml
In the section ports
(first container), change 80 become 8080 To avoid conflict with the Nginx port.
ports: - 8080:8080
Then, on the container cron
change PLEASE_REPLACE_WITH_32_CHAR_CODE
with the token that was generated earlier.
| echo \"0 3 * * * wget -qO- anda tadi>;echo\"
Save the file by pressing Ctrl-X
, y
Then Enter
.
Continue to the Firefly III configuration, open the file .env
:
nano .env
Change SITE_OWNER
with your email:
# This should be your email address. # If you use Docker or similar, you can set this variable from a file by using SITE_OWNER_FILE # The variable is used in some errors shown to users who aren't admin. [email protected]
In the section APP_KEY
Change with your previous token:
# The encryption key for your sessions. Keep this very secure. # Change it to a string of exactly 32 chars or use something like `php artisan key:generate` to generate it. # If you use Docker or similar, you can set this variable from a file by using APP_KEY_FILE # # Avoid the "#" character in your APP_KEY, it may break things. # APP_KEY=<token Anda>
On TZ
Replace with Asia/Jakarta
# Change this value to your preferred time zone. # Example: Europe/Amsterdam # For a list of supported time zones, see TZ=Asia/Jakarta
In the TRUSTED_PROXIES=
Fill with **
:
# TRUSTED_PROXIES is a useful variable when using Docker and/or a reverse proxy. # Set it to ** and reverse proxies work just fine. TRUSTED_PROXIES=**
Finally, in the section APP_URL
(usually located at the bottom), replace with You>. Example:
# # Please make sure this URL matches the external URL of your Firefly III installation. # It is used to validate specific requests and to generate URLs in emails. # APP_URL=
Save the file by pressing Ctrl-X
, y
Then Enter
.
For files
.db.env
Leave it because we use the default configuration which is quite complete.
Run Firefly III using Docker Compose:
docker compose up -d
Wait until the process spread finished.
Nginx Configuration (Reverse Proxy)
So that we can access the URL through a domain like budget-tutorial.mdinata.my.idwe can use Reverse Proxy Like Nginx.
First, install Nginx through the command:
# Hapus Apache2 dan pendukungnya (biasanya terpasang secara bawaan di VPS OpenVZ) apt purge apache2* -y # Install NGINX apt install nginx -y
Create a new host configuration specifically for Firefly III:
nano /etc/nginx/sites-available/firefly_iii
Then stick the following configuration:
# Konfigurasi NGINX untuk deploy Firefly III di NAT VPS # server { server_name budget-tutorial.mdinata.my.id; listen 80; location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_pass } }
Adjust budget-tutorial.mdinata.my.id
With your Firefly III domain.
Activate the configuration with:
ln -sf /etc/nginx/sites-available/firefly_iii /etc/nginx/sites-enabled/firefly_iii # Restart NGINX systemctl restart nginx
Produce SSL certificate (let’s encryption)
So that our domain can be accessed through HTTPS, we need to make a SSL certificate. We can use a free SSL certificate from Let’s Encrypt through Certbot.
Install Certbot and Nginx plugin use the command:
apt install python3-certbot python3-certbot-nginx
So, produce Certificate through Certbot with the command
certbot --nginx -d budget-tutorial.mdinata.my.id
Change budget-tutorial.mdinata.my.id
with your domain.
Happy! Your current domain can be accessed via a safe connection https.
Access Firefly III
Firefly III can be accessed through your previous domain. Example: .
Please make further configurations and fill in financial data according to your needs.
Cover
Thus this article is about the steps of the Firefly III deploy in NAT VPS. If you are confused or doubtful, don’t hesitate to ask questions in the telegram group @ipv6indonesia. Thank You!
Game Center
Game News
Review Film
Rumus Matematika
Anime Batch
Berita Terkini
Berita Terkini
Berita Terkini
Berita Terkini
review anime