Socket
Socket
Sign inDemoInstall

immers

Package Overview
Dependencies
32
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    immers

ActivityPub server for the metaverse


Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

immers

ActivityPub server for immers.space - a decentralized virtual reality metaverse platform powered by Mozilla Hubs and activitypub-express.

Installation & setup

Domains

For the best user experience, install your hubs-cloud on a subdomain (e.g. hub.yourdomain.com) when running the hubs-cloud setup and then use the main domain (e.g. yourdomain.com) for your immer. This way users only need to use the main domain in the immers handle (user@yourdomain.com). Attempts to navigate to the main domain will be redirected to the hub homepage automatically.

Immers server deploy

Setup a web server with MongoDB (v4.x), NodeJS (v12.x), pm2, authbind, and Let's Encrypt certbot. See detailed instructions for these steps if needed.

  • Install immers from github
git clone https://github.com/wmurphyrd/immers.git
cd immers
npm ci
  • Copy SSL certificates (replace domain name, username)
sudo cp -RL /etc/letsencrypt/live/example.com/. certs/
sudo chown -R myuser certs/.
  • Copy config-template.json to config.json and edit to configure immers server
KeyValue
portPort number for immers sever (usually 443)
domainImmers server host
hubHubs cloud host
homepageOptonal, redirect root html requests to this url (defaults to hub)
nameName of your immer
dbNameDatabase name to use with MongoDb
smtpHostMail service domain
smtpPortMail delivery port
smtpFromFrom address for emails (match mail domain configured in hubs)
keyPathRelative path to SSL private key (privkey.pem)
certPathRelative path to SSL certificate (cert.pem)
caPathRelative path to SSL certificate authority (chain.pem)
monetizationPointerOptional. Adding a payment pointer here activates Web Monetization
themeObject containing optional theme properties
theme.googleFontFont family name from to fetch from Google Fonts
theme.backgroundColorCSS color,
theme.backgroundImageImage file,
theme.imageAttributionTextAttribution for backgroundImage, if needed,
theme.imageAttributionUrlAttribution for backgroundImage, if needed
  • Copy secrets-template.json to secrets.json and edit to configure secrets
KeyValue
sessionSecretSecret key for session cookie encryption
easySecretSecret key for login token encryption
smtpUserUsername for mail service
smtpPasswordPassword for mail service
  • Start server with pm2 & authbind
authbind --deep pm2 start npm --name="redirector" -- run https-redirect
authbind --deep pm2 start npm --name="immer" -- run start
# one-time setup for autorestart
pm2 startup
pm2 save

Hubs cloud setup

  1. Deply custom hubs client from immers-space/hubs#immers-integration
  2. Add config in hubs cloud admin -> setup -> sever settings -> advanced
  • Extra room Header HTML: <meta name="env:immers_server" content="https://your.immers.server"> (replace value in content with your immers server url)
  • Extra Content Security Policy connect-src Rules: https: wss: (allows API and streaming connections to remote users home instances)
  • Allowed CORS origins: * (temporary measure cross-hub for avatar sharing)

Local dev

immers

  • Clone and install immers
git clone https://github.com/immers-space/immers.git
cd immers
npm ci
  • Install a self-signed certificate
mkdir certs
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout certs/server.key -out certs/server.cert
  • Install mongodb
  • Run immer with npm run dev

hubs

  • Clone and install our fork
git clone https://github.com/immers-space/hubs.git
cd hubs
git checkout immers-integration
npm ci
  • Run hub with either npm run dev (use Hubs dev networking servers) or npm run start (to connect to your hubs cloud networking server).
  • Visit hub at https://localhost:8080, create a room, and you will be redirected to login or register with your immer. You'll encounter and need to bypass certificate warnings for both the hub and immer domains. To get e-mail confirmation links, check the immers console for a link to read the email

Default immers server is https://localhost:8081, override with entry IMMERS_SERVER in hubs repo root folder .env file.

Keywords

FAQs

Last updated on 22 Jan 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc