Self-hosted Zotero, how to make windows client use it?

Hi,
I am trying to set-up a self-hosted Zotero (on a linux docker). Got pretty far I think, using https://github.com/foxsen/zotero-selfhost and https://github.com/SamuelHassine/zotero-prime.git
But how do I make my Zotero Windows client use this self-hosted server for syncing, user management etc...?
I found some hints here https://groups.google.com/g/zotero-dev/c/MEwLaptJIzI/m/PVDAFJiqEgAJ
I already located the resource/config.js within the zotero.jar.

It looks like this:
https://s3.amazonaws.com/zotero.org/images/forums/u13751312/iozse4rxi2b8jwzokkiu.png

There are many URLs linking to zotero.org, stream.zotero.org etc...

Which ones of these do I have to change to my self hosted server?
The guidance on github by foxsen mentions different ports, too:

https://s3.amazonaws.com/zotero.org/images/forums/u13751312/ipq4nwi0ggo8sxvouuu5.png

(localhost will of course be replaced by my respective IP)

Which bits in the confic.js do I have to change, and how exactly? Ports needed?

Many thanks

Kevin
  • edited May 28, 2024
    Hi. About a year ago I faced the task of deploying a local server. In the end I managed to deploy it on the basis of foxsen work. Now I continue to develop it further, working on administration tools (user registration, creation of user groups, local web version of the client), as well as struggling with current problems (lack of synchronization of notes and some pdf files).
    As for the windows client: After successful deployment of the server itself, install the zotero client from the official site. Then in the zotero.jar archive you need to change the configuration /resource/config.js, where you need to change the addresses to local links. If you have deployed the server not on the local machine, then you need to replace localhost with your link in the code /chrome/content/zotero/xpcom/storage/zfs.js at params.url. Then synchronization will work. Quite detailed instructions are available from the same foxsen.

    –°hange the following lines in config.js (if you have deployed by foxsen):
    + DOMAIN_NAME: 'your_link',
    + BASE_URI: 'http://your_link:8080/',
    + WWW_BASE_URL: 'http://your_link:8080/',
    + PROXY_AUTH_URL: '',
    + API_URL: 'http://your_link:8080/',
    + STREAMING_URL: 'ws://your_link:8081/',
    That will be enough.

    The only thing that is unlikely to work at once is downloading and processing pdf files. This is due to the fact that init-mysql and scripts in dataserver/misc are outdated and do not meet the modern server request. It will have to be rewritten as well. Honestly, I don't remember what exactly I changed, but you can see it in my fork https://github.com/ilyasoloma/zotero-selfhost.

    P.S. some scripts in my repository are not acutal. Still preparing for the update.
  • edited June 11, 2024
    Dear ilyasoloma,
    many thanks. This aready helped me.
    I have made the changes in the config.js within the zotero.jar

    I also edited the zfs.jar, adding these two lines, as would be done by foxsens patch:

    var url = params.url.replace(/http:\/\/localhost:8082/, 'http://xxx.x.x.xx:4000');
    params.url = url;

    xx.. is my server IP, and 4000 is the port for the S3 Web UI.
    It is not port 8082 as used by foxsen, because I used the repository by victor, who states 4000.
    https://github.com/victoradrianjimenez/dockerized-zotero
    This is more recent. For example, it already uses php 8.3 and not 7.2 as by foxsen and yourself.

    I can now successfully sync the bibliographic data, but file syncing with the S3 minio does not work.
    When trying to sync files, the zotero windows client tries for ages.
    In the minio console, I can see that an object is created for my file. I can see a very small 13 kb .gz file in Minio, but when I download and open it, there is only one 0 kb file in the .gz, and not the (in this case ca. 1.5 MB pdf).

    I have no idea if this is related to the init-mysql and scripts in dataserver/misc - or what to do about them....

    Any thoughts?

Sign In or Register to comment.