blob: afba95946e05eb7d8fbc0c2d487d6e7c7fd4948b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Accessing Nextcloud With WebDAV on Arch</title>
<link rel="shortcut icon" href="/images/favicon.png">
<link rel="stylesheet" href="/css/site.css">
<link href="/posts/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts"/>
<link href="/posts/arch/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Arch"/>
<link href="/posts/gemini/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Gemini"/>
<link href="/posts/jigsaw/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Jigsaw"/>
<link href="/posts/laravel/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Laravel"/>
<link href="/posts/linux/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Linux"/>
<link href="/posts/markdown/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Markdown"/>
<link href="/posts/netlify/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Netlify"/>
<link href="/posts/nextcloud/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About Nextcloud"/>
<link href="/posts/php/atom.xml" type="application/atom+xml" rel="alternate" title="The Home of David T. Sadler - All Posts About PHP"/>
</head>
<body>
<section><h1>Accessing Nextcloud With WebDAV on Arch</h1><blockquote>Mon 15th February 2021 By David T. Sadler.</blockquote><p>I have a Nextcloud instance and I want to mount it as a directory on my local machine. Since Nextcloud cloud supports the WebDAV protocol its possible to do this by installing davfs2 which can mount a WebDAV resource.</p><p>The first thing I had to do was install davfs2.</p><pre><code class="shell">$ sudo pacman -S davfs2</code></pre><p>Next I created the directory where Nextcloud would be mounted.</p><pre><code class="shell">$ mkdir -p .local/share/nextcloud</code></pre><p>I then needed to tell Arch how to mount Nextcloud by adding the below line to the /etc/fstab file.</p><pre><code class="shell">https://my-nextcloud-server.com/path /home/david/.local/share/nextcloud davfs rw,user,uid=david,noauto 0 0</code></pre><p>Since access to Nextcloud is controlled by a username and password these where added to the ~/.davfs2 file.</p><pre><code class="shell">https://my-nextcloud-server.com/path username password</code></pre><p>I made sure this file had the correct permissions to ensure security.</p><pre><code class="shell">$ chmod 600 ~/.davfs2/secrets</code></pre><p>Now I can mount Nextcloud and access my files just like any others.</p><pre><code class="shell">$ mount .local/share/nextcloud</code></pre><h3>Links</h3><a href="/posts/nextcloud">Nextcloud - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a></section>
<script defer src="/js/highlight.min.js"></script>
<script defer src="/js/site.js"></script>
</body>
</html>
|