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.
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.