Seahub service start problems

Hi i am trying to start seahub 7.0.5 on my raspberry pi 4 and was getting this error

LC_ALL is not set in ENV, set to en_US.UTF-8
./ line 208: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
Starting seahub (fastcgi) at …
Traceback (most recent call last):
File “/home/jonathan/temp/seafile-server-7.0.5/seahub/”, line 10, in
File “/home/jonathan/temp/seafile-server-7.0.5/seahub/thirdpart/Django-1.11.16-py2.7.egg/django/core/management/”, line 364, in execute_from_command_line
File “/home/jonathan/temp/seafile-server-7.0.5/seahub/thirdpart/Django-1.11.16-py2.7.egg/django/core/management/”, line 338, in execute
File “/home/jonathan/temp/seafile-server-7.0.5/seahub/thirdpart/Django-1.11.16-py2.7.egg/django/”, line 27, in setup
File “/home/jonathan/temp/seafile-server-7.0.5/seahub/thirdpart/Django-1.11.16-py2.7.egg/django/apps/”, line 85, in populate
app_config = AppConfig.create(entry)
File “/home/jonathan/temp/seafile-server-7.0.5/seahub/thirdpart/Django-1.11.16-py2.7.egg/django/apps/”, line 94, in create
module = import_module(entry)
File “/usr/lib/python2.7/importlib/”, line 37, in import_module
File “/home/jonathan/temp/seafile-server-7.0.5/seahub/thirdpart/social_django/”, line 4, in
from social_core.backends.base import BaseAuth
File “/home/jonathan/temp/seafile-server-7.0.5/seahub/thirdpart/social_auth_core-1.7.0-py2.7.egg/social_core/backends/”, line 3, in
from requests import request, ConnectionError
File “/home/jonathan/temp/seafile-server-7.0.5/seahub/thirdpart/requests-2.20.1-py2.7.egg/requests/”, line 112, in
from . import utils
File “/home/jonathan/temp/seafile-server-7.0.5/seahub/thirdpart/requests-2.20.1-py2.7.egg/requests/”, line 24, in
from . import certs
File “/home/jonathan/temp/seafile-server-7.0.5/seahub/thirdpart/requests-2.20.1-py2.7.egg/requests/”, line 15, in
from certifi import where
ImportError: No module named certifi

I then tried to create a unit called seahub.service inside etc/systemd/system with the followin:

Description=Seafile hub seafile.service


change start to start-fastcgi if you want to run fastcgi

ExecStart=/home/jonathan/temp/seafile-server-7.0.5/ start-fastcgi
ExecStop=/home/jonathan/temp/seafile-server-7.0.5/ stop


I then got this error when executing sudo systemctl daemon-reload and sudo systemctl start seahub.service

Job for seahub.service failed because the control process exited with error code.
See “systemctl status seahub.service” and “journalctl -xe” for details.

And the output for checking the status logs via sudo journalctl -u seahub.service is below:

Oct 23 19:38:38 raspberrypi systemd[1]: Starting Seafile hub…
Oct 23 19:38:38 raspberrypi systemd[6309]: seahub.service: Failed to determine user credentials: No such process
Oct 23 19:38:38 raspberrypi systemd[6309]: seahub.service: Failed at step USER spawning /home/jonathan/temp/seafile-s
Oct 23 19:38:38 raspberrypi systemd[1]: seahub.service: Main process exited, code=exited, status=217/USER
Oct 23 19:38:38 raspberrypi systemd[1]: seahub.service: Failed with result ‘exit-code’.
Oct 23 19:38:38 raspberrypi systemd[1]: Failed to start Seafile hub.

Hi jonneymendoza,

the first error message is easy. ImportError: No module named certifi means that the Seafile system is missing this python package.
Try installing the package with sudo pip install certifi and then restart Seafile.

the second error message is also simple: failed to determine user credentials: No such process
Seahub needs a started Seafile and simply reports that Seafile is not running yet.

The procedure must therefore be:

  • fix all issues with seafile
  • start seafile
  • start seahub

happy testing. :slight_smile:
Best regards

Hi i did the following.

sudp pop install certifi
sudo ./ stop
sudo ./ start
sud ./seahub.start

