Overview of Firefly III
Firefly III is an open-source personal finance manager that helps users track expenses, income, and budgets. With its powerful features and flexibility, itโs a great choice for those who want to regain control over their finances. This guidewill take you through the steps to self-host Firefly III on a VPS using Docker, providing a practical approach for developers and homelabbers.
Choosing a VPS Provider
Before diving into the installation, you need a reliable VPS provider. Below is a comparison of some of the top options available in the market.
| Provider | Monthly Price | Features |
|---|---|---|
| Contabo VPS | 5.99 EUR/mo | Large storage, excellent performance |
| Hetzner Cloud | 4.15 EUR/mo | Affordable pricing, great for developers |
| DigitalOcean | 6 USD/mo | Easy to use, scalable solutions |
| Vultr | 6 USD/mo | Global presence, quick deployment |
| Linode (Akamai) | 5 USD/mo | Strong community support, solid performance |
For a more comprehensive comparison, check out our full VPS comparison.
Prerequisites
- VPS Setup: Choose and sign up for a VPS provider. Youโll want a server running Ubuntu 20.04 or later.
- Domain Name: For ease of access, purchasing a domain name is recommended but not strictly necessary.
- SSH Access: Ensure you have SSH access to your VPS for command-line operations.
- Docker & Docker Compose: Install Docker and Docker Compose, as they are needed to run Firefly III in containers.
Steps to Install Firefly III on a VPS
Step 1: Connect to Your VPS
Use an SSH client to connect to your VPS:
ssh root@your-vps-ip
Step 2: Install Docker and Docker Compose
Run the following commands to install Docker and Docker Compose:
# Update your package manager
apt update
apt upgrade -y
# Install Docker
apt install docker.io -y
# Start Docker service
systemctl start docker
systemctl enable docker
# Install Docker Compose
apt install docker-compose -y
You can verify Docker installation with:
docker --version
docker-compose --version
Step 3: Set Up Firefly III
- Create a directory for Firefly III:
mkdir ~/firefly-iii
cd ~/firefly-iii
- Create a
docker-compose.ymlfile:
version: '3.8'
services:
app:
image: fireflyiii/core:latest
restart: unless-stopped
ports:
- '8080:80'
environment:
- APP_KEY=your_app_key_here
- DB_CONNECTION=mysql
- DB_HOST=db
- DB_DATABASE=firefly_iii
- DB_USERNAME=firefly
- DB_PASSWORD=your_db_password_here
volumes:
- firefly-storage:/var/www/html/storage
db:
image: mysql:5.7
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: your_root_password_here
MYSQL_DATABASE: firefly_iii
MYSQL_USER: firefly
MYSQL_PASSWORD: your_db_password_here
volumes:
- db-data:/var/lib/mysql
volumes:
firefly-storage:
db-data:
- Start the Services:
docker-compose up -d
You can check the running containers with:
docker ps
Step 4: Access Firefly III
Open your web browser and navigate to http://your-vps-ip:8080. Follow the setup wizard to complete the configuration.
FAQs
1. What is the cost of self-hosting Firefly III on a VPS?
The cost of self-hosting Firefly III largely depends on the VPS provider you choose. Providers like Hetzner Cloud offer plans starting from 4.15 EUR/month, making it budget-friendly for developers and homelabbers. Always consider additional factors such as your expected traffic, storage needs, and whether you will use other services on the VPS.
2. Can I install Firefly III without Docker?
Yes, Firefly III can be installed without Docker; however, using Docker simplifies the process and ensures that all dependencies are managed properly. If you choose to install Firefly III without Docker, you will need to manually install PHP, Composer, and a web server like Nginx or Apache, which can be more complex for users unfamiliar with server configuration.
3. How do I backup my Firefly III data?
Backing up your Firefly III data can be done in multiple ways. The simplest method is to create a backup of the MySQL database and the applicationโs storage volume. For backup procedures, you can use:
docker exec <container_name> mysqldump -u firefly -p firefly_iii > backup.sql
Then, copy the storage volume:
docker cp <container_name>:/var/www/html/storage path_to_backup_directory/
Regular backups ensure you do not lose important financial data in case of errors or server issues.
Conclusion
Self-hosting Firefly III on a VPS gives you enhanced control over your financial data and privacy. With the ability to deploy it using Docker, the setup becomes streamlined, particularly for developers. Choose a provider that fits your needs, follow the steps outlined in this guide, and youโll have Firefly III running in no time. Consider checking forums like r/selfhosted for community support and updates on best practices.