Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebDAV integration not working #217

Open
TheSunCat opened this issue Feb 24, 2023 · 3 comments
Open

WebDAV integration not working #217

TheSunCat opened this issue Feb 24, 2023 · 3 comments

Comments

@TheSunCat
Copy link

Hi! I'm trying to set up the webdav integration, but with no success.
I've set LOGLEVEL=trace, and see no logs containing the string webdav. Here's my .userprofile:

integrations:
  - provider: webdav
    id: fLAME8YBm5uFJ89GKRAFkGjk7hJw0heow045kfhc
    name: Nextcloud
    address: https://my.nextcloud.com/remote.php/dav/files/my-account/reMarkable
    username: "my-username"
    password: "my-totally-secure-password"

My understanding is that this should sync my files to my Nextcloud server, but I see nothing in the folder I created.

I have verified I can connect to the folder using Dolphin (file manager), and create files successfully, so this should not be an issue.

@ddvk
Copy link
Owner

ddvk commented Feb 27, 2023

this just adds it as an integration, you have to manually export/import files on the tablet, it uses the "official" implementation

https://support.remarkable.com/s/article/Integrating-with-Google-Drive-Dropbox-and-OneDrive

@TheSunCat
Copy link
Author

Ahh I see. Is there no current way to auto-sync my notes to Nextcloud? I'd like to share my notes with friends, but haven't found a good way to do so automatically.

@Aephir
Copy link

Aephir commented Jun 30, 2023

@TheSunCat This also came as a surprise to me. Manually having to push your documents seems silly (that there's not at least an option to auto-sync). But I guess that's reMarkable wanting your subscription $.

I just asked about one solution here #247, but even if that won't work, I guess you could "just" mount your nextcloud on whatever system you are using to host rmfakecloud, and use a nextcloud folder as your config/data directory.


Guide for how to do this on Ubuntu Server LTS 22.04

Warning - Maybe a bit rough guide, I just copied from my own notes after doing it. Let me know if you have questions.
I suspect the procedure will be similar on many systems (not just Ubuntu).

Install davfs2, add yourself to the davfs2 usergroup

apt-get install davfs2
usermod -aG davfs2 $USERNAME

$USERNAME is you linux username.

Create a user folder, and copy a the secretfile to it. Also, change ownership and set permissions. Also "reconfigure" to allow non-root users to mount, and create the mount point.

mkdir ~/.davfs2
sudo cp /etc/davfs2/secrets ~/.davfs2/secrets
sudo chown $USERNAME:$USERNAME ~/.davfs2/secrets
chmod 600 ~/.davfs2/secrets
sudo dpkg-reconfigure davfs2
mkdir $MOUNTPOINT

where $MOUNTPOINT is the full patht to where you want to mount Nextcloud.

Open the ~/.davfs2/secrets file and add your user credentials to the end of it (server url, username, password). OBS! Make sure to create a device password in Nextcloud for this). Add the following:

$IP_OR_URL/remote.php/dav/files/$NCUSER $NCUSER $NCPASSWORD

where $IP_OR_URL is either your local IP (if accessing on local network, e..g. 192.168.1..101) or the URL if not (e.g. https://nextcloud.your.domain; $NCUSER is your Nextcloud username; $NCPASSWORD is the "device password" you cerated in the Nextcloud (webUI).

(OBS! - You might also want to add this to the /etc/davfs2/secrets to allow root to mount during boot. If wanted, add in /etc/fstab):

$IP:PORT_OR_URL/remote.php/dav/files/$NCUSER/ $MOUNTPOINT  davfs  user,rw,_netdev,auto,nofail 0 0

$IP:PORT_OR_URL because I used IP:PORT (e.g., 192.168.1..101:80) here instead of just IP.

Open /etc/davfs2/davfs2.conf, and if needed, uncomment the lines:

 dav_user        davfs2            # system wide config file only
 dav_group       davfs2            # system wide config file only

Log out of the shell/ssh session, and log back in.

Now you should be able to mount with

mount -a

if you added the line in /etc/fstab.

You can also try rebooting the system to check that it mounts at boot.

Then you just create a folder somewhere in Nextcloud, and use that as the data directory for rmfakecloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants