Documenting how to setup a server #20
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
To be validated by local actors, e.g.
or more broadly in France
potentially even https://code.gouv.fr/sill/
See also
index.htmlthe main client-side page (with dependency on JXR core)remixed.htmlremix browserremixed_16_39_53_modifications.txtexample of modication via URLremixed_12345.jsonexample of modication via JSONwbjr_webxrservice_index.jsbackend server for WebDAV (saving) and express (client-side experience and remix browser)Ideally would require the smallest amount of steps e.g
npm i(assumingpackage.json)npmis unavailable then suggesting to either install it, or rely on a container image, e.g. https://hub.docker.com/_/node/ which in turns doesnpm iConsider Gitpod (or self hostable, by me or others, not for the newcomer, equivalent) allowing for 1-click setup.
Consider also utopiah/spasca-fot-sloan-q4#4 e.g. WebDAV via
CopyParty. This can optionally relyngrokbut ideally without it norcfsslas both are vendor dependent and centralized.By default lacks permission management but enough to share and remix with relatively simple setup.
Note that this imply exploring avoiding
wbjr_webxrservice_index.jsentirely and trying instead to keep everything possible client side. This might mean user management done via WebDAV or here more specifically as CopyParty configuration :index.htmlthe main client-side page (with dependency on JXR core)remixed.htmlremix browserremixed/remixed_16_39_53_modifications.txtexample of modication via URLremixed_12345.jsonexample of modification via JSONwbjr_webxrservice_index.jsbackend server for WebDAV (saving) and express (client-side experience and remix browser)copyparty.conffor server side user rightsindex.htmlConsider who the audience is, even 1-liner with
curlpulling a script from this repository might be too much for a non technical user.Consequently in such a situation sticking to what is relying on the least amount of dependencies (e.g.
npm ior "just" CopyParty or aDockerfile) might be best.Note that the first setups will be done on behalf of somebody running a workshop or even a classroom. This issue is to insure they can be independent before and after the workshop even if they might need to ask support from a technical colleague, e.g. the sysadmin of a school or a friend.
See also https://itsfoss.gitlab.io/post/how-to-create-a-simple-deb-debian-package/ for an relatively convenient way to deploy on Debian and thus on a lot of systems.
Set up a dedicated package repository, e.g. https://wiki.debian.org/DebianRepository/Setup using
apt-ftparchivewhere the.debpackage is to generate the package listecho "deb [trusted=yes] https://home.benetou.fr /" > /etc/apt/sources.list.d/biggu.listto add the repositoryapt update && apt install biggu-s-gateto installCurrent the test package is available as biggu_s_gate.deb at https://home.benetou.fr/biggu_s_gate.deb and depends on NodeJS. Note that it does NOT include a reverse proxy or a way to have an HTTPS server which is mandatory for WebXR. It is assumed, maybe incorrectly, that the person installing the package already has their own solution working. It could be interesting to provide an HTTPS server regardless on an unprivileged port with self-signed certificate.
Running test instance on
biggu.benetou.frbehind reverse proxy and self-hosted.History of setup should be used as documentation too, i.e. :
npm startafter disabling HTTPSSee nginx reverse proxy details https://github.com/networked-aframe/networked-aframe/issues/244 in particular
Running 2nd test instance for federation testing more specifically on
biggubis.benetou.frMuch faster setup this time, went from ~1h to 15min. Relied on basic
Dockerfile:Note that federation between those 2 instances is not enabled yet but would initially focus on :
and might not focus on the typical CRUD for users, completion, etc as it is important yet less fundamental. See #21
Delivery of (large) assets or packages could be done via P2P, e.g. WebSeed for BitTorrent.
Periodically validated during workshops, see #23
Ideally done against a popular image, e.g. Raspberry Pi OS (64-bit) and listing here such steps.
Practical way to run again after tinkering
cd ~/Prototypes/biggu_naf_new/ ; killall networked-aframe-server ; nohup npm start &which allows
output.login the current directory.Note that if a reverse proxy is used in order to send (relatively large) screenshots as POST payload it has to be configured to allow it, see https://git.benetou.fr/utopiah/biggu_s_gate/src/branch/main/server/biggu_backend_express_naf_extension.js#L10 e.g.
client_max_body_size 10M;in nginx.Not all dependencies are provided in the repository. Some have to be pulled manually, other are modified to work offline. Consequently what's currently recommended is to get (e.g. using
wget) the required resources from the public test instance, namelyhttps://biggu.benetou.fr.Current limitations from
git clonethennpm i:../examplesbut should now be../pagesto match the repositoryfrontend/biggu_s_gate/but should now bepages/dependencies/from https://biggu.benetou.fr/biggu_s_gate/dependencies/ can't be recursively fetchednpm idoesn't addjs/which is required from SocketIOAs fall back a huge (~350MB) dump is available at https://home.benetou.fr/biggu_naf_new_1774616968.tar but it contains much more than the minimal needed. It also contains certificate for the
biggu.benetou.frwhich consequently will not work for your instance and must be replaced. Still, if you absolutely urgently need all files in 1 location to run a workshop, this might be provide convenient. You can setup a RPi Zero as WiFi hotspot using https://fabien.benetou.fr/Cookbook/Electronics#SocialWebXRRPi0 for a fully offline workshop.Consider also running the result in a browser with WebXR enabled and the check the network console to see what files might still be missing, in particular in XR mode with e.g. hands assets.
Following the latest workshop the recommended archive to run a RPi Zero offline is
https://home.benetou.fr/biggu_naf_new_1774763022.tarnow in the most recent comment instead.Note that you do NOT need a RPi Zero. If you have a laptop with Linux or even an Android phone with Termux,
nodejswithnpm,PORT=443 npm startin the new directly,For Yunohost could try with https://doc.yunohost.org/en/dev/packaging/resources#nodejs
Latest archive https://home.benetou.fr/biggu_naf_new_1777277248.tarAssets only archive https://home.benetou.fr/assets.tar radically smaller, from 500MB to 5MB but requires manual setup, namely currently :
Latest archive https://home.benetou.fr/biggu_naf_new_1777323683.tar (all previous ones deleted)
Follow https://git.benetou.fr/utopiah/biggu_s_gate/src/branch/main/documentation#administrator--developer for setup, namely, after cloning this repository :
Consider
to use with
HTTPS=true npm startcf https://git.benetou.fr/utopiah/biggu_s_gate/src/branch/main/server/easyrtc-server.js#L23
Setup tested and working on
To start on boot as an unpriviledged user