How to install CollabVM/1.x

From Computernewb Wiki
Jump to navigation Jump to search

< How to install CollabVM | Tutorial for CollabVM 2.0 >

Disclaimer: This guide is unofficial and written by the CollabVM community, please do not count on this guide as the only way to install CollabVM. The server may or may not change without your knowledge.

Second Disclaimer: You need to have a webserver in order to create a public CollabVM Mirror.

If you ever wanted to create a CollabVM Mirror, then you are at the right place, this guide teaches you how to install CollabVM.

Installation

Linux

The first thing you want to do is clone the server, you can clone it with git or download it. But we will use git for now.

git clone https://github.com/computernewb/collab3 --recursive --branch release/1.2.11

--recursive is added so it also clones the submodules which bundles sqlite-orm.

After that, you want to go to the "collab-vm-server-1.2" directory. You do that by typing: cd collab-vm-server-1.2

Once you did that, you will now have to install your distro's developer tools. (if you haven't already)

Distros with pacman:

sudo pacman -S base-devel

Distros with apt:

sudo apt install -y build-essential

Distros with yum:

sudo yum groupinstall 'Development Tools'

Compiling the Server

Now we want to get ready to compile the server. You do that by running grab_deps_linux.sh in the scripts folder.

./scripts/grab_deps_linux.sh

Once that's done, you can now finally compile the server using make. But keep in mind, there are some arguments you need to add first! And some of them may be important too.

To speed up compilation, you should also add the -j parameter according to the amount of threads you have. Example, we have 8 threads so we need to do make -j8.

As you may know CollabVM Server has JPEG support implemented since 1.2.9, but how do you enable that functionality? Well it's simple, you just append the JPEG=1 argument like so: make JPEG=1 -j8.

And oh, if you want to use a compiler like Clang++, it's even simpler! All you need to do is to append this: CC=clang CXX=clang++

If you added some or all of the arguments, you should now have a command like this: $ make JPEG=1 CC=clang CXX=clang++ -j8

Once compilation is done, you should be finished. If you want to build the web app for testing/mirroring purposes, proceed further to the next section. Otherwise skip to starting the server up.

Hosting the Web App yourself

Web App

Now you need to install the collab-vm-web-app, which is essential for showing the VMs and controlling the Admin Panel.

You don't necessarily need to have the web-app however, like if you're going to put your instance on the UserVMs or you just prefer using multicollab() on someone else's webapp instead. You don't have to have the webapp otherwise.

You can clone the webapp using:

git clone https://github.com/computernewb/collab-vm-web-app-1.2

Once you have cloned the webapp, go inside the directory by cding to it.

NodeJS

Now install nodejs, you can do that with:

sudo apt install nodejs

Distros with pacman:

sudo pacman -S nodejs

Now we need to install gulp, you can do that with:

npm install --global gulp

If you are inside the webapp directory, type:

npm install

This will install all the dependencies needed to use gulp.

Setting the port (THIS STEP IS CRUCIAL, READ THIS VERY CAREFULLY)

Go to the /src/ folder, you can see the /js/ folder, go there and change common.js. You should see a line like this:

var serverAddress = "localhost:8001";

The serverAddress's port should be 6004, if you are testing this locally then you should keep it on localhost. If you are doing this on a webserver, then change the localhost to reflect your webserver IP and save changes.

Now that we have changed that, now go to the webapp directory again and type:

gulp

Once you did that, a new folder will pop up called "build", cut and paste the contents onto /var/www/html/, or whatever directory your Linux uses for storing HTML.

CollabVM Server

We're almost done with the server, now go to the collab-vm-server directory again and type:

./bin/collab-vm-server 6004

You can now access the server by typing localhost:6004 onto your browser. Go to localhost:6004/admin/config.html (UPDATE: Since 1.2.11, the web server has been removed and so you'll have to use an external web server or just use a web browser to open up config.html) and the default password is collabvm, you have now access to the admin panel and can change some settings like adding new VMs.

Keep in mind that you have to change the default password to a strong password, otherwise your server may be vulnerable to hackers. For more information on how to use the Admin Panel, please refer to the necessary documentation.

Windows (coming soon)

MacOS (coming soon)

Support

If you want help, you can go to our Discord and ask in the #support channel.