Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

How to install Seafile in a FreeBSD jail

Ultima

Newbie
Joined
May 30, 2018
Messages
2
Hello everyone,

A FreeNAS user has messaged me requesting assistance on installing Seafile in a FreeBSD jail. Instead of keeping the setup private, I decided to post the process here to assist anyone else that may have an issue. I run this process before every minor and major version update to verify everything is working properly and hopefully this will help anyone else run Seafile without issues.

Before getting started, one thing that needs to be clarified is that net-mgmt/seafile-server is not the complete Seafile applet. www/seahub is the application most people are wanting. Installing www/seahub provides the full Seafile server application, including web frontend. Seafile-server is simply a dependency and by itself isn't very useful.

This guide only covers the SQLite setup. I do not suggest using MySQL unless you understand why one would use MySQL over SQLite. If you do understand, then I doubt you will need help with the MySQL route.

At the time of writing this, the most current version of seafile-server is 6.2.5 and Seahub is 6.2.12. This guide expects the user to know how to create a FreeBSD jail and will begin chrooted inside the jail in a shell.

root@111amd64-test:~ # pkg info
pkg-1.10.5_1 Package manager
root@111amd64-test:~ # uname -a
FreeBSD 111amd64-test 11.1-RELEASE-p9 FreeBSD 11.1-RELEASE-p9 amd64
root@111amd64-test:~ # date
Thu May 31 04:50:53 UTC 2018


# pkg install seahub
...truncated...
Number of packages to be installed: 106

The process will require 386 MiB more space.

Proceed with this action? [y/N] y
...truncated...
Message from seahub-6.2.12:

To generate a new config,
cd /usr/local/www/haiwen/seafile-server
Then choose sqlite or mysql, mysql needs to be setup with root.
sqlite: ./setup-seafile.sh
mysql: ./setup-seafile-mysql.sh
Further instructions will be provided after the setup script is finished.


If a new config is created, run this to setup admin.

/usr/local/www/haiwen/seafile-server/reset-admin.sh


Don't forget to run update scripts after every minor and major update located in
/usr/local/www/haiwen/seafile-server/upgrade

Patch updates (5.1.x) don't require these scripts, however do required a restarted.
root@111amd64-test:~ # cd /usr/local/www/haiwen/seafile-server
root@111amd64-test:/usr/local/www/haiwen/seafile-server # ./setup-seafile.sh
-----------------------------------------------------------------
This script will guide you to config and setup your seafile server.

Make sure you have read seafile server manual at

https://github.com/haiwen/seafile/wiki

Note: This script will guide your to setup seafile server using sqlite3,
which may have problems if your disk is on a NFS/CIFS/USB.
In these cases, we sugguest you setup seafile server using MySQL.

Press [ENTER] to continue
-----------------------------------------------------------------


Checking packages needed by seafile ...

Checking python on this machine ...
Find python: python2.7

Checking python module: setuptools ... Done.
Checking python module: python-imaging ... Done.
Checking python module: python-sqlite3 ... Done.

Checking for sqlite3 ...Done.

Checking Done.


What would you like to use as the name of this seafile server?
Your seafile users will be able to see the name in their seafile client.
You can use a-z, A-Z, 0-9, _ and -, and the length should be 3 ~ 15
[server name]: Seafile


What is the ip or domain of this server?
For example, www.mycompany.com, or, 192.168.1.101

