actual: [Bug]: Error while updating docker Image 2023.12.0

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

While updating docker image with latest tag 2023.12.0, the container is not able to start properly and crash.

What error did you receive?

Node.js v18.19.0
Checking if there are any migrations to run for direction "up"...
file:///app/src/migrations.js:21
            throw err;
            ^
[Error: EACCES: permission denied, open '.migrate'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'open',
  path: '.migrate'
}

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

No response

Operating System

Other

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Reactions: 2
  • Comments: 29 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Can confirm it’s working as expected.

I have no name!@actual-8f59f864f-n45l2:/data$ ls -al
total 36
drwxrwsr-x 5 root  568  4096 Dec  5 15:32 .
drwxr-xr-x 1 root root  4096 Dec  5 15:32 ..
-rw-r--r-- 1  568  568   373 Dec  5 15:32 .migrate
drwxrws--- 2 root  568 16384 Nov 23 23:28 lost+found
drwxrwsr-x 2  568  568  4096 May  5  2023 server-files
drwxrwsr-x 2  568  568  4096 Apr 11  2023 user-files

I have tested the container and it does indeed now go to the /data path, which is writable and works as one would expect it to.

actual-0:/data$ ls -al
total 8
drwxrwsr-x 4 root  568   60 Dec  5 10:02 .
drwxr-xr-x 1 root root 4096 Dec  5 10:02 ..
-rw-r--r-- 1  568  568  373 Dec  5 10:02 .migrate
drwxr-sr-x 2  568  568   28 Dec  5 10:02 server-files
drwxr-sr-x 2  568  568    6 Dec  5 10:02 user-files

Could someone please verify if the patch @bjw-s has graciously provided fixes the issue for you? actualbudget/actual-server#289 On my machine it works as expected (but TBH it worked fine before too).

Could you please push the container with it? It seems PR’s are built but not pushed.

https://github.com/users/bjw-s/packages/container/actual-server/154582722?tag=pr-289 (based on the edge-ubuntu Dockerfile)

I’ve created https://github.com/actualbudget/actual-server/pull/289 that will have the server store the migrations file in the dataDir instead of the application root

Hi everyone. That guide from Marius Hosting has been updated. My recommended process, if you are still having issues, would be to:

  1. Revert to 23.11.0 and export your data as a backup
  2. follow the new setup process in the guide
  3. pull the updated docker container
  4. if needed, import your exported budget.

That should get passed the issue of missing the .migration file and not having proper permissions.

ly going to sound like a noob and I have been searching online but how to I revert the container to 23.11.0. I’m trying to recreate it and point the image to actualbudget/actual-server:23.11.0 but each time I click create it just doesnt pull it down and loads the current one I have installed.

That would depend on the software you use to manage your Docker. Personally I’d recommend Dockge or Portainer. Then you need to create 2 containers 1. actualbudget-old and 2. actualbudget with the latest version.

Personally I prefer Dockge it’s got a very simple UI and you can also add convert “docker run”. It looked like this for me: 2023-12-05 15_59_23-Dockge - 192 168 147 3_8010 - Vivaldi

  1. actualbudget-old:
version: "3.9"
services:
  actualbudget-old:
    image: ghcr.io/actualbudget/actual-server:23.11.0-alpine
    container_name: actualbudget-old
    security_opt:
      - no-new-privileges:true
    ports:
      - #yourport#:5006
    volumes:
      - /volume2/docker/actual/server:/app/server-files
      - /volume2/docker/actual/user:/app/user-files
    restart: unless-stopped
networks: {}

  1. actualbudget:latest
version: "3.9"
services:
  actualbudget:
    image: ghcr.io/actualbudget/actual-server:latest-alpine
    container_name: actualbudget
    security_opt:
      - no-new-privileges:true
    ports:
      - #yourport#:5006
    volumes:
      - /volume1/docker/actualbudget:/data
    restart: unless-stopped
networks: {}

Then as mentioned by the guide before just export the data and import it to the latest version. After that you can delete the actualbudget-old container.