UserVM Handbook: Difference between revisions

typescript
No edit summary
(typescript)
sudo apt install git # Debian
}}
=== ClonePrepare the sourceserver ===
Now let's clone the source. This is assuming you're in your home directory but you can clone it wherever
{{code|
git clone https://github.com/computernewb/collab3 collabcollabvm-vm-server1.2.ts.git
cd collabvm-1.2.ts
cd collab-vm-server
git checkout release/1.2.11
}}
Next, we need to install Node.js, as well as the server dependencies.
=== Install build dependencies ===
First, node:
Next, we need to install some build dependencies. First, the compile tools:
{{code|
sudo apt install build-essentialnpm clangnodejs # Debian
sudo pacman --needed -S clangnpm base-develnodejs # Arch
}}
Then run the included script to install required libraries:dependencies
{{code|
npm i
scripts/grab_deps_linux.sh
}}
Note that this only works on Debian or Arch-based distros. For other distros you'll need to track down the dependencies yourself, these are: libvncserver, cairo, boost, sqlite, turbojpeg
=== Enable reverse proxying mode ===
Next, we need to enable reverse proxying mode, as proxying behind nginx with SSL is required for a UserVM.
{{code|
sed -i 's/\/\/#define WEBSOCKETMM_SUPPORT_PROXYING/#define WEBSOCKETMM_SUPPORT_PROXYING/g' src/websocketmm/websocket_user.cpp
}}
Lastly, you should switch to listening on 127.0.0.1 rather than 0.0.0.0, which keeps the port CollabVM is running on closed. This is necessary in reverse proxy mode as anyone with the port can spoof their ip by setting the X-Forwarded-For header.
{{code|
sed -i 's/0.0.0.0/127.0.0.1/g' src/Main.cpp
}}
=== Build the server ===
Finally, build the server
{{code|
npm run build
<nowiki>make CC=clang CXX=clang++ JPEG=1</nowiki>
}}