Goodbye Nextcloud!
Last updated: 0 minutes ago
Intro
I have been running a Nextcloud instance for several years now. At first (honeymoon phase if you will) everything was going great. Nextcloud did all the things I needed, wanted, and more. But as we went on together, I realized that the more part of Nextcloud was slowing down my server and being wasted on my use cases. So, in a fit of what was more likely procrastination than anything else, this weekend I overhauled my home server to remove my Nextcloud instance. And the TLDR of this article is that I am super happy that I did.
Planning & Research (Friday)
The First thing that I needed to do was replace all the systems I needed by Sunday night so that I could resume Uni Courses on Monday. Insert scared laughing. So, I needed to take a good look at what exactly do I use with Nextcloud? The online storage, calendars, and address books were the BIG things that immediately stood out to me. As I worked through it though, there was also the Deck, Talk, notes, and Passwords.
Passwords was an easy choice; Ill replace that with Keepass. I know this from my IT days, and I know how to secure it and make it work really easily.
Talk was also really easy. I only have one friend there with me, and he agreed to migrate over to Discord. I use Discord for everything. You should join us by the way. We need more nerdery.
Online Storage was also surprisingly easy choice; I would setup NFS/SMB file sharing. My networking skills have gotten better and maintaining a secure file share over the internet is much easier for me now.
Calendar and Address books.... I had no idea where to start with this. I took to web searching and AI consultation. I found a couple of different solutions, but only one stood out to me to the point where I have forgotten the others (sorry). Radicale is what I chose to use for this. Its free, opensource, and is Linux first. This serves both caldav and cardav so I can serve all my calendars and address book very easily. It allows multi users (working on wife next hopefully) and allows me to select the storage directory.
Deck. This was hard. There are so many Kanban applications out there. But through my requirements I was able to narrow it down to select one. The requirements for me on this one were that it be local to me only (no Trello, Monday, Asana, Jira, or any other online service), and that I be able to pick where each individual board is saved (no centralized database file or server, and project based boards that could be saved with project). One project that nearly got me was, kanban-tui but it had a centralized db file. What I wound up choosing was Signboard. This saves all the boards as simple markdown files, and each board can be saved to its own individual project locations. It's also really fast, clean, and easy to navigate.
Notes. This was also easy since i have already done a lot of work rebuilding my notes environment into a vimwiki workhorse! :) Although I still need to work on a better solution for my phone to access those notes.
The Plan in chart form:
| Old | New |
|---|---|
| Password | Keepass |
| Talk | Discord |
| Storage | NFS/SMB |
| Calender | Radicale |
| Contacts | Radicale |
| Deck | Sigboard |
| Notes | VimWiki |
Execution (Sat & Sun)
Keepass
Moving from Nextcloud Passwords to Keepass was mostly easy. Nextcloud does give you exporting features and keepass does have importing features. I had to use the CSV formatting options and then custom map the fields when doing the import on the keepass side. Also, I wasn't able to import/export the folder structure, so I had to create the folders structure in keepass by hand, import all passwords into the main folder, and manually sort all the passwords into correct folders. Which was easier than it sounds as the custom mapping allowed me to map the nextcloud folder to a keepass note and then I could sort by that which grouped all of them together. It took about half an hour to complete the migration.
For the Android phone, I installed Keepass2Android. Particularly because it could access SMB shares where the key database is stored.
Talk
Talk was much easier than this. There is only two people that use my talk instance. I just asked him what platform he'd be willing to go to. We agreed on discord, which you should join and get nerdy with us!
MyCloud (NFS/SMB Storage)
This is where we get a bit more interesting. This was the primary thing that I needed to get done before Monday for classes. And it had to work flawlessly on all my devices over my Tailscale network while at school.
NFS Server
For this, I had to add sharing to my nixos config; I started with NFS as that was more important for desktop to communicate with server.
This little snippet is all you need to start serving NFS on nixos:
# This enables the NFS service
services.nfs.server.enable = true;
services.nfs.server.exports = ''
# specify each directory and client connection
/directory/to/share targetClientIp(insecure,rw,sync,no_subtree_check)
'';
The flags being used:
insecure: allows you connection with out using secured ports
rw: allows read write access
sync: the modern default. Server doesn't acknowledge change until change has been committed to stable storage
no_subtree_check: another modern default that improves reliability by disabling the server's check that every accessed file Is actually underneath the exported directory
For the targetClientIp, I used my Tailscale IP address for each of my nfs clients. Which means I need to keep my Tailscale on at all times (which I already do) and that I can access this share outside of my house without any additional networking setup. That's a win!
NFS Clients
I currently have 3 NFS clients that I need to worry about, my main desktop (Fedora), my laptop (NixOS), and a temporary VM for my OS class (Ubuntu). All three are very different OS's, so I was a bit worried about having a lot of fiddly config stuff to deal with. But Ubuntu and Redhat were pretty much identical in how they handled connecting to NFS.
On Ubuntu, I needed an extra sudo apt install nfs-common, while my fedora did not.
show mount -e SERVERNAME will show the available mount points from the server.
To make a permanent mount, we need to edit the fstab file as sudo sudo nvim /etc/fstab:
SERVERNAME:/MTN/DIR /TARGET/CLIENT/DIR nfs defaults 0 0
After editing this file, we will need to reload the systemctl daemon:
sudo systemclt daemon-reload
Then we can run the mount command or reboot system:
sudo mount -a
And that's it on Fedora and Ubuntu. You should be able to navigate to /TARGET/CLIENT/DIR that you specified in the fstab file.
For NixOS it was a little different but sort of the same. Have to add the following to the configuration file:
boot.supportedFilesystems = [ "nfs" ];
fileSystems."/TARGET/CLIENT/DIR" = {
device = "SERVERNAME:/MTN/DIR";
fsType = "nfs";
options = [
"x-systemd.automount"
"noauto"
"defaults"
"_netdev"
];
};
Then just run the standard sudo nixos-rebuild switch and it should work!
Samba Server
For Samba, I currently have two clients. Neither of which I want. One is a windows VM that I have temporarily spun up for this semester's classes. The other is my piece of garbage Pixel 8. Apparently google doesn't allow NFS sharing. And even then, I needed a 3rd party app to access the Samba share. But I am getting ahead of myself, this section is for server config, we'll get to the Android misery in a moment. On my server for a Samba config, I gave the nixos config the following:
services.samba = {
enable = true;
openFirewall = true;
settings = {
global = {
"workgroup" = "WORKGROUP";
"security" = "user";
};
"MyCloud" = {
"path" = "/SERVER/SHARE/DIRECTORY";
"browseable" = "yes";
"read only" = "no";
"guest ok" = "no";
};
};
};
Rebuild:
sudo nixos-rebuild switch
Test:
sudo testparm -s
Add users. This has to be an existing user on the server. I think I will come back to this and add my clients to the server as users. :
sudo smbpasswd -a USERNAME
And then, enable the user:
sudo smbpasswd -e USERNAME
Now we can move on to the clients. It should be correctly serving at this point.
Samba Client
On windows, this is super easy. Open a file explorer window and in the address bar, navigate to \\SERVERNAME\ if done right, it should prompt for the user & password that we made for the samba server. And then you should have access to the file share.
For Android.... Google has blocked NFS sharing and does not include a way to connect to Samba out of the box. I downloaded a 3rd party app called 'Material Files'. Turns out to be a nice little app, and I am starting to prefer it over the built-in file explorer that comes with the phone. Win I guess. Within that app, you can click on the hamburger button, then click on add storage, then click on SMB server. The app will try to find servers on the network, but I have only had success with that once out of three attempts. If the automation doesn't work, click on add manually and fill out the presented form.
Hostname = SERVERNAME
Domain = WORKGROUP
and user and password.
I think that was all I filled out and got immediate access to the server files.
Other Shenanigans
One thing that kept getting in my way was the permissions on the folder. This is 100% Nextclouds fault. Everything in the nextcloud folder got assigned nextcloud:nextcloud ownership. While I still had nextcloud up at this point, I was adding nextcloud group to my user accounts to get full proper access and that didn't work very well. Once I got Nextcloud off my system, I renamed the folder to MyCloud and changed the ownership back to my server user and user group and that immediately fixed all permission issues with every user on the network.
Radicale
Setup
I found Radicale in the NixOS package manager, that made me happy because I don't like using Docker/Podman. I do use those tools when I need to, but I generally try to avoid them; it feels like another layer of complexity that I don't need in life. Setup for Radicale was just adding some more text to the config file:
services.radicale = {
enable = true;
settings = {
server = {
hosts = [ "127.0.0.1:5232" ];
};
auth = {
type = "htpasswd";
htpasswd_filename = "/SERVER/STORAGE/DIRECTORY/users";
htpasswd_encryption = "bcrypt";
};
storage = {
filesystem_folder = "/SERVER/STORAGE/DIRECTORY/collections";
};
web = {
type = "internal";
};
};
};
The storage directory could be anywhere but for the users it has to end in the users file. Now we do a rebuild sudo nixos-rebuild switch.
Now we need to create users. I only have one user at this time to setup. Also, you want/need to create the users/password file using Bcrypt to secure it:
sudo nix-shell -p apacheHttpd --run 'htpasswd -c -B /SERVER/STORAGE/DIRECTORY/users USERNAME
apacheHttpd is not installed on my system, so I ran it from a nix-shell temp environment.
htpasswd creates and manages the user file.
-c creates the file if not there.
-B uses bcrypt to secure it.
USERNAME the username of whoever needs Radicale access.
Then restart the Radicale service: sudo systemctl restart radical
Now you should be able to test and make sure that Radicale is working. From server terminal:
curl -i http://127.0.0.1:5232/
curl -i -u USERNAME http://127.0.0.1:5232/
curl -i -u USERNAME \
-X PROPFIND \
-H 'Depth: 0' \
http://127.0.0.1:5232/
If those are success full, we can move onto networking. If not..... good luck? hahah. I'm joking. Join my discord and I'll try to help you get through it. I am using Nginx reverse proxy to do my routing, and I already have a working configuration file in place, so I won't be covering the basics of Nginx. I just had to add the following to my config file:
"CALDAV.ADDRESS.COM" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:5232";
extraConfig = ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 50M;
'';
};
You will need your own caldav address. In my domain provider, I just added an A record for my caldav subdomain address. Do another rebuild and this should now be fully working. The easiest way to test is by going to that web address and from any of your other devices. You should get the Radicale login page.
Migrating Data
Once Radicale is up and running and you have access to the web gui, we can start migrating the data. In Nextcloud, both the calendars and the address book had export features that were exported and downloaded to an ics file on my computer file. Then in the web gui you can import those files to create you Radicale Address book and calendars. This part was super easy. I would recommend editing the calendars and address book in the web gui before moving onto the connections step. I color code my calendar for instance, if you do that here they are pre-colored for any device that connects. Can also clean up the naming, since it uses the filename for the calendar name which from next cloud was 'name-02-23-2026.ics' or something silly.
Connecting Accounts
This part was also easy, actually the easiest calendar connection I have ever made. In thunderbird (and all my other apps) click on add calendar, click On Network, fill in username and url address. This should populate all of your calendars; select the ones you want and add. Boom! Bob's your uncle. Do the same with the address book.
Radicale is done.
Signboard
Signboard was fairly easy, but it was interesting. They do not have a prebuilt rpm ready to go, but they have the build scripts ready.
git clone https://github.com/cdevroe/signboard clone the repo
cd ./signboard
sudo dnf install nodejs npm rpm-build libxcrypt-compat will need these installed to run the scripts and to build the RPM
npm install
npm run dist:linux:rpm:x64 this builds the rpm for the specified system (look up your if not fedora x64)
cd ./dist
sudo install ./*.rpm this will install the newly created rpm for signboard
Now it's installed. We can add boards and cards. Every new board gets saved to whatever folder location you specify and saves board and cards in markdown.
Nextcloud Removal
At this point we are getting late into Sunday night and I need to pull the plug on Nextcloud. With all the confidence of a wet noodle I remove Nextcloud from my NixOS config file, from my nginx, and from my domain manager. This is also the point where I rename my data folder from nextcloud to MyCloud, which meant i had to go through everything and adjust the pathing. Then I fixed the user ownership as I mentioned earlier. Not going to lie, I was scared of removing that config.
Conclusion
I did it! And in time for the school week. We are now a few days later and everything is working very well and very fast! I am so happy with these changes. I am sure that I glossed over a few things, this was a massive article to write, please message for more info. :) And I didn't get any screen shots, I'm sorry. I will try to do better about including visuals in the future.
If you want me to elaborate on anything, please message me on Discord, Mastodon, X, or email me. I’ll be happy to go into more detail one-on-one or to create more posts.
References
Radicale
kanban-tui
Signboard
Keepass
NFS Man Pages
Material Files
