This is the main project to run Actual, a local-first personal finance tool. It comes with the latest version of Actual, and a server to persist changes and make data available across all devices.
Join the discord!
We are looking into a feature for one-button click click deployment of Actual. This will reduce the friction for people not as comfortable with the command line.
It's very easy to get started. Clone this repo, install deps, and start it:
git clone https://github.com/actualbudget/actual-server.git
cd actual-server
yarn install
yarn start
Go to https://localhost:5006 in your browser and you'll see Actual.
You should deploy your server so it's always running. We recommend fly.io which makes it incredibly easy and provides a free plan.
Create an account. Although you are required to enter payment details, everything we do here will work on the free tier and you won't be charged.
I got Actual deployed to fly.io here are the instructions I used - understandably these are for Windows but should work with a few tweaks for MacOSX & Linux.
-
Press start, type cmd and run it as administrator
-
Navigate to the
C:\
cd C:\
- Create a folder called github.
mkdir github
- Open up a command prompt and run
iwr https://fly.io/install.ps1 -useb | iex
- Once that is complete run this command
flyctl auth login
This should open a web browser and ask you to login - you will need to provide credit card details to proceed but actual shouldn't cost much if anything at all.
- Now we need to move into the github directory we just created on the
C:\
drive, to do that we can use this command
CD C:\github
Note: CD means change directory
- Now run this command
git clone `https://github.com/actualbudget/actual-server.git`
This will pull down the latest files for actual-server
from the git hub repository to our local machine.
- Then we need to move into that folder, to do that use this command
cd actual-server
- Let's check to make sure we are in the correct place
dir
You should see a list of files in a list one of them being fly.template.toml
if you don't see them go back to step 6
- Copy
fly.template.toml
that is in the folder calledactual-server
withinC:\GitHub
and copy it back into the same directory with the namefly.toml
copy fly.template.toml fly.toml
- Open the fly.toml file in notepad or a code editor of your choice like Visual Studio Code
notepad fly.toml
-
On line 1 change
app = "%NAME%"
to something of your choosing likeapp = "Actual"
and save the file -
Still on the command prompt run
flyctl launch
You will see a message that says An existing fly.toml file was found for app Actual Budget ? Would you like to copy its configuration to the new app? (y/N)
- Type
Y
and hit enter
It asked me to give my application a name, I just left it blank and it picked one for me. I did this becuase no matter what I typed it errored.
-
Select your location using the up down arrow keys when prompted
-
Would you like to setup a Postgresql database now? (y/N)
Type N
and press enter
- The application should begin deploying.
Once complete you should now be able to navigate to actual using the URL provided. To find that open https://fly.io/dashboard in a browser and click the application, it might have a really random name
One you are in there, you should see hostname
section right at the tope and under that is a URL this is the URL to your deployment of actual..
Whenever you want to update Actual, update the versions of @actual-app/api
and @actual-app/web
in package.json
and run flyctl deploy
.
Note: if you don't want to use fly, we still provide a Dockerfile
to build the app so it should work anywhere that can compile a docker image.
One problem with the above setup is every time you deploy, it will wipe away all the data on the server. You'll need to bootstrap the instance again and upload your files.
Let's move the data somewhere that persists. With fly.io we can create a volume. Run this command:
flyctl volumes create actual_data
Now we need to tell Actual to use this volume. Add this in fly.toml
:
[mounts]
source="actual_data"
destination="/data"
That's it! Actual will automatically check if the /data
directory exists and use it automatically.
You can also configure the data dir with the ACTUAL_USER_FILES
environment variable.
The Actual app is totally separate from the server. In this project, they happen to both be served by the same server, but the app doesn't know where the server lives.
The server could live on a completely different domain. You might setup Actual so that the app and server are running in completely separate places.
Since Actual doesn't know what server to use, the first thing it does is asks you for the server URL. If you are running this project, simply click "Use this domain" and it will automatically fill it in with the current domain. This works because we are serving the app and server in the same place.