Deploying Actual on fly.io with a container image
Deploying
fly.io allows running the application directly and provides a free tier. You should be comfortable with using the command line to set it up though.
Install the
flyctl
utility.Create an account. You can also create your account by running
fly auth signup
Although you are required to enter payment details, the resources required to run Actual are within the free tier, and you shouldn't be charged.
Copy
fly.template.toml
to an empty local directory, and rename the filefly.toml
.- Optional: Open
fly.toml
and customize the app name on the first line of the file. e.g.:App names must be globally unique, so there is a meaningful probability that your chosen name is unavailable. Later steps allow the fly.io system to generate a unique name for you.app = "actual-budget"
- Optional: Open
- Persisting data means the server will retain your configuration and budget. Without this, each deployment or restart will wipe away all the data on the server. You would need to intialize (also known and listed as 'bootstrapping' in the user interface) the instance again and re-upload your files. We want our Actual server to persist data, so we need to mount a volume.
Open
fly.toml
in a text editor and add the following:[mounts]
source="actual_data"
destination="/data" cd
into the empty directory containing your newfly.toml
file from above, and create your app using the following command:fly launch --image actualbudget/actual-server:latest
- Select
Yes
when prompted to copy existing configuration.? Would you like to copy its configuration to the new app? (y/N) y
- Press
enter
to accept an auto-generated app name. You may enter a name if you wish, but it must be globally unique across all fly apps.? App Name (leave blank to use an auto-generated name):
- Select a deployment region. The closest region should be highlighted by default, so you may
simply hit
enter
if you do not have specific needs.? Select region: [Use arrows to move, type to filter]
ams (Amsterdam, Netherlands)
... - Select
No
when prompted to create a Postgres database.? Would you like to setup a Postgresql database now? (y/N) n
- Select
No
when prompted to create an Upsatsh Redis database.? Would you like to set up an Upstash Redis database now? (y/N) n
- Select
No
when prompted to deploy now.? Would you like to deploy now? (y/N) n
- Select
Continue to the Persisting server data section.
Persisting server data
If you choose not to set up a persistent volume, each deployment or restart will wipe away all the data on the server. You would need to intialize (also known and listed as 'bootstrapping' in the user interface) the the instance again and upload your files. To avoid that, let's move the data somewhere that persists. With fly.io we can create a volume.
In the directory containing your
fly.toml
configuration, run this command:fly volumes create actual_data
Select a deployment region. The closest region should be highlighted by default, so you may simply hit
enter
if you do not have specific needs.*Fly volumes are encrypted at rest by default. See the fly.io docs if you wish to disable this, though we do not recommend doing so.*
If you have not already added a mount to your fly config, follow the instructions above to do so.
Deploy your application:
fly deploy
You should have a running app now! Actual will check if the /data
¹ directory exists and use it
automatically. You can open the app using
fly apps open
Updating Actual
Whenever you want to update Actual, return to the directory containing your fly.toml
file and run
fly deploy
If you wish to change the image source (eg to run an unstable build, or a specific tag), run
fly deploy --image [desired image tag]
with [desired image tag]
replaced with your desired tag.
Frequent Issues
Q. I have deployed actual to Fly.io but I am being charged, why is this?
A. While we wouldn’t know for certain without seeing your configuration, it is likely that during deployment you created a Postgres database. Actual doesn’t need this so you can just delete it and charges should then stop. If you're unsure, please reach out to us.
Official Images
These images are published based on the master
branch of the [actual-server repo][upstream].
- Docker hub: actualbudget/actual-server
- Github Container Registry: ghcr.io/actualbudget/actual-server