Open ThalesADAmaral opened 10 months ago
This is how I manage to install Firefly III in CasaOS using manual install:
version: '3.3'
services:
firefly:
image: fireflyiii/core:latest
hostname: app
container_name: firefly-core
restart: always
volumes:
- firefly_upload:/var/www/html/storage/upload
networks:
- firefly
ports:
- 80:8080
depends_on:
- db
labels:
icon: https://winsomnia.net/assets/icons/Firefly-iii.jpg
environment:
- ALLOW_WEBHOOKS=false
- APP_DEBUG=true
- APP_ENV=local
- APP_KEY=<YOUR_KEY>
- APP_LOG_LEVEL=notice
- APP_NAME=Firefly
- APP_URL=<YOUR_APP_URL>
- AUDIT_LOG_CHANNEL=
- AUDIT_LOG_LEVEL=emergency
- AUTHENTICATION_GUARD=web
- AUTHENTICATION_GUARD_EMAIL=
- AUTHENTICATION_GUARD_HEADER=REMOTE_USER
- BROADCAST_DRIVER=log
- CACHE_DRIVER=file
- CACHE_PREFIX=firefly
- COOKIE_DOMAIN=
- COOKIE_PATH=/
- COOKIE_SAMESITE=lax
- COOKIE_SECURE=false
- CUSTOM_LOGOUT_URL=
- DB_CONNECTION=mysql
- DB_DATABASE=firefly
- DB_HOST=db
- DB_PASSWORD=dbpassword
- DB_PORT=3306
- DB_SOCKET=
- DB_USERNAME=firefly
- DEFAULT_LANGUAGE=en_US
- DEFAULT_LOCALE=equal
- DEMO_PASSWORD=
- DEMO_USERNAME=
- DISABLE_CSP_HEADER=false
- DISABLE_FRAME_HEADER=false
- DKR_BUILD_LOCALE=false
- DKR_CHECK_SQLITE=true
- DKR_RUN_MIGRATION=true
- DKR_RUN_PASSPORT_INSTALL=true
- DKR_RUN_REPORT=true
- DKR_RUN_UPGRADE=true
- DKR_RUN_VERIFY=true
- ENABLE_EXTERNAL_MAP=false
- ENABLE_EXTERNAL_RATES=false
- FIREFLY_III_LAYOUT=v1
- IPINFO_TOKEN=
- LOG_CHANNEL=stack
- MAIL_ENCRYPTION=null
- MAIL_FROM=changeme@example.com
- MAIL_HOST=null
- MAIL_MAILER=log
- MAIL_PASSWORD=null
- MAIL_PORT=2525
- MAIL_SENDMAIL_COMMAND=
- MAIL_USERNAME=null
- MAILGUN_DOMAIN=
- MAILGUN_ENDPOINT=api.mailgun.net
- MAILGUN_SECRET=
- MANDRILL_SECRET=
- MAP_DEFAULT_LAT=51.983333
- MAP_DEFAULT_LONG=5.916667
- MAP_DEFAULT_ZOOM=6
- MYSQL_SSL_CA=
- MYSQL_SSL_CAPATH=/etc/ssl/certs/
- MYSQL_SSL_CERT=
- MYSQL_SSL_CIPHER=
- MYSQL_SSL_KEY=
- MYSQL_SSL_VERIFY_SERVER_CERT=true
- MYSQL_USE_SSL=false
- PAPERTRAIL_HOST=
- PAPERTRAIL_PORT=
- PASSPORT_PRIVATE_KEY=
- PASSPORT_PUBLIC_KEY=
- PGSQL_SCHEMA=public
- PGSQL_SSL_CERT=null
- PGSQL_SSL_CRL_FILE=null
- PGSQL_SSL_KEY=null
- PGSQL_SSL_MODE=prefer
- PGSQL_SSL_ROOT_CERT=null
- PUSHER_ID=
- PUSHER_KEY=
- PUSHER_SECRET=
- QUEUE_DRIVER=sync
- REDIS_CACHE_DB=1
- REDIS_DB=0
- REDIS_HOST=127.0.0.1
- REDIS_PASSWORD=
- REDIS_PATH=
- REDIS_PORT=6379
- REDIS_SCHEME=tcp
- REDIS_USERNAME=
- SEND_ERROR_MESSAGE=true
- SEND_REPORT_JOURNALS=true
- SESSION_DRIVER=file
- SITE_OWNER=<YOUR_EMAIL>
- SPARKPOST_SECRET=
- STATIC_CRON_TOKEN=<STATIC_CRON_TOKEN>
- TRACKER_SITE_ID=
- TRACKER_URL=
- TRUSTED_PROXIES=**
- TZ=<YOUR_TIMEZONE_HERE>
- VALID_URL_PROTOCOLS=
db:
image: mariadb:lts
hostname: db
container_name: firefly-db
restart: always
networks:
- firefly
volumes:
- firefly_db:/var/lib/mysql
labels:
icon: https://winsomnia.net/assets/icons/Firefly-iii.jpg
environment:
- MYSQL_DATABASE=firefly
- MYSQL_PASSWORD=dbpassword
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- MYSQL_USER=firefly
cron:
image: alpine
hostname: cron
container_name: firefly-cron
restart: always
networks:
- firefly
labels:
icon: https://winsomnia.net/assets/icons/Firefly-iii.jpg
command:
- sh
- -c
- echo "0 3 * * * wget -qO- http://app:8080/api/v1/cron/<STATIC_CRON_TOKEN>" | crontab - && crond -f -L /dev/stdout
volumes:
firefly_iii_upload:
firefly_iii_db:
networks:
firefly:
name: firefly
driver: bridge
You will see a warning about needing to configure other things, it's fine, click Ok
Now you will have the following window (DO NOT CLICK INSTALL YET)
First give the App a name on the Title field
Now add the web UI host and port (i.e. 192.168.1.32 : 80)
Note: If you change the port here you MUST change it in the Port section too.
Now you have to change some other things in the Environment Variables section:
Now, go to the db tab above and change the environment variables if you need to (like the DB password if you changed it above):
Finally go to the cron tab above and under container command you will see a _
Click on Install, if everything is fine, now you should see the Installing window
After install is complete now you can navigate to your instance in the HOST:PORT address you configured:
Note: One thing to notice is that CasaOS doesn't have support for env files right now so better is to create a _dockercompose.yml file with every environment variable in the environment section and import it to CasaOS.
Hope this helps!
If you need help don't hesitate on comment here.
Thank you so much @jkano ! I will try to install in the next days and i will post here the result
@jkano , it worked!! Thank you so much!
I only noticed now, but the app is with this strange name on it (as the image shows). I'm asking my self now, have i done something wrong?
Other question: How do i keep the app updated (or it's automatically updated)?
And, for last, i didn't get it when you said:
Note: One thing to notice is that CasaOS doesn't have support for env files right now so better is to create a docker_compose.yml file with every environment variable in the environment section and import it to CasaOS.
If it's working, do i need to do something else?
@regassa22 glad it worked for you!
Regarding the app name, did you fill the Title field in step 6? I think if you don’t add a title it will put the random generated name that Docker puts to the container.
You can check if it has a name by clicking the three dots in the app icon and clicking on Settings:
Then, inside firefly settings (make sure the selected tab is firefly) you can set a name for the App (Title field) and save it:
And about last part (my comment about the env files) you don’t have to do anything else, the file that I gave to you already had the env file info inside it. That was only a comment saying that CasaOS doesn’t support env files so you have to manually add all the options inside the env file to a manual installation.
Regarding how to update the app, I can give you a guide on how to do it, it’s not that hard but you have to do it correctly because you may lose your data.
Do you mind to share how to install the Firefly Data Import Tool? @jkano
@regassa22 sure.
Please follow the next steps to install the Firefly Importer as a separate app in Casa OS:
Note: The Redirect URL IP address that is shown there is my Firefly URL, your IP should be different. This is the IP of the device Firefly is installed on. Port is 81 as we are going to install the importer on port 81. Also, remember to uncheck the Confidential option
Title: Put whatever you want to name your app here (i.e. Firefly Importer)
Icon URL: Leave blank to have a generic icon
Network: Select whatever network is inside the Bridge section, not HO
Web UI:
This has 4 parts:
- Protocol: http://
- The IP or your device (i.e. 192.168.1.3)
- Port: 81
- /
Environment variables:
FIREFLY_III_URL: Here you add your firefly URL (i.e: your IP, http://192.168.1.3:80)
VANITY_URL: Same URL as FIREFLY_III_URL
FIREFLY_III_CLIENT_ID: Here you put the number you wrote down on step 4
TZ: Your timeZone, you can use the same as when you created firefly (see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
Note: Sometimes, the installing popup message doesn't dissapear even when it says installation completed. You can click on the X to close it.
Oh, and to update the app:
There is a manual way and an automatic way, but I'm not sure if the automatic way works because Firefly haven't had any update since I installed it, I'm on last version 6.1.10.
The automatic way should work by clicking on the three dots in the app and click on Check then update
But I havent tested it as there are no updates yet.
The manual way is a little bit more risky, but you can do this:
⚠️BEWARE: Do NOT check the Delete userdata (config folder) or you will lose everything!
ℹ️ I'm going to test whenever Firefly release a new update if the Check then update option works and I post here so you dont have to do it manually.
Hi @jkano, I followed your guide and I installed Firefly III on my zima board, unfortunatly after a device reboot it seems that the system fails to boot Firefly III (I just see the cron process on the process list). Any advice?
Hi @jkano, I followed your guide and I installed Firefly III on my zima board, unfortunatly after a device reboot it seems that the system fails to boot Firefly III (I just see the cron process on the process list). Any advice?
Did you learned how to solve it? I'm facing the same problem but in ubuntu CasaOS
Hi @jkano, I followed your guide and I installed Firefly III on my zima board, unfortunatly after a device reboot it seems that the system fails to boot Firefly III (I just see the cron process on the process list). Any advice?
Weird, that does not happen to me. What do you see in casa OS? Maybe you can try to check CasaOS logs to see why your firefly iii instance is not booting up. Mine works after restarts.
Hi @jkano, I followed your guide and I installed Firefly III on my zima board, unfortunatly after a device reboot it seems that the system fails to boot Firefly III (I just see the cron process on the process list). Any advice?
Weird, that does not happen to me. What do you see in casa OS? Maybe you can try to check CasaOS logs to see why your firefly iii instance is not booting up. Mine works after restarts.
UPDATE* I was able to solve the problem on Nextcloud, change the restart policy to unless-stopped, but that didn't do the trick on Firefly III
Thank you. I restarted CasaOS and the same issue occurred. With Nextcloud, simply entering the settings and clicking save without making any changes restores normal functionality. However, with Firefly III, if I do the same (enter settings and click save), I can access it, but it redirects directly to the registration page. This is happening on the second different installation of CasaOS that I have done, and the logs do not provide much information
26T19:23:22.026+0100 info CPU thermal zone found: x86_pkg_temp, path: /sys/devices/virtual/thermal/thermal_zone6. {"func": "service.GetCPUThermalZone", "file": "/home/runner/work/CasaOS/CasaOS/service/system.go", "line": 462} 27T10:04:48.518+0100 info CPU thermal zone found: x86_pkg_temp, path: /sys/devices/virtual/thermal/thermal_zone6. {"func": "service.GetCPUThermalZone", "file": "/home/runner/work/CasaOS/CasaOS/service/system.go", "line": 462} 27T10:04:48.705+0100 info Notified systemd that casaos main service is ready {"func": "main.main", "file": "/home/runner/work/CasaOS/CasaOS/main.go", "line": 208} 27T10:04:48.706+0100 info CasaOS main service is listening... {"address": "127.0.0.1:38347", "func": "main.main", "file": "/home/runner/work/CasaOS/CasaOS/main.go", "line": 224} 27T10:04:58.524+0100 info when CheckAndMountAll storages {"storages": {"mountPoints":[]}, "func": "service.(storageStruct).CheckAndMountAll", "file": "/home/runner/work/CasaOS/CasaOS/service/storage.go", "line": 71} 27T10:04:58.526+0100 info when CheckAndMountAll section {"section": {"remotes":[]}, "func": "service.(storageStruct).CheckAndMountAll", "file": "/home/runner/work/CasaOS/CasaOS/service/storage.go", "line": 76} 27T10:09:53.022+0100 info CPU thermal zone found: x86_pkg_temp, path: /sys/devices/virtual/thermal/thermal_zone6. {"func": "service.GetCPUThermalZone", "file": "/home/runner/work/CasaOS/CasaOS/service/system.go", "line": 462}
Hi @jkano, I followed your guide and I installed Firefly III on my zima board, unfortunatly after a device reboot it seems that the system fails to boot Firefly III (I just see the cron process on the process list). Any advice?
Weird, that does not happen to me. What do you see in casa OS? Maybe you can try to check CasaOS logs to see why your firefly iii instance is not booting up. Mine works after restarts.
- UPDATE* I was able to solve the problem on Nextcloud, change the restart policy to unless-stopped, but that didn't do the trick on Firefly III
Thank you. I restarted CasaOS and the same issue occurred. With Nextcloud, simply entering the settings and clicking save without making any changes restores normal functionality. However, with Firefly III, if I do the same (enter settings and click save), I can access it, but it redirects directly to the registration page. This is happening on the second different installation of CasaOS that I have done, and the logs do not provide much information
So, even after changing it to unless-stopped is not booting up on restart? Or now is booting up but then you see the registration screen?
It will be easier to debug if you can share screenshots of your configuration for firefly III on casaOS. Firefly being asking for registration on boot suggests something is not correctly configured on the data volume or location.
Hi @jkano, I followed your guide and I installed Firefly III on my zima board, unfortunatly after a device reboot it seems that the system fails to boot Firefly III (I just see the cron process on the process list). Any advice?
Weird, that does not happen to me. What do you see in casa OS? Maybe you can try to check CasaOS logs to see why your firefly iii instance is not booting up. Mine works after restarts.
- UPDATE* I was able to solve the problem on Nextcloud, change the restart policy to unless-stopped, but that didn't do the trick on Firefly III
Thank you. I restarted CasaOS and the same issue occurred. With Nextcloud, simply entering the settings and clicking save without making any changes restores normal functionality. However, with Firefly III, if I do the same (enter settings and click save), I can access it, but it redirects directly to the registration page. This is happening on the second different installation of CasaOS that I have done, and the logs do not provide much information
So, even after changing it to unless-stopped is not booting up on restart? Or now is booting up but then you see the registration screen?
It will be easier to debug if you can share screenshots of your configuration for firefly III on casaOS. Firefly being asking for registration on boot suggests something is not correctly configured on the data volume or location.
It does not start until I enter the settings and save. However, it always redirects to the registration window. If I click on sign in, the page returns to the registration window.
Here are my configuration. And thank you for you support!
Hi @jkano, I followed your guide and I installed Firefly III on my zima board, unfortunatly after a device reboot it seems that the system fails to boot Firefly III (I just see the cron process on the process list). Any advice?
Weird, that does not happen to me. What do you see in casa OS? Maybe you can try to check CasaOS logs to see why your firefly iii instance is not booting up. Mine works after restarts.
- UPDATE* I was able to solve the problem on Nextcloud, change the restart policy to unless-stopped, but that didn't do the trick on Firefly III
Thank you. I restarted CasaOS and the same issue occurred. With Nextcloud, simply entering the settings and clicking save without making any changes restores normal functionality. However, with Firefly III, if I do the same (enter settings and click save), I can access it, but it redirects directly to the registration page. This is happening on the second different installation of CasaOS that I have done, and the logs do not provide much information
So, even after changing it to unless-stopped is not booting up on restart? Or now is booting up but then you see the registration screen? It will be easier to debug if you can share screenshots of your configuration for firefly III on casaOS. Firefly being asking for registration on boot suggests something is not correctly configured on the data volume or location.
It does not start until I enter the settings and save. However, it always redirects to the registration window. If I click on sign in, the page returns to the registration window.
Here are my configuration. And thank you for you support!
I see what is the issue here. You setup your containers to run in the /tmp folder, which is purged (emptied) after a reboot by Linux OS.
So, by changing the configuration to save the data in other folder like /home/
containers
Extraordinary! It’s working now! Thank you very much, the issue was indeed with the temporary folder. I created new ones, pointed the containers to them, and restarted CasaOS without losing the Firefly data. Thank you very much!
@jkano Muchas gracias Jose!
App Information
Why do you want this app?
I don't think there is a more complete option than this application for managing personal finances. Another detail is that it is extremely difficult to install on CasaOS (I haven't managed it so far because I'm a newbie) and I can't find tutorials for either CasaOS or portainer, which help me when installing.
Additional information?
yml file: https://raw.githubusercontent.com/firefly-iii/docker/main/docker-compose.yml
.env: https://raw.githubusercontent.com/firefly-iii/firefly-iii/main/.env.example
.db.env: https://raw.githubusercontent.com/firefly-iii/docker/main/database.env