Setting up siyuan with docker and exposing it with cloudflare

Hi all!

I'm new to everything siyuan and docker related and struggling to understand how to set it up so my workspace can be accessible from any computer browser with any network. I've tried the docker image for siyuan but keep running into the issue of permission denied when trying to run the container. If someone can help me step by step, or even images or a quick video would be extremely helpful. My OS is windows 10 Home (or 11 if need a more recent one)

Thank you in advance! ☺️☺️❤️

Edit: change title regarding vpn to cloudflare. I read that cloudflare would be a much easier way to expose the container rather than using a vpn, if anyone has advice or tips - please feel free to share

    1 Operate
    vivien updated this article at 2024-09-26 01:58:51

    Welcome to here!

    Here we can learn from each other how to use SiYuan, give feedback and suggestions, and build SiYuan together.

    Signup About
    Please input reply content ...
    • vivien
      PRO Author

      I did set it up that way initially and ot was quite simple but figured an exposed docker with a secure method would be the main way to go since my main case use is accessing and editing my notes outside my own devices and network (e.g. a library computer and network). If it can still be done via the settings method, please tell!

      I know exposing it to other networks might be less secure and siyuan is a privacy first app...but my notes are just housing my uni notes about anatomy so I'm not too fussed about security. If my notes are a bit less protected but easily accessible and my IP addresses and etc are secure then I'm perfectly content

      1 Reply
    • MiscReply
    • vivien
      PRO Author

      Thanks for your help!

      It turns out I've made a very stupid mistake from the beginning by trying to run the commands via powershell not knowing they were actually linux 🤦🏻‍♀️. I've installed Ubuntu and did the whole process again and it runs beautifully now. Only issue is that I'm trying to expose it to other networks securely but it might turn out my little surface go isn't powerful enough for that so I'll have to wait until my new laptop comes. Thanks again!

    • Eric

      Nevermind... I just found out I did not assign the default folder to uid and gid 1000, which in my case was the default ubuntu user... It works!

      1 Reply
    • Eric

      Thanks for your help too. But I'm stuck...

      I successfully created a group siyuan with a gid 1000, but a user with uid 1000 already exists. I thought I might just use that user, added it to the group 1000. I also created the default folder /siyuan/workspace/ and changed ownership of both (siyuan and siyuan/workspace) folders to 1000:1000.

      Docker-compose file is pretty much the same, I only added 6808:6808 to ports, so I can publish notes without edition rights. After doing docker compose up I get the following message in a loop:

      main-1  | E 2024/09/24 10:20:05 working.go:282: create os tmp dir [/siyuan/workspace/temp/os] failed: mkdir /siyuan/workspace/temp: permission denied
      

      Did I forgot to do something? Or did something wrong?

      My rig is Raspberry Pi with Ubuntu 22.04.5 LTS.

      1 Reply
    • Visit all replies