Showing posts with label seafile. Show all posts
Showing posts with label seafile. Show all posts

Wednesday, August 21, 2019

Upgrading Seafile Server from version 6 to version 7


In this post I'll cover the process of upgrading Seafile Server from 6.3.4 to 7.0.4. I've been running Seafile Server in an Ubuntu VM on my Linux Server for about a year and a half. Along with using Let's Encrypt's Certbot, it's been an incredibly stable and virtually 'hands off' service. 


Pre Upgrade


  1. Backup current system. As I run Seafile in a VMware Workstation (for Linux) VM, it's easy to create a quick snapshot of the current system and configuration that I can revert to in the case of any unforeseen issues. Additionally, I run Timeshift with daily/weekly/monthly rollups of my entire server. Can't ever be too careful!
  2. Download the new Seafile bits. Seafile Server is a quick download from their download page, and is simple to run a wget on the download to get it to your server. 
  3. Make sure the current server is functional. Before you perform any upgrade of any service/application, it's best practice to ensure the current iteration is up and running and functional. This is a practice any IT professional should follow regardless of your employer/application/service in question. Failing to do so can bring unwanted behaviors to your updated instance, or even cause the upgrade to fail altogether.
  4. Review the Release Notes. Once again, a best practice anyone in IT should follow before jumping into an upgrade is reviewing the Release Notes of the target version. Release Notes are known to include critical information not only related to new features, but often around the upgrade process itself.

Upgrade


  1. After reviewing the release notes and downloading the 7.0.4 bits to your server, untar the file using the command tar -xzvf seafile-server_7.0.4_x86-64.tar.gz and ensure the resulting folder is in the same directory as your current seafile installation
  2. The next step is to stop your seafile services (seahub and seafile) by running ./seahub.sh stop && seafile.sh stop
  3. Once the services are stopped, go into the new 7.0.4 directory and find the upgrade scripts under the upgrade folder. Starting with the script of your current server (in my case, 6.3.4 would correlate to upgrade_6.3_7.0.sh), run each script

  4. Run the upgrade script and press ENTER

  5. You may find some [info] and [warning] messages, but as long as there are no [error] messages, you'll look for "Upgraded your seafile server successfully"

  6. Ensure your seafile and seahub services start successfully, then verify your version on the server in the About section. 



    And congrats you're done! 

    One thing I tried testing that doesn't seem to be fully working yet is editing the new Published Library's .md file. I get a spinning circle as if it's thinking or loading something. In my case, it just spins indefinitely:
    At any rate, your server should now be upgraded! Let me know how your upgrade went in the comments. Thanks for reading!

Share:

Wednesday, October 10, 2018

Home Server Update

If you’ve followed this blog for any length of time, you’ve known my home server has served multiple purposes over the years and has been built with simplicity in mind. We’re not talking enterprise grade components or architecture here. I’ve found that many consumer-grade resources work extremely well for my needs.
What are those needs?
Simple: media management/DVR capability, and private cloud file server. This is where Plex and Seafile step in.

Most everyone’s heard of Plex these days. It’s a media-managing powerhouse that makes organizing and consuming your content easy and enjoyable. As a Plex Pass subscriber, you also gain OTA TV DVR capabilities. As a closet cord cutter, this has been a crucial capability. The fact that it adds the DVR’d content into my normal TV Media Library is a huge win!



Second is Seafile which is a Dropbox/Google Drive alternative. It’s open source, lightweight, and runs beautifully on a Ubuntu Server mini.iso build. With Seafile, I can access my files and documents from anywhere, using any device.



It came time to upgrade my Server as I wanted to get better transcoding power for my DVR content, and faster access to all my files. Additionally, a major goal of this upgrade was to rid myself of Windows 10. If you recall, I ran Windows 10 on my server natively, then ran my Plex/Seafile servers in VMs using VMware Workstation. This made management incredibly simple, however Windows 10 became such an annoying ‘hypervisor’ that I couldn’t wait to get rid of it. Furthermore, my MSI Motherboard was old enough that it wouldn’t allow installation of newer Linux Operating Systems. The last BIOS update was from 2014 and there were no signs of a newer version coming.
So as any geek would logically conclude, it was time for an upgrade!

After some research, I ended up with the following components:

1. AMD Ryzen 5 2400G with Radeon RX Vega Graphics (Coming from an A10 6800k APU)
2. Asus PRIME B450M-A Motherboard (Micro ATX)
3. Corsair Vengeance LPX DDR4 Memory, 16GB running at 2900 MHz (Coming from 8GB 2100 MHz.. fast memory compliments the APU)
4. Linux Mint 19 installed natively on a 500GB WD M.2 SSD (Blue)

The rest of my Media is stored on a random selection of spinning disk that are configured with LVM. LVM allows me to specify a single location for Plex to reference for all the video/music/photos.

Seafile is still running in a VM as it was much easier to move this over along with its Certificates and configurations than to rebuild. I was really impressed at how it booted up, connected to the new data repository and took no additional configuration!

I like the concept of the APU for my home needs. It creates a flexible environment as my needs grow and change with the home server (if I choose to run Steam in the off hours, for example!)

One thing I’m missing is a DR plan

As it stands, if a disk within my LVM group fails, I lose that data. I need to look into the best DR option in this setup. Let me know in the comments if you have any recommendations!
Share:

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: