Install Docker
Update the repo to get latest versions
sudo apt update
Install the latest version
sudo apt install docker.io
Set Docker to start on startup
sudo systemctl enable --now docker
Give your user permissions to docker, replacing user
with your username
sudo usermod -aG docker user
Test it has installed correctly by getting the docker version
docker --version
Installing MariaDB
First, update the repo to get latest versions (you can ignore this step if you ran it above for the above installs)
sudo apt update
Install Maridadb-server
and mariadb-client
sudo apt install mariadb-server mariadb-client
Secure the installation
sudo mysql_secure_installation
First will prompt you for current password, this will be blank so just press enter
Enter current password for root (enter for none):
Next, it will ask you to set a root password. Press Y and enter a password, and then confirm.
Set root password? [Y/n] Y
The rest, accept the defaults, and complete the configuration.
Enable the service to start on boot.
sudo systemctl enable mariadb-server
Setting up database for Firefly
Login to mysql, this was prompt you for your password you set earlier.
sudo mysql -u root -p
Create database
CREATE DATABASE firefly;
Create a user (Please change the password at the end to a secure password)
create user 'fireflyuser'@'%' identified by 'your-password';
Grant privileges to the above account
grant all privileges ON firefly.* TO 'fireflyuser'@'%';
Flush privileges and exit
flush privileges;
exit;
As we need to connect from a docker instance, change the bind-address
to 0.0.0.0 to allow mysql to listen on all interfaces.
sudo nano /etc/mysql/my.cnf
Paste the below at the end
skip-networking
bind-address = 0.0.0.0
Restart mysql
sudo systemctl restart mysql.service
Create 32 app key for Firefly
Run the below command to output a 32 character random string
head /dev/urandom | LC_ALL=C tr -dc 'A-Za-z0-9' | head -c 32 && echo
Copy that code for later
Installing Firefly 3
Download the latest Firefly docker
docker pull fireflyiii/core:latest
Running Firefly 3
Default port for Firefly 3 is port 8080. I have something running on this so I want to map a different port to Firefly 3. I chose 8185
, so you can just change the below whatever port you need. Change the APP_KEY
to the random string you created earlier. Change the DB_HOST
to your server ip.
docker run -d -v firefly_iii_upload:/var/www/html/storage/upload -p 8085:8080 -e APP_KEY=CHANGEME_32_CHARS -e DB_HOST=CHANGEME -e DB_PORT=3306 -e DB_CONNECTION=mysql -e DB_DATABASE=firefly -e DB_USERNAME=fireflyuser -e DB_PASSWORD=CHANGEME fireflyiii/core:latest
First run
Open a brower and browse to http://serverip:8185. Change serverip for your ip, and the port you set in the above command. You should get the following screen.