• 0 Posts
  • 4 Comments
Joined 2 years ago
cake
Cake day: June 10th, 2023

help-circle

  • Wow, that’s very unfortunate. If you installed docker through package manager and have added yourself to the group I believe this to be self-imposed, I don’t know which mechanism Docker uses to give access to users in the group to its service, but seems related to that since it looks like the service is running but just your user can’t access it. To confirm it’s just that run the compose command as root, i.e. sudo docker compose up, this is not ideal but if that works you know it’s a permission problem with your user.

    You seem to know your way around Linux, so it’s probably not something obvious. I’m almost sure it’s something stupid and self imposed, I’ve done my fair share of stupid shit like leaving a config file malformatted or deleting a library or installing something through manually copying files only for something else to break because I overwrote something important.


  • I know you probably heard this thousands of times, but really, if you’re into self-hosting docker is a blessing. People make it harder than it needs to be when explaining all of the ins and outs. I assume you have a Linux box where you run your stuff, just install docker and docker compose there (you might need to enable the docker service, add your user to the docker group and reboot, unless you’re using a user friendly distro like Ubuntu). Then just make a folder anywhere for Silverbullet, create a file named compose.yaml and put the following text there:

    # services means that everything inside is a service to be deployed 
    services:
      # this is the name of the service, you can put whatever you want
      silverbullet:
        # this is the docker image to use
        image: zefhemel/silverbullet
        # this is the rule to restart in case of crashes
        restart: unless-stopped
        # these are environment variables you want defined
        environment:
        # this is a specific variable for Silverbullet, it's essentially username:password change this accordingly 
        - SB_USER=admin:admin
        # volumes are local folders you want to be available
        volumes:
          # in this case we want that the folder ./space be mounted as /space inside the container
          - ./space:/space
        # these are the ports we want to expose
        ports:
          # This means expose port 3000 on port 3000, if you want to access Silverbullet on port 8080 this would be 8080:3000 (because internally the service is still listening to 3000)
          - 3000:3000
    

    Then run docker compose up and you should be able to access it on the port 3000.

    Ling story short docker compose looks for a file named compose.yaml in the local directory, and that file above has all of the information it needs to run the server. I’ve annotated each line there, feel free to remove the comments.


  • Not what you’re asking, but in case it helps. I don’t use Obsidian, I use https://silverbullet.md/ it’s very similar, markdown files with the ``[[other note]]` syntax (as well as some querying mechanism that I believe Obsidian also has), in short it’s almost an open source version of obsidian but it has some advantages IMO:

    • It is open source
    • It provides a sync mode, where you download the text to your device and it’s accessible offline to get sync afterwards.
    • It’s hackable so you can write your own functions and styles

    I’m surprised almost no one has heard of it, the main developer is here on Lemmy, that’s how I found out about it. BTW I also use syncthing to keep backups of my data, and even specifically to not sync a work folder outside of the work computer even though the rest is synced, so I can access Silverbullet from localhost on the work computer and get everything there and any changes to non-work stuff get synced to my home server, and from my personal server get everything except work stuff.