{"id":1787,"date":"2016-06-05T22:32:55","date_gmt":"2016-06-06T03:32:55","guid":{"rendered":"http:\/\/swildow.darktech.org\/wp\/?p=1787"},"modified":"2016-06-05T22:32:55","modified_gmt":"2016-06-06T03:32:55","slug":"how-to-set-up-a-seafile-server-on-a-raspberry-pi-complete","status":"publish","type":"post","link":"http:\/\/www.wildow.com\/blog\/?p=1787","title":{"rendered":"How to set up a Seafile Server on a raspberry pi complete"},"content":{"rendered":"<section class=\" section--body section--first\">\n<div class=\"section-content\">\n<div class=\"section-inner layoutSingleColumn\">\n<h3 id=\"cb4c\" class=\"graf--h3 graf--leading\">How to set up a Seafile Server on a raspberry pi complete<\/h3>\n<p id=\"a30f\" class=\"graf--p graf-after--h3\">I set up a dedicated raspberry pi Seafile server with a 2TB external to deal with selective syncing. Mostly with vendor folders like node. I was using Dropbox but I think the amount of syncing and resyncing killed my chromebook\u2019s SSD.<\/p>\n<p id=\"68dd\" class=\"graf--p graf-after--p\">There only a couple major steps to having it up and running to where you should no longer need a keyboard, mouse, or monitor.<\/p>\n<h3 id=\"f4ff\" class=\"graf--h3 graf-after--p\">1. Install Raspbian on PI<\/h3>\n<blockquote id=\"346d\" class=\"graf--pullquote pullquote graf-after--h3\"><p><a class=\"markup--anchor markup--pullquote-anchor\" href=\"https:\/\/www.raspberrypi.org\/downloads\/\" rel=\"nofollow\" data-href=\"https:\/\/www.raspberrypi.org\/downloads\/\">https:\/\/www.raspberrypi.org\/downloads\/<\/a><\/p><\/blockquote>\n<p id=\"523c\" class=\"graf--p graf-after--pullquote\">Get the NOOBS.zip setup and extract the contents onto a FAT32 microSD card. Load it up, select en_US (not en_GB) for language at the bottom and install Raspbian.<\/p>\n<p id=\"58c5\" class=\"graf--p graf-after--p\">Once install opened the terminal run these to update the installed packages on the Rasbpian and get the dependencies for Seafile<\/p>\n<pre id=\"e232\" class=\"graf--pre graf-after--p\">sudo aptitude update<\/pre>\n<pre id=\"fcec\" class=\"graf--pre graf-after--pre\">sudo aptitude -y install python2.7 python-setuptools python-simplejson python-imaging sqlite3<\/pre>\n<h3 id=\"6787\" class=\"graf--h3 graf-after--pre\">2. Set up static network IP via<\/h3>\n<pre id=\"0335\" class=\"graf--pre graf-after--h3\">sudo nano \/etc\/network\/interfaces<\/pre>\n<pre id=\"0cd3\" class=\"graf--pre graf-after--pre\">auto lo\r\niface lo inet loopback\r\n\r\n\r\n#My IP description\r\n# IPv4 address\r\niface eth0 inet static\r\n# address of your raspberry pi pick any 192.162.x.xxx. Be consistent\r\naddress\t192.168.0.100\r\nnetmask\t255.255.255.0\r\n# address of your router typically\r\ngateway 192.168.1.1<\/pre>\n<pre id=\"e555\" class=\"graf--pre graf-after--pre\">#My IP description \r\n# IPv4 address\r\niface wlan0 inet static\r\n# address of your raspberry pi\r\naddress\t192.168.0.100\r\nnetmask\t255.255.255.0\r\n# address of your router typically\r\ngateway 192.168.1.1\r\n# some line about a referenced config file should be here to \r\n# save wireless settings<\/pre>\n<h3 id=\"de95\" class=\"graf--h3 graf-after--pre\">3. Set up automount external drive<\/h3>\n<p id=\"0150\" class=\"graf--p graf-after--h3\">You are going to want to figure out which drive is the correct one you are using. Use sudo fdisk -l to find the name and replace sda1 with your drive below. Replace the filesystem type below with yours. Separate everything with either 1 tab OR 1 space.<\/p>\n<pre id=\"6045\" class=\"graf--pre graf-after--p\">sudo fdisk -l<\/pre>\n<pre id=\"cd99\" class=\"graf--pre graf-after--pre\">sudo nano \/etc\/fstab<\/pre>\n<pre id=\"3c73\" class=\"graf--pre graf-after--pre\">\/dev\/sda1 \/media\/externalHD ntfs defaults 0 1<\/pre>\n<h3 id=\"4c94\" class=\"graf--h3 graf-after--pre\">4. Install Seafile-server for PI<\/h3>\n<p id=\"be69\" class=\"graf--p graf-after--h3\">Replace 5.0.3 with the newest version, if any, from<\/p>\n<blockquote id=\"ff33\" class=\"graf--pullquote pullquote graf-after--p\"><p><a class=\"markup--anchor markup--pullquote-anchor\" href=\"https:\/\/github.com\/haiwen\/seafile-rpi\/releases\" rel=\"nofollow\" data-href=\"https:\/\/github.com\/haiwen\/seafile-rpi\/releases\">https:\/\/github.com\/haiwen\/seafile-rpi\/releases<\/a>\/<\/p><\/blockquote>\n<pre id=\"7aae\" class=\"graf--pre graf-after--pullquote\">wget <a class=\"markup--anchor markup--pre-anchor\" href=\"https:\/\/github.com\/haiwen\/seafile-rpi\/releases\" rel=\"nofollow\" data-href=\"https:\/\/github.com\/haiwen\/seafile-rpi\/releases\">https:\/\/github.com\/haiwen\/seafile-rpi\/releases<\/a>\/<a class=\"markup--anchor markup--pre-anchor\" href=\"https:\/\/github.com\/haiwen\/seafile-rpi\/releases\/download\/v5.0.3\/seafile-server_stable_5.0.3_pi.tar.gz\" rel=\"nofollow\" data-href=\"https:\/\/github.com\/haiwen\/seafile-rpi\/releases\/download\/v5.0.3\/seafile-server_stable_5.0.3_pi.tar.gz\">seafile-server_stable_5.0.3_pi.tar.gz<\/a><\/pre>\n<pre id=\"4df2\" class=\"graf--pre graf-after--pre\">tar -xvzf seafile-server_*<\/pre>\n<pre id=\"20c7\" class=\"graf--pre graf-after--pre\">mkdir installed<\/pre>\n<pre id=\"2b9e\" class=\"graf--pre graf-after--pre\">mv seafile-server_*.tar.gz installed<\/pre>\n<pre id=\"cb6d\" class=\"graf--pre graf-after--pre\">cd seafile-server-*<\/pre>\n<pre id=\"bdd3\" class=\"graf--pre graf-after--pre\">.\/setup-seafile.sh<\/pre>\n<p id=\"10e4\" class=\"graf--p graf-after--pre\">You are going to be asked some questions during the setup.<\/p>\n<p id=\"a64c\" class=\"graf--p graf-after--p\">Set the IP to the one you set in the static IP section or use a no-ip address.<\/p>\n<pre id=\"996a\" class=\"graf--pre graf-after--p\">192.168.x.xxx<\/pre>\n<p id=\"0de8\" class=\"graf--p graf-after--pre\">Set the path of where to hold files on the external.<\/p>\n<pre id=\"440d\" class=\"graf--pre graf-after--p\">\/media\/externalHD\/SeaData<\/pre>\n<h3 id=\"0ee9\" class=\"graf--h3 graf-after--pre\">5. Configure autostart for seafile onboot via crontab -e<\/h3>\n<p id=\"c9b5\" class=\"graf--p graf-after--h3\">Crontab is a scheduler for commands. We want to start the seafile.sh first and then start seahub.sh after 15 seconds to give time for seafile to boot because seahub depends on seafile running.<\/p>\n<pre id=\"32a9\" class=\"graf--pre graf-after--p\"><em class=\"markup--em markup--pre-em\">crontab -e<\/em><\/pre>\n<pre id=\"2d38\" class=\"graf--pre graf-after--pre graf--last\">@reboot \/home\/pi\/mycloud\/seafile-server-latest\/seafile.sh start\r\n@reboot sleep 15 &amp;&amp; \/home\/pi\/mycloud\/seafile-server-latest\/seahub.sh start<\/pre>\n<\/div>\n<\/div>\n<\/section>\n<section class=\" section--body\">\n<div class=\"section-divider layoutSingleColumn\">\n<hr class=\"section-divider\" \/>\n<\/div>\n<div class=\"section-content\">\n<div class=\"section-inner layoutSingleColumn\">\n<h3 id=\"6857\" class=\"graf--h3 graf--leading\">There you have it.<\/h3>\n<p id=\"cabe\" class=\"graf--p graf-after--h3 graf--last\">With a little luck you\u2019ll only have to do this once. Before you disconnect monitor, keyboard, mouse, etc, make sure everything is running and that you can connect after a reboot command in the terminal. Download clients. Connect them to the server using your pi\u2019s ip. <a class=\"markup--anchor markup--p-anchor\" href=\"http:\/\/191.168.x.xxx\" rel=\"nofollow\" data-href=\"http:\/\/191.168.x.xxx\">http:\/\/191.168.x.xxx<\/a><\/p>\n<\/div>\n<\/div>\n<\/section>\n<section class=\" section--body\">\n<div class=\"section-divider layoutSingleColumn\">\n<hr class=\"section-divider\" \/>\n<\/div>\n<div class=\"section-content\">\n<div class=\"section-inner layoutSingleColumn\">\n<p id=\"4beb\" class=\"graf--p graf--leading\">A good chuck of this documentation came from this guide. He uses a static external IP address for the pi to be able to connect anywhere to it if you are interested.<\/p>\n<pre id=\"f667\" class=\"graf--pre graf-after--p graf--last\">http:\/\/draptik.github.io\/blog\/2014\/04\/21\/installing-seafile-on-raspberry-pi\/<\/pre>\n<\/div>\n<\/div>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>How to set up a Seafile Server on a raspberry pi complete I set up a dedicated raspberry pi Seafile server with a 2TB external to deal with selective syncing. Mostly with vendor folders like node. I was using Dropbox &#8230; <a class=\"more-link\" href=\"http:\/\/www.wildow.com\/blog\/?p=1787\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-1787","post","type-post","status-publish","format-standard","hentry","category-raspberrypi"],"_links":{"self":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1787"}],"version-history":[{"count":1,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1787\/revisions"}],"predecessor-version":[{"id":1788,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1787\/revisions\/1788"}],"wp:attachment":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1787"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}