[Tutorial] Installing BrickSync on a VPS (Ubuntu 16 x86 64bit)

Here is my tutorial on how to get BrickSync to work on a Ubuntu 16 64Bit VPS so you don't need your computer running 24/7.

This was going to be a tutorial on how to install BrickSync on CentOS but there was a problem with the OpenSSL. BrickSync requires an older version of OpenSSL (1.0.0) but all version of CentOS only support a newer one (1.0.1e) and can't be downgraded.

Requirements:
Server or VPS running Ubuntu 16 64Bit

Installation:
Login to your Ubuntu 16 64Bit server vis SSH. (PuTTY is a good program to use)

Install screen by running the following command:
apt-get install screen
To verify that screen has been installed, run screen -v and you will see something similar to Screen version 4.02.01 (GNU) 28-Apr-14.

Screen is required to to keep BrickSync running when the SSH connection is closed

Now add a user. Never run BrickSync as root, its a security risk
adduser bricksync
now pick a password.

Now we can download unzip BrickSync. And rename the bricksync folder.
wget http://www.bricksync.net/bricksync-linux64-169.tar.gz tar xvfz bricksync-linux64-169.tar.gz mv bricksync-linux64 bricksync rm bricksync-linux64-169.tar.gz

Navergate to the the config file
cd bricksync cd data

Edit the bricksync.conf.txt in a text editor and enter the API keys for both BrickLink and BrickOwl.
vi bricksync.conf.txt
Press the “i” key to insert text into the file.
Now edit the BrickLink configuration and the BrickOwl configuration
Press “Esc” key to return to normal mode to continue navigating through the file.
And to save and close the file type “:wq” on the keyboard

Now navergate back to the main folder of the user you created
cd

Now start a screen Session.
screen
Space two times to continue.

Now the fun part time to Run BrickSync
cd bricksync ./bricksync

If there are no errors you have it all working YAY!

You can close your SSH client.

If you wish to log back on just...
"login as: bricksync" and then resume the screen. This will open BrickSync
screen -r

Any issues? your free to message me any time.

