{"id":543,"date":"2025-04-14T20:56:31","date_gmt":"2025-04-15T01:56:31","guid":{"rendered":"https:\/\/bblaze.xyz\/?p=543"},"modified":"2025-12-08T16:06:46","modified_gmt":"2025-12-08T22:06:46","slug":"firefly-iii-virtualmin-mariadb","status":"publish","type":"post","link":"https:\/\/jb03.com\/index.php\/2025\/04\/14\/firefly-iii-virtualmin-mariadb\/","title":{"rendered":"Firefly III | Virtualmin | MariaDB"},"content":{"rendered":"[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text admin_label=&#8221;Text&#8221; _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]\n<p><a href=\"https:\/\/firefly-iii.org\/\">Firefly III<\/a> is a very cool personal finance manager application. What really makes the application exceptional is its ability to be multi-user (where multiple users access the same set of bank accounts) and also multi-accounts (whereas you can run several different personal finances\/businesses on the same installation.)<\/p>\n\n\n\n<p>These instructions are based on the <a href=\"https:\/\/docs.firefly-iii.org\/how-to\/firefly-iii\/installation\/docker\/\">official documentation<\/a> with edits so everything works with Virtualmin.<\/p>\n\n\n\n<p>Let&#8217;s get started.<\/p>\n\n\n\n<p>Preinstallation checklist:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>I&#8217;m using Debian 12, but you&#8217;re free to use a different flavor.<\/li>\n\n\n\n<li>Virtualmin should be installed as per the previous posts (going to assume you have installed the LAMP stack.)<\/li>\n\n\n\n<li>Docker &amp; Portainer should also be installed.<\/li>\n<\/ul>\n\n\n\n<p>If you don&#8217;t have all of these items completed go look at my previous posts.<\/p>\n\n\n\n<p>First things first. Firefly is going to need 2 sub-domain names. The first is for the application itself. The second will be for the file\/transaction importer.<\/p>\n\n\n\n<p>I&#8217;m going to continue to use the server from previous posts hosted by Server Cheap. This time we are going to create 2 sub-servers of an existing virtual server. Here&#8217;s the list of servers I currently have on this installation:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"354\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_01-1024x354.png\" alt=\"\" class=\"wp-image-544\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_01-1024x354.png 1024w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_01-300x104.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_01-768x266.png 768w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_01.png 1176w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>In order to create a sub-server we need to first select the server we want as the primary.<\/p>\n\n\n\n<p>In this case I&#8217;m choosing the imfbsbn.xyz domain name. So I&#8217;m going to click on that.<\/p>\n\n\n\n<p>From there were going to click on the Create Virtual Server link in the menu.<\/p>\n\n\n\n<p>Then in the main window click on Sub-server as the new virtual server type.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"481\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_02-1024x481.png\" alt=\"\" class=\"wp-image-545\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_02-1024x481.png 1024w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_02-300x141.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_02-768x361.png 768w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_02.png 1482w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Enter the sub-domain name. And we won&#8217;t need all the features available. So uncheck the boxes for Postgres, mail, spam, &amp; AWS.<\/p>\n\n\n\n<p>Then go ahead and click the Create Server button.<\/p>\n\n\n\n<p>While we are here \u2013 dealing with this domain \u2013 let&#8217;s go ahead and add the proxy.<\/p>\n\n\n\n<p>In the left-hand menu click on &#8220;Web Configuration&#8221; then click on &#8220;Edit Proxy Website&#8221;.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"324\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_08-1024x324.png\" alt=\"\" class=\"wp-image-553\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_08-1024x324.png 1024w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_08-300x95.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_08-768x243.png 768w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_08.png 1402w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Enable proxying by clicking the appropriate radio button. Enter the proxy to URL as shown above. Then click on save and apply.<\/p>\n\n\n\n<p>Next are going to create virtual server for the file importer.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"610\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_03-1024x610.png\" alt=\"\" class=\"wp-image-546\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_03-1024x610.png 1024w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_03-300x179.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_03-768x458.png 768w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_03.png 1067w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>For this domain we will not be needing a MariaDB. So we can uncheck that box as well. Then create the server.<\/p>\n\n\n\n<p>Again, we need to set up the reverse proxy for this domain.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"322\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_09-1024x322.png\" alt=\"\" class=\"wp-image-554\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_09-1024x322.png 1024w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_09-300x94.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_09-768x242.png 768w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_09.png 1026w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Note that the port number is different for this domain.<\/p>\n\n\n\n<p>Now when we look at our domain list, we will see the two domains we added as sub-domains.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"953\" height=\"222\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_04.png\" alt=\"\" class=\"wp-image-547\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_04.png 953w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_04-300x70.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_04-768x179.png 768w\" sizes=\"auto, (max-width: 953px) 100vw, 953px\" \/><\/figure>\n<\/div>\n\n\n<p>A few more things to do within Virtualmin before moving on.<\/p>\n\n\n\n<p>When we created the firefly.imfbsbn.xyz domain, Virtualmin automatically created a new Maria database called firefly.<\/p>\n\n\n\n<p>Now we need to create a new MariaDB user and give that user permissions on the firefly database.<\/p>\n\n\n\n<p>First click on the &#8220;Webmin&#8221; tab of the left side menu.<\/p>\n\n\n\n<p>Then click to expand &#8220;Servers&#8221; &amp; then MariaDB Database Server.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"432\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_05-1024x432.png\" alt=\"\" class=\"wp-image-549\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_05-1024x432.png 1024w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_05-300x126.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_05-768x324.png 768w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_05.png 1103w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Here we can see the firefly database already exists.<\/p>\n\n\n\n<p>On that page click the button labeled &#8220;User Permissions&#8221;.<\/p>\n\n\n\n<p>Then click one of the &#8220;Create New User&#8221; buttons.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"683\" height=\"330\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_06.png\" alt=\"\" class=\"wp-image-550\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_06.png 683w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_06-300x145.png 300w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/figure>\n<\/div>\n\n\n<p>Create your own username. Be sure to set a robust password. And make sure that Hosts is set to &#8220;Any&#8221;.<\/p>\n\n\n\n<p>Go-ahead and create the user.<\/p>\n\n\n\n<p>Now we have to give that user permissions on the firefly database.<\/p>\n\n\n\n<p>Within the MariaDB Database module, navigate to &#8220;Database Permissions&#8221;.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"461\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_07-1024x461.png\" alt=\"\" class=\"wp-image-552\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_07-1024x461.png 1024w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_07-300x135.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_07-768x345.png 768w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_07.png 1067w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Choose the correct database. Enter the correct username. Make sure Hosts are Any. And go ahead and select everything in the permissions table.<\/p>\n\n\n\n<p>Just one more thing to do within the MariaDB Virtualmin module. Click on the button labeled &#8220;MariaDB Server Configuration&#8221;.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"456\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_11.png\" alt=\"\" class=\"wp-image-565\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_11.png 737w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_11-300x186.png 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/figure>\n<\/div>\n\n\n<p>Make sure the MariaDB server listening address is sent to Any.<\/p>\n\n\n\n<p>That&#8217;s enough within Virtualmin for right now. We will have to come back later and make a few more adjustments, but for now were going to move on.<\/p>\n\n\n\n<p>Next we&#8217;re going to login to our Portainer installation and we are going to create a new stack.<\/p>\n\n\n\n<p>I started with the docker compose and stack.env files provided in the <a href=\"https:\/\/docs.firefly-iii.org\/how-to\/firefly-iii\/installation\/docker\/\">official documentation<\/a>. But I did have to make several changes.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The official docker compose file calls for running the MariaDB inside the container. This is not an ideal situation while running Virtualmin. Virtualmin is already running MariaDB and will automatically backup the databases tied to virtual servers.<\/li>\n\n\n\n<li>The official docker compose file calls for running cron jobs from inside the container. We are going to set up cron jobs from within Virtualmin.<\/li>\n\n\n\n<li>As a result of connecting to the native OS database, we have to make some other changes as well.<\/li>\n<\/ul>\n\n\n\n<p>Within Portainer click on your installation, then stacks, then the button to create new stack. Give your stack a name.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_12.png\" alt=\"\" class=\"wp-image-566\"\/><\/figure>\n<\/div>\n\n\n<p>Here is the modified docker compose file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#\n# The Firefly III Data Importer will ask you for the Firefly III URL and a \"Client ID\".\n# You can generate the Client ID at http:\/\/localhost\/profile (after registering)\n# The Firefly III URL is: http:\/\/app:8080\n#\n# Other URL's will give 500 | Server Error\n#\nservices:\n  app:\n    image: fireflyiii\/core:latest\n    hostname: app\n    container_name: firefly_iii_core\n    networks:\n      - firefly_iii\n    restart: unless-stopped\n    volumes:\n      - \/home\/imfbsbn.xyz\/domains\/firefly.imfbsbn.xyz\/upload:\/var\/www\/html\/storage\/upload\n###   you will want to modify the line above to match your domain's file location\n###   the reason to do this is to make sure the firefly uploads get backed up by Virtualmin\n    env_file: stack.env\n    ports:\n      - 8088:8080\n  importer:\n    image: fireflyiii\/data-importer:latest\n    hostname: importer\n    restart: unless-stopped\n    container_name: firefly_iii_importer\n    networks:\n      - firefly_iii\n    ports:\n      - 8090:8080\n    depends_on:\n      - app\n    env_file: stack.env\nnetworks:\n  firefly_iii:\n    driver: bridge<\/code><\/pre>\n\n\n\n<p>Don&#8217;t worry about environmental variables yet. Just go-ahead and deploy the container.<\/p>\n\n\n\n<p>I don&#8217;t know why, but I was unable to get Firefly working using any environmental variables without first deploying the container with none.<\/p>\n\n\n\n<p>Portainer will download the images, create the containers, and start the applications. You should get something like this:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_10-1024x216.png\" alt=\"\" class=\"wp-image-556\"\/><\/figure>\n<\/div>\n\n\n<p><strong>Take note of the IP address!<\/strong> Within docker the gateways for IP addresses (unless you have made some changes) will always be 0.1. So the gateway for our Firefly stack\/containers is going to be 172.20.0.1. You are going to need to know that in just a minute.<\/p>\n\n\n\n<p>At this point we should be able to check if the domains are correctly forwarding to the right containers.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"910\" height=\"597\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_13.png\" alt=\"\" class=\"wp-image-568\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_13.png 910w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_13-300x197.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_13-768x504.png 768w\" sizes=\"auto, (max-width: 910px) 100vw, 910px\" \/><\/figure>\n<\/div>\n\n\n<p>And\u2026<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"792\" height=\"587\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_14.png\" alt=\"\" class=\"wp-image-569\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_14.png 792w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_14-300x222.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_14-768x569.png 768w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n<\/div>\n\n\n<p>Now, that&#8217;s not what these pages are actually supposed to look like. We will have to make some changes later to the Apache directives. But for right now if you get pages like this everything is working so far.<\/p>\n\n\n\n<p>Now go back to Portainer, and into the Firefly stack. Click on editor and scroll down to &#8220;Environmental Variables.&#8221;<\/p>\n\n\n\n<p>This here is your stack.env file (if you switch the environmental variables into &#8220;advanced mode&#8221; you can cut-and-paste all of these at once.)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>APP_ENV=production\nAPP_DEBUG=false\nSITE_OWNER=mail@example.com\nAPP_KEY=sUHKRxr3g8BpTW2hkP6X4bMFDGeVZcav  ##you should change this to your own unique 32 character key\nDEFAULT_LANGUAGE=en_US\nDEFAULT_LOCALE=equal\nTZ=America\/Chicago  ## modify this as necessary\nTRUSTED_PROXIES=**  ## this does not appear in the official documentation file but it is necessary\nLOG_CHANNEL=stack\nAPP_LOG_LEVEL=notice\nAUDIT_LOG_LEVEL=emergency\nDB_CONNECTION=mysql\nDB_HOST=172.23.0.1  ##make sure you enter the GATEWAY IP address of the containers\/stack\nDB_PORT=3306\nDB_DATABASE=firefly  ## make sure this line, and the next two lines, match what you did in Virtualmin\nDB_USERNAME=fly_db_user\nDB_PASSWORD=E7GoZqPU40LKXDh\nMYSQL_USE_SSL=false\nMYSQL_SSL_VERIFY_SERVER_CERT=true\nMYSQL_SSL_CAPATH=\/etc\/ssl\/certs\/\nCACHE_DRIVER=file\nSESSION_DRIVER=file\nCOOKIE_PATH=\"\/\"\nCOOKIE_DOMAIN=\nCOOKIE_SECURE=false\nCOOKIE_SAMESITE=lax\nMAIL_MAILER=log\nMAIL_HOST=null\nMAIL_PORT=2525\nMAIL_FROM=changeme@example.com\nMAIL_USERNAME=null\nMAIL_PASSWORD=null\nMAIL_ENCRYPTION=null\nMAIL_SENDMAIL_COMMAND=\nSEND_ERROR_MESSAGE=true\nSEND_REPORT_JOURNALS=true\nENABLE_EXTERNAL_MAP=false\nENABLE_EXCHANGE_RATES=false\nENABLE_EXTERNAL_RATES=false\nMAP_DEFAULT_LAT=51.983333\nMAP_DEFAULT_LONG=5.916667\nMAP_DEFAULT_ZOOM=6\nAUTHENTICATION_GUARD=web\nAUTHENTICATION_GUARD_HEADER=REMOTE_USER\nAUTHENTICATION_GUARD_EMAIL=\nCUSTOM_LOGOUT_URL=\nDISABLE_FRAME_HEADER=false\nDISABLE_CSP_HEADER=false\nALLOW_WEBHOOKS=false\nSTATIC_CRON_TOKEN=\nDKR_BUILD_LOCALE=false\nDKR_CHECK_SQLITE=true\nAPP_NAME=FireflyIII\nBROADCAST_DRIVER=log\nQUEUE_DRIVER=sync\nCACHE_PREFIX=firefly\nUSE_RUNNING_BALANCE=false\nFIREFLY_III_LAYOUT=v1\nQUERY_PARSER_IMPLEMENTATION=legacy\nAPP_URL=https:\/\/firefly.imfbsbn.xyz  ## change this to reflect your domain, note the https protocol\nFIREFLY_III_URL=http:\/\/app:8080\nVANITY_URL=https:\/\/firefly.imfbsbn.xyz  ## again\nFIREFLY_III_ACCESS_TOKEN=\nFIREFLY_III_CLIENT_ID=\nUSE_CACHE=true\nIGNORE_DUPLICATE_ERRORS=false\nIGNORE_NOT_FOUND_TRANSACTIONS=false\nCAN_POST_AUTOIMPORT=false\nCAN_POST_FILES=false\nIMPORT_DIR_ALLOWLIST=\nFALLBACK_IN_DIR=false\nVERIFY_TLS_SECURITY=true\nJSON_CONFIGURATION_DIR=\nCONNECTION_TIMEOUT=31.41\nLOG_RETURN_JSON=false\nLOG_LEVEL=debug\nENABLE_MAIL_REPORT=false\nEXPECT_SECURE_URL=false\nMAIL_DESTINATION=noreply@example.com\nMAIL_FROM_ADDRESS=noreply@example.com\nPOSTMARK_TOKEN=\nQUEUE_CONNECTION=sync\nSESSION_LIFETIME=120\nIS_EXTERNAL=false\nASSET_URL=\nMYSQL_RANDOM_ROOT_PASSWORD=yes\nMYSQL_USER=fly_db_user  ## again \u2013 make sure these lines match what you have in Virtualmin\nMYSQL_PASSWORD=E7GoZqPU40LKXDh\nMYSQL_DATABASE=firefly\nUSE_PROXIES=127.0.0.1  ## this too is not included in the official documentation but needs to be added<\/code><\/pre>\n\n\n\n<p>Notice that the database credentials appear twice.<\/p>\n\n\n\n<p>In order for our Firefly container to connect to our MariaDB running natively on the server, we need to point the application to the network gateway for these containers. In case you missed it above, within Portainer you can click on Networks and it will show you the IPv4 Gateway. In this case it is 172.20.0.1.<\/p>\n\n\n\n<p>Delete everything after the ##&#8217;s and re-deploy the stack.<\/p>\n\n\n\n<p>This would be a good time to check the container logs and look for errors. If everything went well we&#8217;re almost done.<\/p>\n\n\n\n<p>Head back over into Virtualmin.<\/p>\n\n\n\n<p>We need to edit the Apache directives for the sub-domains we created. There are (at least) two different ways to do this within Virtualmin.<\/p>\n\n\n\n<p>The first is to select the appropriate domain within Virtualmin, then go to &#8220;Web Configuration&#8221;, and click on &#8220;Configure SSL Website&#8221;.<\/p>\n\n\n\n<p>The other way is to start with Webmin, then click to expand &#8220;Servers&#8221;, click on &#8220;Apache Webserver&#8221;, and click on the appropriate virtual server.<\/p>\n\n\n\n<p>However you get there, click on the &#8220;Edit Directives&#8221; block.<\/p>\n\n\n\n<p>Change whatever you have within that window so that it looks more like below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SuexecUserGroup #1007 #1007\nServerName firefly.imfbsbn.xyz\nDocumentRoot \/home\/imfbsbn.xyz\/domains\/firefly.imfbsbn.xyz\/public_html\nErrorLog \/var\/log\/virtualmin\/firefly.imfbsbn.xyz_error_log\nCustomLog \/var\/log\/virtualmin\/firefly.imfbsbn.xyz_access_log combined\nSSLEngine on\nSSLCertificateFile \/etc\/ssl\/virtualmin\/17444589333674742\/ssl.cert\nSSLCertificateKeyFile \/etc\/ssl\/virtualmin\/17444589333674742\/ssl.key\nSSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1\nSSLCACertificateFile \/etc\/ssl\/virtualmin\/17444589333674742\/ssl.ca\n### the lines above should all be in there already \u2013 KEEP THEM!\n### Actually proxy the traffic and really the only important part ###\nAllowEncodedSlashes On\nRewriteEngine On\nSetEnvIf Cookie \"(^|;\\ *)csrftoken=(&#91;^;\\ ]+)\" csrftoken=$2\nRequestHeader set  X-CSRFToken \"%{csrftoken}e\"\n### Proxy Websockets Section 1 (works for me) ###\nRewriteCond %{HTTP:UPGRADE} ^WebSocket$ &#91;NC]\nRewriteCond %{HTTP:CONNECTION} Upgrade$ &#91;NC]\nRewriteRule ^\/?(.*) \"ws:\/\/127.0.0.1:8088\/$1\" &#91;P,L]\n### Proxy everything else ###\nProxyPass \/ http:\/\/127.0.0.1:8088\/ connectiontimeout=6 timeout=60\nProxyPassReverse \/ http:\/\/127.0.0.1:8088\/\nProxyPreserveHost On\nProxyRequests Off\nRequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}\nRequestHeader set X-Forwarded-SSL expr=%{HTTPS}<\/code><\/pre>\n\n\n\n<p>After you&#8217;ve made your changes, click on Save and Close.<\/p>\n\n\n\n<p>When Virtualmin tries to apply the changes you may get an error like this.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"827\" height=\"347\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_15.png\" alt=\"\" class=\"wp-image-575\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_15.png 827w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_15-300x126.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_15-768x322.png 768w\" sizes=\"auto, (max-width: 827px) 100vw, 827px\" \/><\/figure>\n<\/div>\n\n\n<p>To correct this, from the Webmin menu select Servers then Apache Webserver.<\/p>\n\n\n\n<p>Click on Global Configuration tab. Then click the button marked &#8220;Configure Apache Modules&#8221;.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"887\" height=\"623\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_16.png\" alt=\"\" class=\"wp-image-577\" srcset=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_16.png 887w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_16-300x211.png 300w, https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_16-768x539.png 768w\" sizes=\"auto, (max-width: 887px) 100vw, 887px\" \/><\/figure>\n<\/div>\n\n\n<p>Select the headers checkbox and click the Enable Selected Modules button.<\/p>\n\n\n\n<p>*** <strong>On the next page that loads, you have to click on Apply Changes.<\/strong> ***<\/p>\n\n\n\n<p>Now you have to make the same changes to the Apache directives for the &#8220;import&#8221; domain name. You will do that exactly the same way as you did above. Just pay special attention to the fact that the domain name is a little different and that the port number is now 8090.<\/p>\n\n\n\n<p>Once you have made those changes, visit the URLs, and the pages should load correctly (they will look different than they did before, more professional.)<\/p>\n\n\n\n<p>That&#8217;s it! You have successfully installed Firefly III. And if you have Virtualmin backing up your system on a schedule, Firefly will get back-up automatically.<\/p>\n\n\n\n<p>\u2013 \u2013 \u2013 \u2013 \u2013<\/p>\n\n\n\n<p>Last thing to do is to set up the cron job.<\/p>\n\n\n\n<p>Head into Portainer, Stacks, Firefly stack, &amp; editor. Pop open Environmental Variables and enter a 32 (exactly 32) character key in the STATIC_CRON_TOKEN field.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_19-1024x97.png\" alt=\"\" class=\"wp-image-591\"\/><\/figure>\n<\/div>\n\n\n<p>Now you have to add that token to the end of this URL like so:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;firefly.imfbsbn.xyz\/api\/v1\/cron\/z7xGE4y5SsM8jPWkYgZFQ62vBRnCUTtr<\/code><\/pre>\n\n\n\n<p>Within Virtualmin, switch over to Webmin. Then click on Servers and then Scheduled Cron Jobs.<\/p>\n\n\n\n<p>Now you want to click on Manually Edit Cron Jobs.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_20-1024x472.png\" alt=\"\" class=\"wp-image-596\"\/><\/figure>\n<\/div>\n\n\n<p>Add the line below so that the URL will be loaded every day at 3:11.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>11 3    * * *   root curl -s https:\/\/firefly.imfbsbn.xyz\/api\/v1\/cron\/z7xGE4y5SsM8jPWkYgZFQ62vBRnCUTtr<\/code><\/pre>\n\n\n\n<p>Save and close. And you&#8217;re done.<\/p>\n\n\n\n<p>\u2013 \u2013 \u2013 \u2013 \u2013<\/p>\n\n\n\n<p>One more thing before you go. Connecting the import module to the core is not well described in the official documentation. So let&#8217;s walk through that really quick.<\/p>\n\n\n\n<p>Visit the main page and go through the registration process. Go ahead and create an account, and go through the tips.<\/p>\n\n\n\n<p>When that&#8217;s all done go to the address bar and visit the \/profile page.<\/p>\n\n\n\n<p>On that page click on the OAuth tab, and then create a new OAuth client.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_17.png\" alt=\"\" class=\"wp-image-580\"\/><\/figure>\n<\/div>\n\n\n<p>Go-ahead and click on the create button.<\/p>\n\n\n\n<p>The system will then give you a page where there is a list of clients. You need the number under Client ID.<\/p>\n\n\n\n<p>Now go to the URL for the file importer. Enter the number for the Client ID you just located.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/jb03.com\/wp-content\/uploads\/2025\/04\/firefly_18-e1744735206558-1024x299.png\" alt=\"\" class=\"wp-image-583\"\/><\/figure>\n\n\n\n<p>First are going to click the submit button.<\/p>\n\n\n\n<p>And on the next page you want to click on the authorize button.<\/p>\n\n\n\n<p>Congratulations! Now you can upload files into your Firefly III installation.<\/p>\n[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]","protected":false},"excerpt":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; &hellip; <a title=\"Firefly III | Virtualmin | MariaDB\" class=\"hm-read-more\" href=\"https:\/\/jb03.com\/index.php\/2025\/04\/14\/firefly-iii-virtualmin-mariadb\/\"><span class=\"screen-reader-text\">Firefly III | Virtualmin | MariaDB<\/span>Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,34,35,39,41],"tags":[],"class_list":["post-543","post","type-post","status-publish","format-standard","hentry","category-advanced","category-docker","category-firefly","category-portainer","category-virtualmin"],"_links":{"self":[{"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/posts\/543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/comments?post=543"}],"version-history":[{"count":1,"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/posts\/543\/revisions"}],"predecessor-version":[{"id":627,"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/posts\/543\/revisions\/627"}],"wp:attachment":[{"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/media?parent=543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/categories?post=543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jb03.com\/index.php\/wp-json\/wp\/v2\/tags?post=543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}