Actual's server
Find a file
Kovah 3df101a91d Update build process with requested changes
- push to both Docker Hub and Github registry
- use git tags for versioning
- update Docker tags to reflect the git tags and commit SHA
2022-05-19 08:16:40 -04:00
.github/workflows Update build process with requested changes 2022-05-19 08:16:40 -04:00
migrations initial (open-source) 2022-03-31 13:19:08 -04:00
sql Improve bootstrap process 2022-04-29 10:48:58 -04:00
util Add actual deps, fly config, and more 2022-04-28 22:09:40 -04:00
.dockerignore Updates 2022-04-29 10:35:13 -04:00
.gitignore Updates 2022-04-29 10:35:13 -04:00
account-db.js Improve how data dirs are treated 2022-04-29 11:10:20 -04:00
app-account.js initial (open-source) 2022-03-31 13:19:08 -04:00
app-plaid.js cleanup 2022-04-28 22:21:18 -04:00
app-sync.js Improve how data dirs are treated 2022-04-29 11:10:20 -04:00
app.js Added health check endpoint. 2022-05-02 23:06:43 -04:00
db.js initial (open-source) 2022-03-31 13:19:08 -04:00
docker-compose.yml Update docker-compose.yml 2022-05-19 07:19:33 -04:00
Dockerfile Move alpine build to Dockerfile.alpine; add tini to debian Dockerfile 2022-05-03 08:38:27 -04:00
Dockerfile.alpine Move alpine build to Dockerfile.alpine; add tini to debian Dockerfile 2022-05-03 08:38:27 -04:00
fly.template.toml Correct fly template port 2022-05-19 07:25:50 -04:00
LICENSE.txt license 2022-04-29 10:39:57 -04:00
load-config.js modify: default hostname 2022-04-30 00:33:59 +03:00
package.json Added health check endpoint. 2022-05-02 23:06:43 -04:00
README.md Update README.md 2022-05-05 14:25:03 -04:00
sync-full.js initial (open-source) 2022-03-31 13:19:08 -04:00
sync-simple.js initial (open-source) 2022-03-31 13:19:08 -04:00
tsconfig.json add: tsconfig.json 2022-04-30 12:11:17 -04:00
yarn.lock Added health check endpoint. 2022-05-02 23:06:43 -04:00

Note from maintainer: don't expect responses or PR merges until May 16th. 🏖️

I (@jlongster) am currently away on vacation and not checking this. I am currently the only maintainer of Actual (person able to merge PRs, etc). I'd like to fix this soon and if you are interested in helping, please help manage issues & PRs and I will bring on consistent contributors as maintainers.

Please help by making it as clear as possible what changes are being made. When I get back this will greatly help triage the work.

When I get back, I will work on guides and structure to help anyone get involved, particularly explaining how the code works.


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!

Non-technical users

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.

Running

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.

Running via Docker

To run using a Docker container you can use following commands;

git clone https://github.com/actualbudget/actual-server.git
cd actual-server
docker build -t actual-server .
docker run -p 5006:5006 actual-server

Deploying

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.

Next, install the flyctl utility. Run flyctl auth login to sign into your account.

Copy fly.template.toml to fly.toml. Open fly.toml and customize the app name on the first line of the file.

Now, run flyctl launch from actual-server. You should have a running app now!

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.

Persisting server data

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.

Configuring the server URL

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.