Actual instructions to set up own sync server

Anything to do with the Pale Moon Sync service.
User avatar
sabretoothedhamster
Moongazer
Moongazer
Posts: 10
Joined: 2019-09-04, 11:45

Actual instructions to set up own sync server

Unread post by sabretoothedhamster » 2021-07-15, 09:09

Hello!

Would someone point me out to currently actual instructions on how to setup my own sync server for the latest PaleMoon (Basilisk) browser? I tried to search through the forum but without a clear outcome (many versions/variants were reported over the time but no clear indication which one is finally ok).

P.S. docker is the best, but other step by step descriptions are ok as well...

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 10656
Joined: 2012-10-09, 19:37
Location: Robotropolis

Re: Actual instructions to set up own sync server

Unread post by New Tobin Paradigm » 2021-07-15, 09:26

Figure it out. Also no one here likes moron turnkey non-solutions like docker.
What do you mean "not exactly"? Either there is, or there isn't.
Image

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 31097
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Actual instructions to set up own sync server

Unread post by Moonchild » 2021-07-15, 12:02

Create a LEMP stack and use https://repo.palemoon.org/Moonchild/FSyncMS
I had 0 trouble figuring that out in less than an hour when I first set up Pale Moon Sync (and the Sync server code has since then improved too).
FSyncMS even comes with a setup php script that creates the database for you and everything.

And no, docker is terrible because it almost invariably (1) prevents admins from understanding what exactly they are running and therefore cannot maintain it, and (2) leads to insecure, vulnerable and exploited setups causing tons of grief for the Internet community at large.
So, no, I will never create docker images for any of the services I've created/set up. If you as an admin can't be bothered to spend an hour to set up your service and understand it, then IMO you do not deserve to be an admin of those services.
"Remember, only you can prevent Earth's destruction by spelling Pale Moon with a space." -- Athenian200
Image

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 10656
Joined: 2012-10-09, 19:37
Location: Robotropolis

Re: Actual instructions to set up own sync server

Unread post by New Tobin Paradigm » 2021-07-15, 12:05

Maybe when I am not busy with other things like skeeping I will go through the simple process and create a basic document. Or someone else can. The Selene git repo ain't difficult to use.
What do you mean "not exactly"? Either there is, or there isn't.
Image

User avatar
sabretoothedhamster
Moongazer
Moongazer
Posts: 10
Joined: 2019-09-04, 11:45

Re: Actual instructions to set up own sync server

Unread post by sabretoothedhamster » 2021-07-15, 15:58

I was (supposedly) able to install https://repo.palemoon.org/Moonchild/FSyncMS but then I get stuck at quite a strange point: at about:preferences#sync page I went "Set Up Pale Moon Sync" link, entered my e-mail and password but the 'Server' field does not accept my data (https://my.server.tld:1234/fsync) saying "Please enter a valid server URL".
I really can not figure out why my server URL is not valid. I tried various changes but with no luck. I can not even find what is particularly wrong since that error seemingly pops up at random.

P.S. https://pmsync.palemoon.org/sync/index.php/ within this field is accepted ok.

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 10656
Joined: 2012-10-09, 19:37
Location: Robotropolis

Re: Actual instructions to set up own sync server

Unread post by New Tobin Paradigm » 2021-07-15, 17:04

You are on your own.
What do you mean "not exactly"? Either there is, or there isn't.
Image

User avatar
sabretoothedhamster
Moongazer
Moongazer
Posts: 10
Joined: 2019-09-04, 11:45

Re: Actual instructions to set up own sync server

Unread post by sabretoothedhamster » 2021-07-15, 17:42

