Self-Hosting The App on a VPS Server #49
Replies: 3 comments 9 replies
-
Turns out more work needed to be done to get the reverse proxy to also allow websockets for faster updates (no longer have to refresh the app regularly to get new notifications. The following needed to be added to the Apache virtual host to get reverse proxying for websockets working after enabling the proxy_wstunnel module for Apache (a2enmod proxy_wstunnel):
Incoming messages now appear almost instantly in Firefox Focus on GrapheneOS as well Chrome and Firefox for desktop. Vanadium doesn't seem to handle the incoming notifications on GrapheneOS well. It will update if exiting the current chat and going back in but not without a refresh if staying in the current chat. |
Beta Was this translation helpful? Give feedback.
-
Do you have steps available (documentation) to can provide so one can try to replicate what you did? Would like to try what you were able to accomplish on a bare metal server running Ubuntu. On what you were able to accomplish? |
Beta Was this translation helpful? Give feedback.
-
What would need to be done to get official documentation from start to finish assuming one had a VPS? This is something that should be heavily prioritized. If this was placed on the front page of the website to gain traction, it would get lots of upvotes, but instead it is buried, and no one knows about it until they submit a feature request. |
Beta Was this translation helpful? Give feedback.
-
NOTE:
If anyone is having problems for self hosting please don't make an Bug-Feature report. Everyone will be redirected to here again. THANK YOU
.
Docker CLOSED issues reports logs:
#18
#54
.
After a lot of trial and error I was able to get this app working on a self-hosted VPS server running Ubuntu. The connections come into the server running Apache and get proxied to nodejs which runs on localhost using Apache's proxy and proxy_http modules (these need to be activated using a2enmod). Was able to get this functioning using SSL and after a lot of playing around with Apache virtualhost files. Here are the software/packages that were helpful in getting this functioning for two-way communication:
I wasn't sure what the mongodb connection string was supposed to be on a self-hosted server. This resource helped configure that correctly:
https://stackoverflow.com/questions/62260612/how-to-get-the-mongodb-connection-string
Had to modify app.js a bit to have it use https and know where to find the SSL certificate (there's probably a better way to do this) like this:
Make headers more secure and harden app against automated attacks:
and at the end had to tell the app to listen on localhost:
server.listen(8888, "127.0.0.1");
For the apache virtualhosts file I was getting 500 errors and other errors until using this combination of proxy settings:
Hopefully this is helpful to anyone trying to get this running on their own server. I'm sure there are better ways to do this and I'm open to suggestions for improvements, but the main goal was to get this working on a self-hosted server while using an encrypted connection. Testing has shown that both SMS/MMS work in both directions. I'd be happy to answer any questions for anyone trying to self-host this. I set this up with Telnyx, so have no idea about the Twilio side of things.
Beta Was this translation helpful? Give feedback.
All reactions