[This server's ip or domain]: seafile.example.com

Where would you like to store your seafile data?
Note: Please use a volume with enough free space.
[default: /usr/local/www/haiwen/seafile-data ]

What tcp port do you want to use for seafile fileserver?
8082 is the recommended port.
[default: 8082 ]


This is your config information:

server name: Seafile
server ip/domain: seafile.example.com
seafile data dir: /usr/local/www/haiwen/seafile-data
fileserver port: 8082

If you are OK with the configuration, press [ENTER] to continue.

Generating ccnet configuration in /usr/local/www/haiwen/ccnet...

done
Successly create configuration dir /usr/local/www/haiwen/ccnet.

Generating seafile configuration in /usr/local/www/haiwen/seafile-data ...

Done.

-----------------------------------------------------------------
Seahub is the web interface for seafile server.
Now let's setup seahub configuration. Press [ENTER] to continue
-----------------------------------------------------------------


Creating seahub database now, it may take one minute, please wait...


Done.

creating seafile-server-latest symbolic link ... done


-----------------------------------------------------------------
Your seafile server configuration has been completed successfully.
-----------------------------------------------------------------

run seafile server: sysrc seafile_enable=YES
service seafile { start | stop | restart }
run seahub server: sysrc seahub_enable=YES
fastcgi (optional): sysrc seahub_fastcgi=1
service seahub { start | stop | restart }
run reset-admin: ./reset-admin.sh

-----------------------------------------------------------------
If the server is behind a firewall, remember to open these tcp ports:
-----------------------------------------------------------------

port of seafile fileserver: 8082
port of seahub: 8000

When problems occur, refer to

https://github.com/haiwen/seafile/wiki

for more information.

root@111amd64-test:/usr/local/www/haiwen/seafile-server # sysrc seafile_enable=YES
seafile_enable: -> YES
root@111amd64-test:/usr/local/www/haiwen/seafile-server # sysrc seahub_enable=YES
seahub_enable: -> YES
root@111amd64-test:/usr/local/www/haiwen/seafile-server # service seafile start
[05/31/18 05:13:36] ../common/session.c(132): using config file /usr/local/www/haiwen/conf/ccnet.conf
Starting seafile server, please wait ...
Seafile server started

root@111amd64-test:/usr/local/www/haiwen/seafile-server # service seahub start
LANG is not set in ENV, set to en_US.UTF-8
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 ...

Seahub is started

root@111amd64-test:/usr/local/www/haiwen/seafile-server # ./reset-admin.sh
E-mail address: ultima@FreeBSD.org
Password:
Password (again):
Superuser created successfully.



Seafile/Seahub is now successfully installed.

At this point, Seafile and Seahub are setup and running properly. (probably =) The next step is setting up an http server. The docs can be followed on this part for setting up Nginx or Apache24, but I will provide a Nginx config as it is what I use.

root@111amd64-test:~ # pkg install nginx
Updating local repository catalogue...
pkg: Repository local load error: access repo file(/var/db/pkg/repo-local.sqlite) failed: No such file or directory
[111amd64-test] Fetching meta.txz: 100% 820 B 0.8kB/s 00:01
[111amd64-test] Fetching packagesite.txz: 100% 93 KiB 95.6kB/s 00:01
Processing entries: 100%
local repository update completed. 381 packages processed.
All repositories are up to date.
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
nginx: 1.14.0_3,2

Number of packages to be installed: 1

The process will require 1 MiB more space.

Proceed with this action? [y/N]: y
[111amd64-test] [1/1] Installing nginx-1.14.0_3,2...
===> Creating groups.
Using existing group 'www'.
===> Creating users
Using existing user 'www'.
[111amd64-test] [1/1] Extracting nginx-1.14.0_3,2: 100%
Message from nginx-1.14.0_3,2:

===================================================================
Recent version of the NGINX introduces dynamic modules support. In
FreeBSD ports tree this feature was enabled by default with the DSO
knob. Several vendor's and third-party modules have been converted
to dynamic modules. Unset the DSO knob builds an NGINX without
dynamic modules support.

To load a module at runtime, include the new `load_module'
directive in the main context, specifying the path to the shared
object file for the module, enclosed in quotation marks. When you
reload the configuration or restart NGINX, the module is loaded in.
It is possible to specify a path relative to the source directory,
or a full path, please see
https://www.nginx.com/blog/dynamic-modules-nginx-1-9-11/ and
http://nginx.org/en/docs/ngx_core_module.html#load_module for
details.

Default path for the NGINX dynamic modules is

/usr/local/libexec/nginx.
===================================================================


root@111amd64-test:~ # cat /usr/local/etc/nginx/nginx.conf
worker_processes 1;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;

server_tokens off;

server {
listen 80;
listen [::]:80;
server_name seafile.example.com;
root /usr/local/www/nginx;

error_page 500 502 503 504 /50x.html;
location = 50x.html {
root /usr/local/www/nginx-dist;
}
location / {
proxy_pass http://127.0.0.1:8000;
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-Host $server_name;
proxy_read_timeout 1200s;

access_log /var/log/nginx/seahub.access.log;
error_log /var/log/nginx/seahub.error.log;
client_max_body_size 0;
}
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://127.0.0.1:8082;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
client_max_body_size 0;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
send_timeout 36000s;
}
}
}


root@111amd64-test:~ # sysrc nginx_enable=YES
root@111amd64-test:~ # service nginx start


You should now be able to access the Seafile server by opening your browser and going to.... http://seafile.example.com or http://<<my ip>>
This setup works for http, but I suggest using https for security, which this guide will not cover. There are plenty of guides and docs that provide the setup for https.

At this point you should be able to see the Seafile website and check out some of the features, however, its likely that uploading and downloading are broken. To fix this, you must fix a few settings in the admin area. Click on the top right avatar and get the drop-down menu. Next, Click System Admin. On the left the menu collum will have a few option, click settings. The SERVICE_URL should be set to the url http://seafile.example.com or http://<<my ip>> and FILE_SERVER_ROOT set to http://seafile.example.com/seafhttp or http://<<my ip>>/seafhttp
When changing to https, this will need to be changed again.

Seafile is now completely installed and working! congratulations! now go setup https and enjoy this great application.
 

rm-r

Member
Joined
Jan 7, 2013
Messages
166
Thanks for your post! based on this I made a script - use at your own risk people, but may help others :)

Its interactive so follow the prompts as seafile asks you, and may need tweaking for your environment.

Steps essentially are;

1, create new jail
2, install pkg into jail before (optional) - running pkg update will do that
3, create a seafile.sh in your jail, copy and paste the script below into the file
4, make the file executable chmod 777 seafile.sh
5, run ./seafile.sh
6, follow the bouncing ball
7, go to https://<serverip>
8, enjoy!


Code:
############### install stuff

pkg install -y apache24 nano wget seahub

sleep 5

############### configuration of seafile user


echo "running setup-seafile.sh"

/usr/local/www/haiwen/seafile-server/setup-seafile.sh

sleep 10

echo "enabling services"

sysrc apache24_enable=yes
sysrc seafile_enable=YES
sysrc seahub_enable=YES

##########################################################
######################### apache #########################
##########################################################

cp /usr/local/etc/apache24/httpd.conf /usr/local/etc/apache24/httpd.conf.bak


############# mod_ssl.so

sed -i -e 's/#LoadModule ssl_module libexec\/apache24\/mod_ssl.so/LoadModule ssl_module libexec\/apache24\/mod_ssl.so/g' /usr/local/etc/apache24/httpd.conf

############ Include etc/apache24/extra/httpd-ssl.conf

sed -i -e 's/#Include etc\/apache24\/extra\/httpd-ssl.conf/Include etc\/apache24\/extra\/httpd-ssl.conf/g' /usr/local/etc/apache24/httpd.conf



echo "Splatting http-ssl.conf"

mv /usr/local/etc/apache24/extra/httpd-ssl.conf /usr/local/etc/apache24/extra/httpd-ssl.conf.script.bak


############ replace httpd-ssl.conf


touch /usr/local/etc/apache24/extra/httpd-ssl.conf


echo "
#
Listen 443

SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES


SSLHonorCipherOrder on

SSLProtocol all -SSLv3
SSLProxyProtocol all -SSLv3

SSLPassPhraseDialog  builtin



<VirtualHost _default_:443>

#   General setup for the virtual host
###############################################

  ServerName localhost
  DocumentRoot /var/www

  SSLEngine On
  SSLCertificateFile /usr/local/etc/apache24/cert.pem
  SSLCertificateKeyFile /usr/local/etc/apache24/key.pem

  Alias /media  /home/user/haiwen/seafile-server-latest/seahub/media

  <Location /media>
    Require all granted
  </Location>

  RewriteEngine On

  #
    # seafile fileserver
  #
  ProxyPass /seafhttp http://127.0.0.1:8082
  ProxyPassReverse /seafhttp http://127.0.0.1:8082
  RewriteRule ^/seafhttp - [QSA,L]

  #
  # seahub
  #
  SetEnvIf Authorization \"\(\.\*\)\" HTTP_AUTHORIZATION=$1
  ProxyPreserveHost On
  ProxyPass / http://127.0.0.1:8000/
  ProxyPassReverse / http://127.0.0.1:8000/


LoadModule proxy_html_module libexec/apache24/mod_proxy_html.so

LoadModule rewrite_module libexec/apache24/mod_rewrite.so

LoadModule proxy_module libexec/apache24/mod_proxy.so

LoadModule xml2enc_module libexec/apache24/mod_xml2enc.so

LoadModule proxy_http_module libexec/apache24/mod_proxy_http.so

LoadModule proxy_fdpass_module libexec/apache24/mod_proxy_fdpass.so


###################################################

<FilesMatch "\.(cgi|shtml|phtml|php)$">
    SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/usr/local/www/apache24/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>

BrowserMatch "MSIE [2-5]" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

CustomLog "/var/log/httpd-ssl_request.log" \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>" > /usr/local/etc/apache24/extra/httpd-ssl.conf



############### generate certs

openssl req -x509 -days 22365 -newkey rsa:4096 -keyout /usr/local/etc/apache24/key.pem -out /usr/local/etc/apache24/cert.pem -nodes -subj "/C=NZ/ST=NZ/L=NZ/O=Company Name/OU=Org/CN=www.example.com"





sleep 10
echo "starting seafile"
service seafile start
sleep 10
echo "starting seahub"
service seahub start
sleep 10

echo "running reset-admin.sh"

/usr/local/www/haiwen/seafile-server/reset-admin.sh

sleep 5
echo "starting apache"
service apache24 start

echo "All done - go to https://<serverip> in your browser, and login with the credentials you just set"
echo "for the mobile client make sure you set FILE_SERVER_ROOT as https://<serverip>/seafhttp in your web UI, or you will get errors"
 

ThreeDee

Senior Member
Joined
Jun 13, 2013
Messages
506
I'm going to give this a go ..thanks a bunch!
 

rm-r

Member
Joined
Jan 7, 2013
Messages
166

ThreeDee

Senior Member
Joined
Jun 13, 2013
Messages
506
great how did you get on?
Sucked into the OverTime blackhole at my work .. hopefully I'll get to "play" soon though and I will chime in here again when I get it going or need help . appreciate your work!
 

Cam Alliance

Neophyte
Joined
Sep 14, 2016
Messages
4
I'm going to be trying this script out today.... one question? Does it have the ability to use mysql57-server as the database or does that have to be done manually?
 

sremick

Senior Member
Joined
Sep 24, 2014
Messages
319
With the news that free Dropbox will switch from unlimited to 3 clients, I'm going to seriously pursue this. My main concern though are the ramifications of exposing my NAS to the internet via whatever ports Seafile will need me to open/forward on the router.
 

killed2

Newbie
Joined
Jul 14, 2019
Messages
1
I am stuck at the seafile setup, perhaps anyone can help me.
Code:
Seahub is the web interface for seafile server.
Now let's setup seahub configuration. Press [ENTER] to continue
-----------------------------------------------------------------


Creating database now, it may take one minute, please wait...

/root
Failed to sync seafile database.


Error occured during setup.
Please fix possible issues and run the script again.



I created a dataset for the seafile files, assigned it to the user seafile, created a jail and assigned the mount-point.
Then I both tried the manual setup and the script. I have no idea what's wrong.
 
Last edited:

sremick

Senior Member
Joined
Sep 24, 2014
Messages
319
I've hit a snag. I haven't gotten as far as installing nginx yet. I'm trying to run reset-admin.sh. I get:

Code:
root@Seafile:/usr/local/www/haiwen/seafile-server # ./reset-admin.sh
E-mail address: xxxxx@xxxxxx.xxx
Password:
Password (again):
Traceback (most recent call last):
  File "/usr/local/www/haiwen/seafile-server/seahub/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/local/www/haiwen/seafile-server/seahub/seahub/base/management/commands/createsuperuser.py", line 150, in handle
    User.objects.create_superuser(email, password)
  File "/usr/local/www/haiwen/seafile-server/seahub/seahub/base/accounts.py", line 71, in create_superuser
    u = self.create_user(email, password, is_staff=True, is_active=True)
  File "/usr/local/www/haiwen/seafile-server/seahub/seahub/base/accounts.py", line 61, in create_user
    return self.get(email=email)
  File "/usr/local/www/haiwen/seafile-server/seahub/seahub/base/accounts.py", line 99, in get
    raise User.DoesNotExist, 'User matching query does not exits.'
seahub.base.accounts.DoesNotExist: User matching query does not exits.


FreeBSD 11.2-STABLE

(PS: note the typos in the error... "exits" instead of "exists". That should probably get fixed too)
 

sremick

Senior Member
Joined
Sep 24, 2014
Messages
319
Bump. Still having this issue, even with the latest ports updates.
 

Ultima

Newbie
Joined
May 30, 2018
Messages
2
Hello @sremick,

This issue was fixed on August 21st in net-mgmt/seafile-server version 7.0.4_1. There were some new files that were added in the 7.0.x release and the permissions are not set correctly when setting up a new instance. chown -R seafile:seafile /usr/local/www/haiwen/ccnet should fix the issue, but if it doesn't, starting from scratch should work.

If it doesn't, please contact me so it can be addressed.
 

Harry1975

Newbie
Joined
Oct 9, 2019
Messages
1
Sharing my experience:
I installed via pkg in a jail.
Problem: The reset-admin script didn´t work for me as there was no admin account created during installation.

Resolution:
I had to manually run this command to add an admin account.
/usr/local/www/haiwen/seafile-server/seahub/tools/seahub-admin.py

p.s:
Script will ask for CCNET Directory - the default should bet /usr/local/www/haiwen/ccnet
 

Lessbones

Junior Member
Joined
Oct 17, 2016
Messages
22
I'm getting an error about a misplaced '"' in the script on post 2-- It seems to be in the section for httpd-ssl.conf, but I'm not having any success figuring out which one is incorrect... Can anyone help me out here?

thanks guys
 

Hizar

Newbie
Joined
May 25, 2019
Messages
1
I'm going to be trying this script out today.... one question? Does it have the ability to use mysql57-server as the database or does that have to be done manually?
SEAFILE SERVER RUNNING on FreeNAS 11.2 (Stable) JAIL USING MARIADB (MySQL) Database instead of SQlite

I used the above post from 'ultima' but substituted MariaDB (you could also use MySQL but I've heard MariaDB is more actively developed). SQlite worried me because from what I've read, if your DB goes over 1TB then you run into problems. I have 5TB of data to host on Seafile (not sure how big that will make the database, but didn't want to have to redo all this in case..)

The below uses default locations in a FreeNAS jail that I made as a test.. In Production I would use a mount point from a dataset for /var to store my DB backups and another mount for /usr/local/www to keep my files safe.

For editing files, I use 'vi' which comes preinstalled in a jail. If you prefer to use 'nano' then install it after creating your jail.

pkg install nano

After using FreeNAS front-end to create the jail and giving it a static IP, I did the following:

MariaDB Install

1. pkg update
2. pkg search mariadb (see what the latest versions available are and use the full name as shown in the next step- for me it was *-5.5.66)
3. pkg install nano mariadb55-server-5.5.66 mariadb55-client-5.5.66
4. sysrc mysql_enable=YES
5. sysrc mysql_pidfile=/var/db/mysql/mysql.pid
6. sysrc mysql_optfile=/usr/local/etc/my.cnf
7. vi /usr/local/etc/my.cnf

<and put the below in it>

## SERVER ##
[mysqld]
datadir = /var/db/mysql
socket = /var/db/mysql/mysql.sock
pid-file = /run/mysql/mysql.pid
log-error = /var/db/mysql/mysql-error.log
log-queries-not-using-indexes = 1
slow-query-log = 1
slow-query-log-file = /var/db/mysql/mysql-slow.log


8. service mysql-server start
9. ln -s /var/db/mysql/mysql.sock /tmp/

MariaDB Setup
10. /usr/local/bin/mysql_secure_installation <set root password during this process>
11. mysql -uroot -p <enter root password>

<and execute these database commands>

CREATE DATABASE `ccnet-db` character set = 'utf8';
CREATE DATABASE `seafile-db` character set = 'utf8';
CREATE DATABASE `seahub-db` character set = 'utf8';
CREATE USER 'seafile'@'localhost' identified by 'seafilepassword';
GRANT ALL PRIVILEGES ON `ccnet-db`.* to `seafile`@localhost;
GRANT ALL PRIVILEGES ON `seafile-db`.* to `seafile`@localhost;
GRANT ALL PRIVILEGES ON `seahub-db`.* to `seafile`@localhost;

Seafile Install & Setup
12. pkg install seahub
13. cd /usr/local/www/haiwen/seafile-server
14. ./setup-seafile-mysql.sh <answer the questions asked, make sure you set the IP address of your host>
15. sysrc seafile_enable=YES
16. sysrc seahub_enable=YES
17. service seafile start
18. service seahub start
19. ./reset-admin.sh <and set up an admin email address and password for Seafile>

NGINX Install & Setup
20. pkg install nginx
21. /usr/local/etc/nginx/
22. mv nginx.conf nginx.conf.old
23. vi nginx.conf

<and put the below in it>

worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
server_tokens off;
server {
listen 80;
listen [::]:80;
server_name seafile.example.com;
root /usr/local/www/nginx;
error_page 500 502 503 504 /50x.html;
location = 50x.html {
root /usr/local/www/nginx-dist;
}
location / {
proxy_pass http://127.0.0.1:8000;
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-Host $server_name;
proxy_read_timeout 1200s;


24. sysrc nginx_enable=YES
25. /usr/local/etc/nginx/nginx.conf


Testing & Log files

Try surfing to http://seafileserver_IP_address (don't need the port because NGINX will handle it)

If you see an error like this:

Page unavailable due to a server hiccup after login

then do the following and try again:

chown www:www /tmp/seahub_cache
service seafile restart
service seahub restart

If that doesn't work, try:

chmod 777 /tmp/seahub_cache
(Not sure if there are security issues with doing the above)

service seafile restart
service seahub restart

If things still don't work, check the errors in the following logs:

/usr/local/www/haiwen/logs/seafile.log
/usr/local/www/haiwen/logs/controller.log
/usr/local/www/haiwen/logs/ccnet.log
/usr/local/www/haiwen/logs/seahub.log

and

/var/log/nginx/seafile.log
/var/log/nginx/seahub.log
/var/log/nginx/error.log
/var/log/nginx/access.log
 

Jeremy MItchell

Neophyte
Joined
Oct 23, 2016
Messages
9
I just successfully installed the MariaDB version following the procedure from Hizar. I did find 2 small errors in the process that I thought future readers might want to know about:

The Nginx configuration is missing the last two lines, which should both be '}', otherwise Nginx will complain and refuse to start.

Step 25 should be:
Code:
service nginx start
 

NinthWave

Junior Member
Joined
Jan 9, 2021
Messages
14
Hello everyone,

A FreeNAS user has messaged me requesting assistance on installing Seafile in a FreeBSD jail. Instead of keeping the setup private, I decided to post the process here to assist anyone else that may have an issue. I run this process before every minor and major version update to verify everything is working properly and hopefully this will help anyone else run Seafile without issues.
As of today, it says on the Seafile Website that it supports Ubuntu and Debian. You have made it possible to make it work in a FreeBSD jail.

In order to run an other app, namely: AssetUPnP server, I created a Debian10 VM since I am not competent enough in Linux to make it work in a Jail.

Should I install the Seafile server in the Debian10 VM or follow these instructions to put it a jail ? What would be pros and cons of both method ?

Thanks
 

NinthWave

Junior Member
Joined
Jan 9, 2021
Messages
14
@Harry1975, @Jeremy MItchell
As I had no answer, I decided to go along with the FreeBSD Jail. Everthing seems fine until I try to access the server. I get this error message.

Any idea how to solve that. Firefox help doesn't show any way around.
1614786922818.png
 

NinthWave

Junior Member
Joined
Jan 9, 2021
Messages
14
Thanks for your post! based on this I made a script - use at your own risk people, but may help others :)

Its interactive so follow the prompts as seafile asks you, and may need tweaking for your environment.

Steps essentially are;

1, create new jail
2, install pkg into jail before (optional) - running pkg update will do that
3, create a seafile.sh in your jail, copy and paste the script below into the file
4, make the file executable chmod 777 seafile.sh
5, run ./seafile.sh
6, follow the bouncing ball
7, go to https://<serverip>
8, enjoy!
After creating the Jail, should one use "Mountpoints of Jail" or the data stays under Iocage ?

I want to sync "My documents" on Windows using Seafile.
I would like those files to Backup to Backblaze B2. It would be easier if the files were in a dataset "Documents" rather than in the jail.

1614812959158.png
 

ultrask14

Junior Member
Joined
Mar 4, 2021
Messages
14
completing stage 14 im greeted with the following error:
Error: Failed to connect to mysql database ccnet-db: Access denied for user 'sea file'@'localhost' (using password: YES)

any ideas?
 
Top