Can't say that setup process is user-friendly (can't even say that it is admin-friendly) but I finally made it to the end.
Just a few postmortem notes (for those who will eventually got to this post googling the same receipt):
1. "Please enter a valid server URL" does not mean that your URL is not good itself (e.g. has wrong syntax), but that sync setup form checks given URL in realtime, posting API requests, and will not accept given URL unless it will receive appropriate response (so to look at apache's access.log and error.log during Basilisk sync setup is quite handy)
2. Beware, that that blog at www.ohnekontur.de that is supposed to be the source of installation instructions, is in German, and by fact is not an instruction. There is a setup.php in recent FSyncMS that have to be run first (and then removed), and an Alias, that should reflect your own local apache setup, together with FSYNCMS_ROOT (which setup.php may not discover correctly when your server runs on non-regular port).
2. Clean apache/php setup will certainly miss some components that should be installed in advance (in my case php7.2-sqlite3 and php-mbstring).

P.S. Anyway, it finally works almost as expected (no tabs synced), and I have to say Thank you @Moonchild! for the Basilisk development and your efforts to support Basilisk community.

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 10656
Joined: 2012-10-09, 19:37
Location: Robotropolis

Re: Actual instructions to set up own sync server

Unread post by New Tobin Paradigm » 2021-07-15, 19:56

Heh, try Mozilla's original python implementation. It is superfucked :thumbup:
What do you mean "not exactly"? Either there is, or there isn't.
Image

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 31097
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Actual instructions to set up own sync server

Unread post by Moonchild » 2021-07-15, 21:00

sabretoothedhamster wrote:
2021-07-15, 17:42
1. "Please enter a valid server URL" does not mean that your URL is not good itself (e.g. has wrong syntax), but that sync setup form checks given URL in realtime, posting API requests, and will not accept given URL unless it will receive appropriate response (so to look at apache's access.log and error.log during Basilisk sync setup is quite handy)
It does mean that your URL is incorrect, because the sync client in the browser assumes you have already set up the server in a working fashion, and the sync client won't be able to troubleshoot your server or anyone else's. So if it doesn't work, it's assumed to be a wrong URL entered by the user.
sabretoothedhamster wrote:
2021-07-15, 17:42
2. Beware, that that blog at www.ohnekontur.de that is supposed to be the source of installation instructions
No, it is not. It is mentioned as the source of where the server implementation originated and has some additional background information - it is NOT an installation guide and not claimed to be. Please don't twist what I wrote in the readme to be something else.
How is "More information about the original implementation of this server, past versions, etc. can be found here:" in any way "a source of installation instructions"???
sabretoothedhamster wrote:
2021-07-15, 17:42
2. Clean apache/php setup
2 (bis)? :D
I did say install a LEMP stack. I am assuming you will install the full stack meaning a fully decked-out PHP (including the MySQL connector modules for PHP etc.), as well as nginx, not Apache. There are plenty of step-by-step guides on the net available for that. You could use LAMP but I have no experience with it and I advise against Apache if the primary task of the web server is to be a front-end for a proxied service as opposed to hosting websites.
You also don't need sqlite unless you choose to use sqlite as the back-end instead of MySQL (M in LEMP stands for MySQL, so assuming you are installing a full db server).

I think you may need to educate yourself a bit more about what I suggested and actually do some more research. Like I said before knowing what you run is important which is why I don't do docker. Don't expect a non-prechewed installation to be set up and understood in an hour, it won't happen. Take your time, understand what what you're doing, don't take shortcuts, understand what I said and feel free to ask -specific- questions if you really can't figure something out after exhausting the obvious self-help resources at your disposal.
"Remember, only you can prevent Earth's destruction by spelling Pale Moon with a space." -- Athenian200
Image

User avatar
sabretoothedhamster
Moongazer
Moongazer
Posts: 10
Joined: 2019-09-04, 11:45

Re: Actual instructions to set up own sync server

Unread post by sabretoothedhamster » 2021-08-18, 10:02

JFYI, it seems, that Firefox sync somehow conflicts with Session Manager 0.8.1.14 (or with tab management at all). My set of currently open tabs significantly (more than twice) decreased over a few recent Basilisk restarts/crashes. Explicitly saved sessions are seemingly ok.

Just beware! Can not say the reason right now. Will check when an how it happens...

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 3479
Joined: 2015-12-09, 15:45
Contact:

Re: Actual instructions to set up own sync server

Unread post by moonbat » 2021-08-21, 07:08

Why would you expect it to work with Firefox sync which is incompatible with what Pale Moon and Basilisk use?
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 20.1 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Code deep diver
New to the forum
New to the forum
Posts: 2
Joined: 2021-09-12, 13:56

Re: Actual instructions to set up own sync server

Unread post by Code deep diver » 2021-09-12, 16:35

Dear PaleMoon community,
im a Linux newbie. But following these instructions here and doing some self-education I managed it to install a LEMP stack on Ubuntu 18.04. Standard Port 80 http, no SSL.
Installed FSyncMS v0.16 from repository https://repo.palemoon.org/Moonchild/FSyncMS.
Executing the setup.php form created the fsync database with success(external MySQL Server).
Also corrected the "FSYNCMS_ROOT" URI-path to the syncserver within settings.php.
But now I'm finally stuck. Struggeling with the invalid URL problem in PaleMoon sync settings.
I suppose it has to do with location block directive of Nginx configuration or URL rewriting.

Maybe someone can give me an advise for a proper setup to deliver the fsync content ?

Location of fsync script files: /var/www/html/fsync

Content of "default" config which is the only active "vhost" :

Code: Select all

server {
        listen 80 default_server;
        listen [::]:80 default_server;
        
	root /var/www/html;

        index index.html index.php index.htm index.nginx-debian.html;

        server_name _;

        location /fsync/ {
                root /var/www/html/fsync;
                try_files $uri $uri/ /fsync/index.php/$args;
        }


        location / {

                try_files $uri $uri/ =404;
        }

        # pass PHP scripts to FastCGI server

        location ~ \.php$ {
        include snippets/fastcgi-php.conf;

        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
        }

        location ~ /\.ht {
                deny all;
        }
}


PaleMoon 29.4
Nginx 1.14.0

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 31097
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Actual instructions to set up own sync server

Unread post by Moonchild » 2021-09-13, 18:37

Setting it up under nginx can be a little tricky because you need to set up the php environment in a specific way.

I'll share the relevant blocks of my configuration here. I hope they help you sort it out:

Code: Select all

    location / {
        try_files $uri $uri/ /sync/index.php/$args;
    }

    location ~ ^.+\.php {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        try_files $fastcgi_script_name =404;

        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        include /etc/nginx/fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_buffers 16 16k; 
        fastcgi_buffer_size 32k;
        fastcgi_read_timeout 900;
    }
"Remember, only you can prevent Earth's destruction by spelling Pale Moon with a space." -- Athenian200
Image

User avatar
Code deep diver
New to the forum
New to the forum
Posts: 2
Joined: 2021-09-12, 13:56

Re: Actual instructions to set up own sync server

Unread post by Code deep diver » 2021-09-18, 19:26

Hi All,

using the php configuration from Moonchild is recommended. As logical consequence also enable PHP to use a TCP connection.
This is done in /etc/php/7.0/fpm/pool.d/www.conf add the line listen = 127.0.0.1:9000
Comment the line with the FPM socket ...php7.x-fpm.sock... to disable it.

Second step required in my case was to install and enable the mbstring extension:

Code: Select all

sudo apt install php-mbstring
subsequently uncomment the extension=mbstring line in php.ini

Post Reply