When i tried to start seahub again i got the same ```ImportError: No module named Image

Hey jonneymendoza,

I hope you use sudo pip install ad not sudp pop :-).
Well I think it is clear what you have to do. There is another missing python library and you have to install them. You can try pip install image. If that is not working, google for packagename + python + raspberry pi. This will help you to identify the necessary python packages.

Best regards

Brilliant thanks it worked!

So i have the seafile and seahub running but i cant seem to access it on my other machine via the client i installed on my windows based machine.

the port i am using for seafile is 8085 and the seahub seems to be set at 8000.

I added both ports in my router for port forwarding and tried to connect to the sea file server via the pi’s local ip address( with either 8000 or 8085 port and no joy. It does not seem to hit the server or the server not quite active/setup?

I also tried to see if i can locally ping into the seafile via “ping https://localost:8000” and no joy either via ssh into the the pi device

Hi jonneymendoza,

sorry, but now you mixed so many things and all are related to basic understanding of ip-networks. Let me try to give you some guidance:
(I made a video about these topic but it is german:

So what is wrong:

  • you don’t open port 8085 and 8000 at your router. You use a webserver as proxy and you only access seafile via port 80 (http) or 443 (https)
  • you can not access a server over the internet with the local ip. 192.168.x.x is only accessable on LAN
  • https:// requires a certificate and a webserver. I don’t think you have one
  • localhost means = local computer. So your windows will try to access seafile on itself. This will not work.

what do you have to do:

  1. you have to decide if you want to access seafile only from the same network (=lan) via IP-Adresse or access from everywhere via URL
  2. you should not use seafile without a webserver (nginx or apache). This webserver is responsible for https.

I don’t want to be harsch, but your should build up a little bit more knowledge on networks before you are ready to build, host and maintain your own seafile server.

Best regards

Hi. i already have knowledge on network :slight_smile:
I Think i did not explain myself well so i will try again.

After starting up both the seafile an seahub i tried to connect to via LAN.

i have the seafile server running on a pi and the client app installed on a seperate windows laptop.

I installed this client and then tried to connect to it using using http and https . Both did not work.

I then SSH into my pi 4 and tried to launch that PING command through basically the pi device using localhost .

The ports are forwarded on my router the same way i have forwarded ports for other web services i run on my pi and those web services work fine.

I am trying to connect to this via LAN first before i tackle seeing how to connect via outside of LAN.

please post the output of netstat -tulpn from your pi.
Best regards

Sure ok here it goes

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0* LISTEN 659/python
tcp 0 0* LISTEN -
tcp 0 0* LISTEN -
tcp 0 0* LISTEN -
tcp 0 0* LISTEN 649/python
tcp 0 0* LISTEN 649/python
tcp 0 0* LISTEN -
tcp 0 0* LISTEN -
tcp 0 0* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 :::445 :::* LISTEN -
tcp6 0 0 :::64319 :::* LISTEN 649/python
tcp6 0 0 :::139 :::* LISTEN -
udp 0 0* 649/python
udp 0 0* 649/python
udp 0 0* 649/python
udp 0 0* 649/python
udp 0 0* 649/python
udp 0 0* 649/python
udp 0 0* 649/python
udp 0 0* -
udp 0 0* 649/python
udp 0 0* 649/python
udp 0 0* 649/python
udp 0 0* 649/python
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp 0 0* 649/python
udp 0 0* -
udp6 0 0 :::64319 :::* 649/python
udp6 0 0 :::35828 :::* -
udp6 0 0 fe80::d03a:7464:41:6771 :::* 649/python
udp6 0 0 ::1:6771 :::* 649/python
udp6 0 0 :::6771 :::* 649/python
udp6 0 0 fe80::d03a:7464:4:56510 :::* 649/python
udp6 0 0 ::1:41666 :::* 649/python
udp6 0 0 :::5353 :::* -

Thanks for your help in advance. appreciate it

this is the relevant part:
tcp 0 0 LISTEN -*

This means that the seafile server only accepts requests from what means his self.
Go to seafile-folder/conf/guniconf.conf and change to Then restart seafile and your should be able to access seafile from your windows client with:

If this works, the next step should be to add a webserver to change the access to https://ip-of-seafile-server (without :8000)

Best regards

sorry it must be: gunicorn.conf. not guniconf.conf.

Just another hint:
As soon as you added a webserver, don’t forget to change back gunicorn.conf to to prevent direct access to seafile.

Ok brilliant that worked!

However, i am able to login via the web browser but on the actual Seafile window client program, i keep getting an "failed to login: internal server error.

After i can successfully login using the client i will try and add this in the apache web server.

I kind of thought that the python script would have set all this up for me but i guess there is more setting up to do so