Actual Budgeting has recently gone open source. It’s exactly the kind of app and data I want to be self hosted on my home server. So let’s try to get it running on OmniOS.

Actual server is a nodejs app, so lucky for us node-16 is already in OmniOS’s repos

# pkg install node-16

Now the install instructions are reasonable enough:

git clone https://github.com/actualbudget/actual-server.git
cd actual-server
yarn install
yarn start

First off we’re gonna need git

# pkg install git
# git clone https://github.com/actualbudget/actual-server.git
# cd actual-server
# yarn install
-bash: yarn: command not found

Then you’ll notice we don’t have yarn. Ironically we install yarn with npm.

# npm -g install yarn

Then you still can’t run yarn since it’s not in PATH, it’s been installed to /opt/ooce/node-16/lib/node_modules/yarn/bin/yarn. We can just run it from there to install the dependencies.

# /opt/ooce/node-16/lib/node_modules/yarn/bin/yarn install

However you’ll notice that it can’t find precompiled binaries to suit our sunOS environment. We’re gonna have to compile bcrypt and better-sqlite ourselves. So let’s also install some build tools.

# pkg install build-essential
# /opt/ooce/node-16/lib/node_modules/yarn/bin/yarn install

But no that still doesn’t work.

Complete error output of yarn install command
C'mon isn't the problem so clear at a glance /s

After much close study of this error output, I worked out the one line actually specifying the problem to be

make: Fatal error in reader: Makefile, line 11: Unexpected end of line seen

Google this error and node-gyp, you won’t get any answers. I even spent a while trying to work out which makefile was causing issues, but it’s generated dynamically so can’t be easily read to determine the issue.

This is where years of painful experience comes in: the Makefile probably can’t be read because it uses fancy GNU make features. Lucky for us we can get the GNU version of make gmake.

# pkg install gmake

To use it for this build, I’m gonna create a environment variable just for this session.

# export MAKE=gmake

And now finally it can compile and install.

# /opt/ooce/node-16/lib/node_modules/yarn/bin/yarn install
# /opt/ooce/node-16/lib/node_modules/yarn/bin/yarn start
yarn run v1.22.19
$ node app
Initializing Actual with user file dir: /root/actual-server/actual-server/user-files
Listening on 0.0.0.0:5006...

Now believe it or not this was a relatively easy install. In theory you should be able to compile and install any open source software on OmniOS/Illumos, but let’s be honest, the world assumes you’re running linux. Devs already have enough issues supporting different linux distros, sometimes you’ll see specific BSD support which can help but good luck if your issue is Illumos specific. Sometimes fixing these compile errors can be interesting and offer teaching in fundamental differences in unix. All to often it’s simply frustrating.

Back when I first set up my home server / NAS, OmniOS was way ahead in the things I cared about; built-in ZFS, in-kernel SMB sharing enabled via a simple ZFS flag, zones and vnics to separate apps. It’s still a fantastic mix of technologies but the linux world have been slowly catching up.