Documentation, Manual Install, suggestions

@rdb, thanks for your responses to my topics, particularly the second one on documentation. This one is for suggestions about Installation with MySQL - Seafile Admin Manual .
Where I went wrong is at

Tip: If you have little experience with Seafile Server, we recommend that you use an installation script for deploying Seafile.

I went off and ran the script without installing mysql and the other dependencies first. I suggest you remove that line from the document, so people will install mysql and the other dependencies first. (After the prerequisites section, your document already points us to the setup script,

I suggest you add to this line:

Seafile prior to and including Seafile 7.0 use Python 2. More recent versions rely on Python 3.

“Choose the instructions below that are relevant for your system:”

I suggest you add sudo at the beginning of the line

mkdir /opt/seafile

The following adduser and chown commands will also need to run as root, I think, so I suggest you add sudo at the beginning of each of them also. Experienced system administrators will know that and can add sudo where needed, but so that less experienced users of SeaFile can just copy a whole command and paste it, I think the sudo commands would help in the documentation.

When it comes to downloading the security key, the new user seafile needs to be able to use sudo, so I suggest you add, straight after the adduser command, this one:

sudo usermod -aG sudo seafile

For the command

su seafile

I suggest you change it to

su -l seafile

so the new shell running as the user seafile will be regarded as a login shell, and will pick up seafile’s environment, and the command line history will work proplerly.

Your line:

Download the install package from the download page on Seafile’s website using wget.

took me to a page where I clicked on the link Client for Linux instead of getting the Server package. (Seems I’ll get things wrong if I possibly can :slight_smile: ) I think it would be helpful if your document says to scroll down to the Server section and click the link for the relevant version under Server for generic Linux. (Perhaps this page has changed since you updated your documentation page.) Downloading this file doesn’t need wget.

I was working through the client install instructions (incorrectly), and that did involve using wget to install the key for the software repository. (Not needed for downloading the tar file.) When I ran the command to install the debug symbols, I got two error messages:

Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package ccnet-dbg
E: Unable to locate package libccnet-dbg

It seems I don’t have the right software source listed to get these two. I have searched online but have not found what source I need to add. I have asked a question at Ask Ubuntu, and if I get an answer I’ll add something here. – yes, I did get an answer, at StackExchange: " The package libccnet-dbg is not available for any release of Ubuntu". So would you like to ask the maintainer of the client-installation page to look into whether or not those two -dbg items are needed, and perhaps remove them from that page.

When I got to the point of running the correct setup script,, it worked well till it got to accessing the database. It was not able to log in to mysql as root@localhost. In a separate terminal window I was able to log in with

sudo mysql -u root -p

and this made me think that mysql was still using the authentication method based on the Linux account of the person trying to log in, instead of with mysql_native_password. So I went back to your documentation and found the bit where you say that the the tutorials on the Digital Ocean website show how to change the authentication method to mysql_native_password. I searched there but couldn’t find out how to do that. I had previously worked through the tutorial for installing mysql for Ubuntu 20.04, but that contains nothing about setting the authentication method to mysql_native_password.
But I did find an answer at Stack Overflow that included the mysql commands to do that. I suggest you add these to the documentation where you talk about setting this authentication method.

sudo mysql -u root -p

and then at the mysql prompt:

ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;

The reader should change password to a sensible password, of course :slight_smile:

Would it be appropriate to add the commands for creating the user seafile@localhost with mysql_native_password also?

I’ll send this off now, and may have more suggestions later. Thanks for all your good work on the documentation.


Hi Jim,
at the very latest after the release of Seafile 9 - scheduled for the end of the year - I’ll revise the manual and take your valuable comments into consideration.

Just for clarification right here:

  • This reference in the install instructions
    Tip: If you have little experience with Seafile Server, we recommend that you use an installation script for deploying Seafile.”
    is NO pointer to the It links to a series of scripts that are capable of installing various versions of Seafile (including all prerequisites) on different OS platforms. Please check that.
  • You say: “Downloading this file doesn’t need wget.” My question is: Where did you install Seafile Server? When you install Seafile Server on a Linux OS without GUI, you definitely need wget. And even if you have an OS with desktop environment, it is advisable to just follow the instructions.
  • You made things way too complicated. wgetting and untarring the package is all you have to do. This said, I hear you. The corresponding section in the install instructions of Seafile Professional is more detailed. I will copy that over.

Thanks again, @rdb , I did indeed make things far too complicated for myself by reading about installing the client software, when it was the server software I needed to install.

Hi again, @rdb , some more suggestions for the documentation.

When the setup script came to making the mysql user to operate the seafile database, seafile by default, I got these errors:

Enter the name for mysql user of seafile. It would be created if not exists.
[ default “seafile” ] seafile
Enter the password for mysql user “seafile”:
[ password for seafile ]
verifying password of user seafile …
Failed to connect to mysql server using user “seafile” and password “***”: Access denied for user ‘seafile’@‘localhost’ (using password: YES)
Enter the name for mysql user of seafile. It would be created if not exists.

It seems to me that it would be helpful for the documentation to contain an instruction for where that happens for the user to open another terminal window and do

mysql -u root -p

and at the mysql prompt enter

CREATE USER ‘seafile’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;

where “password” should be replaced with a good password that the user chooses for the seafile account.

I did that, and the setup script has now moved on to the next question.

(By the way, the markdown formatter used by this forum software is very good, but it replaces straight quotes with smart quotes. So if I copy a command like the one above to the clipboard and paste it into mysql, it doesn’t work, because mysql is expecting straight quotes, not smart quotes. Do you know of a way of preventing the display of straight quotes as smart quotes?)

Concerning telling mysql to use mysql_native_password for the Seafile databases, I read somewhere that this can be achieved by setting a variable in a file with a name like mysql.cnf, but the writer did not say where I would find this file. (My system now has about 5 of them, from the different attempts I have made at installing SeaFile.) And, it seems to me, that setting would apply to all databases, not just the SeaFile ones, and other products might want to use the standard password authentication for Ubuntu. Do you have comments on that?

Enough for now. I may have other suggestions later.

1 Like

Another point, @rdb, you have included lots of helpful notes on how to answer the questions that the setup script asks, but I have only noticed them now!

I suggest that you put something just above

Run the script as user seafile:

perhaps something like When you run the setup script it will ask you lots of questions. I have provided notes about how you may choose to answer them in the tables below the next commands:

An example of where it is important that the user read your comments before answering each question is with passwords. You say that the password can’t contain “%”, and I found that was correct! I had set up a password that contained “%” and got an exception from the python script.

Enough for now.