Comments

  • 29 Comments sorted by Votes Date Added
  • Thanks for sharing.
    I run bricksync on a small Netbook I had laying around, but running it on a virtual machine on a server would be the better option for sure.
    The biggest advantagedes for me would be the possibility to access it from everywhere and a more reliable operation.

  • CentOS' SSL can be downgraded. I wouldn't do it, just putting it out there that it's possible.
  • Thanks for that tutorial marshallcomputers!

    Perhaps I would suggest something like nano rather than vi. It's a mighty code editor, but not an intuitive one. :)

    I know I linked against libssl.so.1.0.0 (instead of libssl.so), but that should be backward compatible with libssl.so.1.0.1e. Perhaps you just need a libssl.so.1.0.0 symlink?

    The license of OpenSSL appears to allow static linking (as long as I acknowledge OpenSSL somewhere), so maybe I should just do that in the future.
  • The license of OpenSSL appears to allow static linking (as long as I acknowledge OpenSSL somewhere), so maybe I should just do that in the future.
    That would then require _you_ to release updates for your program whenever OpenSSL finds an issue (for those people who are paranoid enough to require any and all vulns to get patched, even on machines that should never be reachable from the 'Net).

    If I were you, I'd leave things as they are (or maybe try and get rid of the explicit version requirement).

    Niek.
  • Old thread but with rich info.

    @Stragus @marshallcomputers

    I want to do this, but I have a question. Would it be possible to tell Bricksync in the server to read my xyz.BSX file in my PC with the command sort and populate it? And later do a merge xyz.bsx?

    The only difference that I would do is, instead of wget the original BS .tar.gz is upload my folder to my website, this would be fine, no?

    PD: Any more recommendations or something that have changed since this tutorial was posted?

    Thanks,
    Sergio
  • @Stellar
    I realised shortly after making this tutorial that I was unable to upload any .bsx files to bricksync for inventory updating, so I would recommend using “Bitvise SSH Client” if you are using windows as this has a built in SFTP client. This will use SCP or SFTP if you have it installed on your server, so you should be able to just install the client and then be able to see the bricksync main directory to be able to add the .bsx file.

    Thanks,
    Justin
  • Missed this thread too!

    @marshallcomputers
    @Stragus

    I do not have 100% reliable internet connection so this is my only viable option, but I am not a computer wiz...
    I have tried to get my head around this before but did not succeed, help would be much appreciated!

    Any chance you could explain the process to a "dummy"? I.e. Explain the acronyms and so on?
    Can I use a mac or do I have to get a windows device?
    How do I find/get a ubuntu server?
    What soft ware is required?

    Thanks Graham
  • @Graham
    [b]Q: Any chance you could explain the process to a "dummy"? I.e. Explain the acronyms and so on? [/b] A: I suggest someone help you set the server up, if it’s me or someone else. Once setup it’s as easy as logging in with a SSH client and typing the command “screen –r” then you see bricksync just like you do on the computer. Only difference is that you don’t need to have your computer running for bricksync to run.


    [b]Q: Can I use a mac or do I have to get a windows device? [/b]A: From memory mac has a built in SSH client. After doing a little googling most mac users prefer “cyberduck” as it’s free and also includes SFTP so you can upload and download .bsx files.


    [b]Q: How do I find/get a ubuntu server? [/b] A: This can be rented from hosting provides for around $5-$10 USD a month. I’m paying $28/year so $2.33 USD a month.


    [b]Q: What soft ware is required? [/b] A: “cyberduck” but someone that is more experience with mac will clarify this. I’m more of a PC man. Can navigate my way around a mac no program, just don’t use them regularly.
  • Thank you. Much appreciated!
  • Hi Justin,
    I have tried to follow the procedure above and succeeded (I believe) :-)
    I however have an issue when trying to log-in to the "bricksync" account and running "screen -r". It will say that that "there is no screen to be resumed".
    If I log-in to the root account I can start Bricksync and see that it is running.
    Only difference between your procedure above is that the Screen version is slightly different 4.03.01 (instead of 4.02.01).
    Do you have any help to offer to resolve this issue?
    Brgds Søren
  • > @sorenbruun said:
    > I however have an issue when trying to log-in to the "bricksync" account and running "screen -r". It will say that that "there is no screen to be resumed".
    > If I log-in to the root account I can start Bricksync and see that it is running.

    Maybe you're accidentally exiting BrickSync.
    This is what I do, instead of just closing the SSH client:

    - while still in BrickSync (which is running under screen), hit Ctrl+a followed by d
    - this detaches from screen, leaving it running in the background
    - you're now back in the shell, and you can safely exit
    - later you can log back in, and run "screen -r" to resume
  • > @marshallcomputers said:
    > This was going to be a tutorial on how to install BrickSync on CentOS but there was a problem with the OpenSSL. BrickSync requires an older version of OpenSSL (1.0.0) but all version of CentOS only support a newer one (1.0.1e) and can't be downgraded.

    I remember having a similar problem when running it on one of the VMs they had available on AWS. Maybe it's worth pinging @Stragus to update BrickSync.
  • > @brickrepository said:
    > > @marshallcomputers said:
    > > This was going to be a tutorial on how to install BrickSync on CentOS but there was a problem with the OpenSSL. BrickSync requires an older version of OpenSSL (1.0.0) but all version of CentOS only support a newer one (1.0.1e) and can't be downgraded.
    >
    > I remember having a similar problem when running it on one of the VMs they had available on AWS. Maybe it's worth pinging @Stragus to update BrickSync.

    Thank you for the reply, but it doesn't seem to make a difference... If I read it correctly you mean for me to press CTRL+A and D at the same time - CTRL+A+D?
    When I do that, then PuTTY closes and exits.

    Brgds
    Søren
  • I tried to reboot the VPS and now the CTRL+A followed by D works :-)
    However when logging in to the bricksync account the response is the same: "There is no screen to be resumed".
    Brgds
    Søren
  • Before I continue, I have to confess that my knowledge of linux is limited. It's some remembered things from college and a lot of Google-ing...

    It's Ctrl+a followed by d.
    After doing that you should be back on the command line that you used to run screen initially.

    While there, try running "screen -list". You should see something like this:

    aaa@BrickSync:~$ screen -list
    There is a screen on:
    4999.pts-1.BrickSync (12/30/18 15:59:43) (Detached)
    1 Socket in /run/screen/S-aaa.


    And you should be able to log out of that account, and upon logging in later, run "screen -list" again and see the same thing.
  • Hi again,
    As should be obvious clear, my Linux knowledge is also very limited :-)

    When trying "screen -list" I get:
    There is a screen on:
    504.pts-0.BrickSync (01/28/19 10:36:55) (Detached)
    1 Socket in var/run/screen/S-root.

    And yes, upon login out and back in and typing "screen -list" I get the same reply.
  • However when logging in to the "bricksync" account the response is the same: "There is no screen to be resumed".
    Brgds
    Søren
  • > @sorenbruun said:
    > Hi again,
    > As should be obvious clear, my Linux knowledge is also very limited :-)
    >
    > When trying "screen -list" I get:
    > There is a screen on:
    > 504.pts-0.BrickSync (01/28/19 10:36:55) (Detached)
    > 1 Socket in var/run/screen/S-root.
    >
    > And yes, upon login out and back in and typing "screen -list" I get the same reply.

    Hhmm... it looks like you initially ran bricksync as the user "root" (not ideal, security-wise, as mentioned in the original post).

    That's what I gather from that last line:

    > 1 Socket in var/run/screen/S-root.

    What you need to do is login as "root" and close that screen session.
    Login as "bricksync" and start a new screen, and then run bricksync from there.
    After that, Ctrl+a and d to detach, confirm the screen session is there with "screen -list" (and with "bricksync" instead of "root" in that last line), "screen -r" to get back in.
  • Now I think I succeeded in getting everything to work :-)

    I had not realized that you had to login to the new user and install from there. In hindsight it is of course painfully obvious :\">

    I have now reinstalled the server and followed the instruction above (with the points that were unclear to me corrected). Everything seems to now work work as intended.

    Thank you very much for your great help and assistance - I really appreciate it :-)

    Brgds Søren
  • Hello, I just got it setup and working, ran the sync. However when I went back onto my putty terminal it had been existed, when I type screen -r as mentioned I get the following message: "There is no screen to be resumed". I am also unable to rerun ./bricksync, so how do I get back to the bricksync area so I can run the commands required?
  • If you're getting "There is no screen to be resumed" it must mean that you didn't detach from the screen session properly.

    Make sure that when you run ./bricksync you are within a screen session (by running screen). Then detach from that screen session by pressing Ctrl+a followed by d. You should now find yourself back at your terminal, and at this point "screen -r" should bring you back into the screen session where BrickSync is running.
  • Hello @Graham,

    Was there any solution to openssl problem?
    I received error message during runnig Bricksync on VPS : "error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or library.
    Then I tried to run on my Ubuntu desktop and got the same message.

    Till now I've used a windows desktop version but due to 7/24 usage I would prefer to run it on a VPS.

    I would appreciate any hints to solve this issue.

    Many thanks in advance!
    kezany
  • I’m having the same issue kezany
  • @kezany I have gotten it to work! I used the steps from the last answer here: https://unix.stackexchange.com/questions/283607/libraries-libcrypto-so-1-0-0-cannot-open-shared-object-file-no-such-file-or-d

    1. sudo nano /etc/apt/sources.list
    2. add deb http://security.ubuntu.com/ubuntu bionic-security main
    3. sudo apt update && apt-cache policy libssl1.0-dev
    4. sudo apt-get install libssl1.0-dev

    It works after doing that. Unfortunately Bricksync is still not recognizing coral parts. I found a workaround for this on Windows here: https://www.brickowl.com/forum#/discussion/8343/colour-coral-issues-with-bricksync/p2 but now I have to figure it out for Linux...
  • Hello @BrickSouth !

    Many thanks for sharing that. Currently I installed an old notebook w/ Windows version of Bricksync, but I will try your solution.

    Regards, kezany
  • This post is fantastic!
    Based on what I learned here, I created a docker image that can be used to create a container to run BrickSync in any linux system.
    It is my first docker image and it probably will destroy your system. Therefore, only use when feeling comfortable with docker.

    For instructions:
    https://github.com/greenshark12/docker-bricksync/blob/master/README.md

    Let me know if you used it.
  • Hello,

    I have found an updated version of BrickSync on GitHub (See below). It adds the coral color and general fixes and maintenance. I however have no real idea on how to how to update to this new version on a VPS Linux (I use Vultr).
    Anyone with Linux skills that can update the above how-to-do, so we can use the new version?

    https://github.com/ZZJHONS/Bricksync

    Brgds Søren
  • @sorenbruun I'm not a linux user, so I don't know the linux commands but it should just be a case of...

    Download the linux files from github
    Unpack/unzip the files (there's only a couple of files; the bricksync program file and the config text file)
    Close bricksync, if it's running
    Rename your current bricksync program file to something like bricksync_ORG (so you have a backup)
    Copy the new bricksync program file to the same location as your original

    You don't need the new config text file as you already have one.
  • Download the source code, unzip it and just run "./compile" there is a file with the instructions so running it makes the work, then just use the files generated to substitute yours. (except the config one)
Sign In or Register to comment.