sytone / obsidian-remote

Run Obsidian.md in a browser via a docker container.
MIT License
1.32k stars 126 forks source link

Support for Raspberry Pi 4 #92

Open dytech-coder opened 8 months ago

dytech-coder commented 8 months ago

Hi there,

I tried to run this container on an Raspberry Pi 4. There seems to be ARM support but not for the ARM architecture of Raspberry Pi. Is this even possible?

apricot13 commented 7 months ago

the arm64 version is on docker hub not github, https://hub.docker.com/r/sytone/obsidian-remote/tags sytone/obsidian-remote:arm64 though I ran into some other issues when I ran it, but I haven't had time to look into it debugging it yet.

obsidian-remote  | [20240206-13:45:42] [WARN ] libscp network error.
obsidian-remote  | [20240206-13:45:42] [DEBUG] Closed socket 7 (AF_INET6 ::ffff:127.0.0.1 port 3350)
obsidian-remote  | [20240206-13:45:42] [INFO ] A connection received from ::ffff:127.0.0.1 port 39454
obsidian-remote  | [20240206-13:45:42] [WARN ] lis6-svwait: fatal: unable to subscribe to events for /var/run/s6/services/xrdp-sesman/: No such file or directory
obsidian-remote  | guacd[269]: INFO:    Guacamole connection closed during handshake
version: "3.8"
services:
  obsidian:
    image: sytone/obsidian-remote:arm64
    #platform: linux/arm64
    container_name: obsidian-remote
    restart: unless-stopped
    ports:
      - 8080:8080
      - 8443:8443
    volumes:
      - ./data/vaults:/vaults
      - ./data/config:/config
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      - DOCKER_MODS=linuxserver/mods:universal-git
networks: {}
joshuaknipe commented 6 months ago

I get the same guacamole error on my raspberry pi 5. If anyone knows a fix please let us know! :)

adamzachyang commented 6 months ago

@joshknipe I've created a fork that works with my Raspberry Pi 4 https://github.com/adamzachyang/obsidian-remote-rpi?tab=readme-ov-file. You just need to build the image on your local machine, edit the docker compose file to your needs and then docker compose up!

joshuaknipe commented 6 months ago

Thanks @adamzachyang! I managed to build the image and edit the docker compose file but when navigating to http://localhost:8080/, I see the following:

Screenshot 2024-03-13 at 13 17 22

Any ideas where I'm going wrong? I have also attached the container logs if it perhaps highlights any mistakes I've made? _obsidian-remote_logs.txt

adamzachyang commented 6 months ago

@joshknipe Seems that the autostart isn't working, I'll rebuild the image when I can and see if I get the same results! Seems like the environment has started correctly though, are you able to right click within the VNC and open Obsidian that way?

joshuaknipe commented 6 months ago

Thanks for your help - really appreciate it :)

I get the following error when trying to launch obsidian via right click:

Screenshot 2024-03-13 at 13 46 08

My docker compose as well:

Screenshot 2024-03-13 at 13 49 06
adamzachyang commented 6 months ago

@joshknipe no worries! Can you open the XTerm and run sudo /squashfs-root/obsidian --no-sandbox --no-xshm --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer successfully?

joshuaknipe commented 6 months ago

That works perfectly! Must be something in the autostart that's not working on my side then

adamzachyang commented 6 months ago

@joshknipe I've rebuild the image and tested locally and I can't seem to reproduce the same error that you're having with the autostart and through the right click menu. It's a bit weird right clicking to open doesn't work either as it's the same command used in the terminal that does seem to work. If you find a fix please let me know I'm intrigued as to what could have caused that issue!

danigge commented 6 months ago

@adamzachyang First of all many thanks for your work. I've tried to follow your guide but I'm failing with building the image as I get a "COPY root / /" error. I have no idea what it's about and how to solve it as I don't know what files should be copied. I tried to create the Dockerfile as root as well as user pi. Any advices?

=> ERROR [5/5] COPY root/ / 0.0s

[5/5] COPY root/ /:

Dockerfile:39

37 | 38 | # Add local files 39 | >>> COPY root/ / 40 | 41 | # Expose ports and volumes

ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref ba583b21-d441-4bf5-94af-aeeb2f97af19::wc26osqpo3uw58e7pubx6izcg: "/root": not found

adamzachyang commented 6 months ago

@danigge no worries! Are you running the command docker build . -t obsidian-remote-rpi from within the same folder as obsidian-remote-rpi? That step copies in configuration in /obsdian-remote-rpi/root to / in the image it is building but it looks like docker can't find the root folder to copy in to the image.

danigge commented 6 months ago

@adamzachyang In the very beginning I created the "Dockerfile" as a copy of your github-file and I saved it in the "/home/pi" folder. Than I run the "docker build . -t obsidian-remote-rpi" command from the same folder. I'm used to initiate the docker containers from the SSH terminal with daemon (e.g. docker run -d ...) from there and I'm a noob to dockerfiles, yaml-files and the docker commands. I don't even understand your advice as I don't know how to get the obsidian-remote-rpi!

Sorry for taking my stupid questions, but may you help me with it?

adamzachyang commented 6 months ago

@danigge ah got it, you don't have the other files in the repo (the /root folder)! In /home/pi do a git clone https://github.com/adamzachyang/obsidian-remote-rpi.gitand then cd obsidian-remote-rpi into the folder and run the docker build . -t obsidian-remote-rpi. The docker build . means that docker uses the current working directory as context for looking for files and folders and when building the image can't find the folder/root in the directory.

danigge commented 6 months ago

@adamzachyang Once again, thank you! Now everything works fine for me. I'm looking forward to learn more about obsidian, but in a first view it looks like a strong tool.

adamzachyang commented 6 months ago

@danigge glad you got it working! Feel free to create any issues on the other repo if you run in to other issues :)