Skip to main content

Commands for Installing/ Implementing Siyuan - Ubuntu 24

For Ubuntu 24.04, the clean way is to install Docker Engine + Docker Compose plugin from Docker’s official repository. On Ubuntu, Compose v2 is installed as the package docker-compose-plugin, and you run it as docker compose with a space, not docker-compose


Use these steps:


1) Remove old/conflicting packages if they exist


for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do

  sudo apt-get remove -y $pkg

done


2) Update apt and install prerequisites


sudo apt-get update

sudo apt-get install -y ca-certificates curl gnupg


3) Add Docker’s official GPG key


sudo install -m 0755 -d /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \

  sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

sudo chmod a+r /etc/apt/keyrings/docker.gpg


4) Add Docker repository


echo \

  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \

  https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo $VERSION_CODENAME) stable" | \

  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null


5) Install Docker Engine + Compose plugin


sudo apt-get update

sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin


6) Verify


docker --version

docker compose version


If you want to use Docker without typing sudo every time:


sudo usermod -aG docker $USER

newgrp docker


create a docker-compose.yml file


services:

  siyuan:

    image: b3log/siyuan

    container_name: siyuan

    command: ["--workspace=/siyuan/workspace/", "--accessAuthCode=ChangeThis123"]

    ports:

      - "6806:6806"

    volumes:

      - /opt/siyuan/workspace:/siyuan/workspace

    restart: unless-stopped

    environment:

      - TZ=Asia/Colombo

      - PUID=1000

      - PGID=1000


Change the --accessAuthCode to something else


execute:


docker-compose up -d


now browse


http://your-url:6806


token is mentioned in the docker-compose file. 

Source : https://github.com/siyuan-note/siyuan

Comments