Friday, January 5, 2018

Goodbye Owncloud, Hello Seafile

I had been an OwnCloud user for several years now. The En0ch team's OwnCloud VM made it easy to deploy and get setup in no time. My configuration was perhaps somewhat unique with the server being a hosted VM and the files being stored on a NTFS drive shared through a CIFS Mount to the VM. Performance was less than stellar, but it worked! For my home needs anyway.

Recently we had a power outage in my neighborhood (a new neighborhood, so this was certainly not the first) and every time this happened, OwnCloud would crash hard. I was always surprised at how much work it took for me to get the service back up and running. I was on the latest stable 9.x build for some time (I think 10.0.4 is the latest at the time of this writing). For a while I had been thinking it was time to either wipe it all and start new, or find a new solution. After this most recent power outage, I figured it was time to start fresh AND look for a new solution.

I soon discovered Seafile and thought the initial configuration looked simple to setup. It's friendly integration with Let's Encrypt and modern UI were also intriguing.

After 30 minutes I had seafile up and running on my LAN. It was extremely simple following their documentation. It wasn't until I tried to enable HTTPS over WAN that I ran into some challenges, but once that was taken care of, I've been able to explore the product more.

Over my own experience with OwnCloud, Seafile is significantly faster. From syncing, to downloading, to streaming media - the overall experience is quite pleasant. It even works well for sharing public download and upload links, which was one of the most useful features of a self-hosted cloud file share.

Here are some of the tricks to my setup I had to configure:

Environment


  • Seafile 6.2.3 on Ubuntu Server 16.04 VM in VMware Workstation (hosted on Windows 10)
  • Storage is 2TB NTFS WD Passport configured as a Shared Folder to the Guest OS via Workstation
  • MySQL DB since storage is on NTFS (per user docs)
  • Let's Encrypt SSL Cert
  • NGINX reverse proxy


The first challenge was making it so I didn't have to run the seafile.sh and seahub.sh services with sudo. Because I'm using shared folders in Workstation, I wasn't the 'owner' of the data folder that get's configured and the services would fail to start unless ran with sudo. I found that if I opened
/etc/init.d/vmware-tools
and used my own GID and UID, it would mount the HGFS share properly and I could start the services without sudo

# Mount all hgfs filesystems
vmware_mount_vmhgfs() {
  if [ "`is_vmhgfs_mounted`" = "no" ]; then
    if [ "`vmware_vmhgfs_use_fuse`" = "yes" ]; then
      mkdir -p $vmhgfs_mnt
      vmware_exec_selinux "$vmdb_answer_BINDIR/vmhgfs-fuse \
         -o subtype=vmhgfs-fuse,allow_other,uid=1000,gid=1000 $vmhgfs_mnt"
    else
      vmware_exec_selinux "mount -t vmhgfs .host:/ $vmhgfs_mnt -o uid=1000,gid=1000"
    fi
  fi
}

The second biggest challenge was getting my nginx configuration right. I found that when I would enter my DDNS address for the server, I would be directed to my router's login - I wasn't getting passed through to the server itself. You can read more about the symptoms in the Seafile Forums. Long story short, I was missing some information shared in the Sample configuration file from the docs. Read those buggers carefully!

Whatever your self-hosted cloud storage provider is (OwnCloud, Seafile, NextCloud, etc), we can at least all agree that we're glad to be off of the big brother alternatives!
Share:

0 comments:

Post a Comment