UserVM Handbook: Difference between revisions
No edit summary |
No edit summary |
||
Line 28: | Line 28: | ||
scripts/grab_deps_linux.sh |
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: |
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 |
||
{{code| |
|||
libvncserver, cairo, boost, sqlite, turbojpeg |
|||
}} |
|||
Next, we need to enable reverse proxying mode, as proxying behind nginx with SSL is required for a UserVM. |
Next, we need to enable reverse proxying mode, as proxying behind nginx with SSL is required for a UserVM. |
||
{{code| |
{{code| |
Revision as of 02:09, 2 December 2022
Welcome to the official guide on setting up a UserVM.
Prerequisites
You'll need:
- A machine with decent specs (8GB of RAM and a modern CPU, probably)
- A Linux distribution; You can pick any mainstream distro, for the purposes of this guide I recommend either Debian/Devuan or Arch/Artix. I recommend the OpenRC versions (Devuan/Artix) but that's just preference, pick what you're comfortable with. Yes, Ubuntu will work, it's terrible though
- Basic knowledge of how computers and Linux systems work. We aren't going to hold your hand, you need to be comfortable with a command line
- A few hours
Compiling the server
First up make sure you have git installed:
sudo pacman -S --needed git
sudo apt install git
Now let's clone the source. This is assuming you're in your home directory but you can clone it wherever
git clone https://github.com/computernewb/collab3 collab-vm-server
cd collab-vm-server
git checkout release/1.2.11
Next, we need to install some build dependencies. First, the compile tools:
sudo apt install build-essential clang # Debian
sudo pacman --needed -S clang base-devel # Arch
Then run the included script to install required libraries:
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
Next, we need to enable reverse proxying mode, as proxying behind nginx with SSL is required for a UserVM.
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.
sed -i 's/0.0.0.0/127.0.0.1/g' src/Main.cpp
Finally, build the server
{{{1}}}