Skip to content

Instantly share code, notes, and snippets.

@vijay-prema
Last active February 18, 2022 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vijay-prema/3682805cffe6cb29249ec76b80a050e1 to your computer and use it in GitHub Desktop.
Save vijay-prema/3682805cffe6cb29249ec76b80a050e1 to your computer and use it in GitHub Desktop.
Host Vircadia Server on Ubuntu 20.04

Install Server

You need to install the libdouble-conversion1 package before installing Vircadia server (which normally only supports Ubuntu 18.04)

sudo apt update
wget http://ftp.br.debian.org/debian/pool/main/d/double-conversion/libdouble-conversion1_3.1.0-3_amd64.deb
sudo apt install ./libdouble-conversion1_3.1.0-3_amd64.deb
wget https://cdn.vircadia.com/dist/domain-server/ubuntu/vircadia-server_2022.1.0-selene-20211126-aabcdea-0ubuntu1-1_amd64.deb
sudo apt-get install ./vircadia-server_2022.1.0-selene-20211126-aabcdea-0ubuntu1-1_amd64.deb

Start the server as a service:

sudo systemctl enable vircadia-server@default.target

Got to http://server-ip:40100 (or http://localhost:40100) to get the server web browser interface and set up server. If you have problems, make sure you are using the right IP of your server and check for firewall settings (e.g. sudo ufw status)

Additional Server setup:

Set a name for your domain, this is what can be used for clients to search for your server using Explore function in the app.

Optional: I have my web interface behind a Caddy proxy an with my own domain, so I can access it via a secure URL such as https://vircadia.mydomain.com (not my actual). If you want to know more about Caddy as a reverse proxy, see my tutorial video.

Full Automatic Networking is supposed to just work but on my home server I still had to forward port 40102 on my router manually.

Set permissions for users in the server web interface. Include Rez etc if you want them to be able to create objects in the world, and edit it in a persistent way. I entered my username as a specific user and gave myself all permmissions, and gave other users lesser permissions and only friends edit ability.

Connect to the world using Interface app:

Download the Interface app Vircadia client interface and connect to your server by clicking Explore and search for your Domain. Tell others to join by giving them the name of your Domain which they can search for in the client interface.

Quickly import some content:

By default a new server is a blank void (no content).

Some really good looking free content is available.

If you want to quickly replace the whole content on your server with a pre-built world, just download one of these zips, and in your server settings, go to Content > Upload Content and upload the zip file.

Edit your world easily:

Use the CREATE button in the client interface. This allows you to search for enities within the world and modify them. Another way is to modify them programatically through the javascript interface, via scripts or the Console (see below).

Scripting and Console:

There is a Javascript API that allows you to write various scripts to create and alter the world dynamically, or enter commands in a console in the client interface app. To enable the console and other developer tools, go to Settings > Developer Menu to enable Developer menu. Under the new Developer choose Scripting > Console.... Enter commands here e.g. MyAvatar.setGravity(0); (default is usually -5).

Copying content from other domains:

You should be aware of licenses of content you copy, but it is possible to simply select and export content as json from any domain you join, by using the CREATE button.

@manojkumarjain
Copy link

I was looking at your page for Vircadia Deployment on 20.04. I am struggling to run it.
I also tried to do same steps for 18.04 but it also is failing

Step install

wget --no-check-certificate https://cdn.vircadia.com/dist/domain-server/ubuntu/vircadia-server_2022.1.0-selene-20211126-aabcdea-0ubuntu1-1_amd64.deb

sudo apt-get install ./vircadia-server_2022.1.0-selene-20211126-aabcdea-0ubuntu1-1_amd64.deb
sudo systemctl start vircadia-server@default.target

Step configure
Created Domain and Place in metaverse

http://localhost:400100/settings - configure the metaserver and got connected

http://localhost:40100/settings - configure the metaserver and got connected

Step Client
wget --no-check-certificate https://github.com/vircadia/vircadia/releases/download/2022.1.0/Vircadia-2022.1.0-Selene.AppImage
chmod +x Vircadia-2022.1.0-Selene.AppImage
./Vircadia-2022.1.0-Selene.AppImage

It opens the application - but nothing is rendered
The Window says
Serverless: fie:///~/serverless/tutorial.json (Metaverse: Not logged In) - Vircadia Build v2022.1.0-

After that nothing happened, None of the menu item is working

Even explorer URL not working - http://localhost:40102 - It says connection refused

Is there any step missing?

@manojkumarjain
Copy link

manojkumarjain commented Feb 18, 2022

Thanks Vijay.
Server web interface is working fine.
I am able to configure all parameters and able to connect to metaverse.

I am confused with next steps. It is not clear.
Do I have to run Native client like
./Vircadia-2022.1.0-Selene.AppImage. On 20.04, running this is causing segmentation faults
On 18.04, running this doesn't show any contents except menubar

Or

I have to use Web Client like and explore the metaverse and create contents
http://localhost:40102 (This is not working and I am getting connection refuse here)

I am running my server on Ubuntu 20.04 on VCenter VM.

Is there any specific Graphic card required for this on VM.

Thanks Manoj

@vijay-prema
Copy link
Author

vijay-prema commented Feb 18, 2022

Are you trying to run the client on the same VM as the server? If so this will not work if the server does not a good GPU You need to run the client on another PC locally with a good GPU, not via remote desktop and not on a VM either. Just download the client onto your local PC and try, it will work with intel GPU but might be slow. There is Mac, Windows, and Linux client.

Right now I dont think there is a working web client but this is coming hopefully later this year. You cannot connect simply by going to http://localhost:40102 in a web browser, only the native 3D client can do this.

So the only way is to run the interface native client on a proper PC, then search for your server using the Explore button to connect.

@manojkumarjain
Copy link

Thanks Vijay. This explains.

I have a working Server on 20-04 and working Client on Windows 10

Can I point windows client to Server 20-04 ?

Today Windows installation comes with Sandbox with Server + Client.

Thanks
Manoj

@vijay-prema
Copy link
Author

Any client on any machine can connect to your 20.04 server, as long as that server is set up correctly. Take a look at Additional Server setup in my gist above. Then you can click Explore in the client and search for your server to join it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment