this post was submitted on 08 Apr 2024
26 points (88.2% liked)

Selfhosted

40183 readers
596 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Hi guys! I'm going at my first docker attempt...and I'm going in Proxmox. I created an LXC container, from which I installed docker, and portainer. Portainer seems happy to work, and shows its admin page on port 9443 correctly. I tried next running the image of immich, following the steps detailed in their own guide. This...doesn't seem to open the admin website on port 2283. But then again, it seems to run in its own docker internal network (172.16.0.x). How should I reach immich admin page from another computer in the same network? I'm new to Docker, so I'm not sure how are images supposed to communicate within the normal computer network...Thanks!

you are viewing a single comment's thread
view the rest of the comments
[–] iturnedintoanewt@lemm.ee 2 points 7 months ago* (last edited 7 months ago) (1 children)

Thanks...I did follow their guide, step by step. The only thing that I customized was the immich uploads folder, which I want it to go to my NAS. I have it set up on an NFS mount handled by proxmox, and then it's just a transparent bind mount in the LXC. The user in the lxc container has read/write access to this location, and docker runs on this same user. But I reckon I'm addressing this in docker in a horribly messed way, as I've never used it before. Checking the docker logs immich_server, I'm getting this:

[Nest] 7  - 04/08/2024, 9:53:08 AM     LOG [SystemConfigService] LogLevel=log (set via system config)
node:fs:1380
  const result = binding.mkdir(
                         ^

Error: EACCES: permission denied, mkdir 'upload/library'
    at mkdirSync (node:fs:1380:26)
    at StorageRepository.mkdirSync (/usr/src/app/dist/repositories/storage.repository.js:112:37)
    at StorageService.init (/usr/src/app/dist/services/storage.service.js:30:32)
    at ApiService.init (/usr/src/app/dist/services/api.service.js:72:29)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ApiModule.onModuleInit (/usr/src/app/dist/app.module.js:58:9)
    at async callModuleInitHook (/usr/src/app/node_modules/@nestjs/core/hooks/on-module-init.hook.js:51:9)
    at async NestApplication.callInitHook (/usr/src/app/node_modules/@nestjs/core/nest-application-context.js:223:13)
    at async NestApplication.init (/usr/src/app/node_modules/@nestjs/core/nest-application.js:100:9)
    at async NestApplication.listen (/usr/src/app/node_modules/@nestjs/core/nest-application.js:169:33) {
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: 'upload/library'


Let's see... So let's say my LXC container has a /mnt/NAS-immich-folder path, already mounted and with rw permissions. Then I edited my docker-compose.yml volumes line as follows:

    volumes:
      - /mnt/NAS-immich-folder:/mnt/immich
      - ${UPLOAD_LOCATION}:/mnt/immich
      - /etc/localtime:/etc/localtime:ro

And my .env path looks like:

# The location where your uploaded files are stored
UPLOAD_LOCATION=/media/immich

...I'm sure I'm doing something horribly wrong besides the no-no of docker over LXC...Is there anything messed in these paths? What am I doing wrong? Thanks so much!

[–] PunkiBas@lemmy.world 2 points 7 months ago (1 children)

Ah! now I see the problem

permission denied, mkdir 'upload/library'

It's clearly having permission problems with the image library directory.

Also:

volumes:
 - /mnt/NAS-immich-folder:/mnt/immich
 - ${UPLOAD_LOCATION}:/mnt/immich

with this command you are trying to mount this directory from your LXC machine:

/mnt/NAS-immich-folder

into this directory inside the immich container:

/mnt/immich

And then you also try to mount a second directory there in the next line. But immich doesn't use /mnt/immich for its library, it uses this:

/usr/src/app/upload

You should NOT edit the default docker-compose.yml file. Instead you should only edit the .env file like so:

UPLOAD_LOCATION=/mnt/NAS-immich-folder

I can also see that there's a specific tutorial on how to set it up with portainer. In that case you might have to edit the docker compose file to replace .env with stack.env and place the contents of the env file in the advanced-> environment variables of portainer.

Try these things and ask here again if you can't get it running.

[–] iturnedintoanewt@lemm.ee 2 points 7 months ago* (last edited 7 months ago) (1 children)

Wow thanks! Let me take a look, I missed the portainer part! Sigh...I followed through the instructions. I deleted the previous stack, and created a new one, this time all the way from portainer. This time I ONLY modified the .env file, well and according to the instructions the .yaml referring to the .env as stack.env now. Made it deploy...and nothing. Still getting the same mkdir error :(

[–] PunkiBas@lemmy.world 2 points 7 months ago (1 children)

Might be some NFS permissions problem, can you try some other temp directory with say 777 permissions to see if it's that?

[–] iturnedintoanewt@lemm.ee 1 points 7 months ago

Thanks! Seems more about how to properly map a local host path/mount on docker. For which I'm completely noob...I think this is where I'm failing right now.