atomicdata-dev / atomic-server

An open source headless CMS / real-time database. Powerful table editor, full-text search, and SDKs for JS / React / Svelte.
https://atomicserver.eu
MIT License
1.06k stars 49 forks source link

Getting rid of port-forwarding - consider using tunnels / centralized subdomain system #152

Open joepio opened 3 years ago

joepio commented 3 years ago

Running your own atomic-server is quite simple, but the real problem is making it accessible on the internet. I want consumers to be able to do this, without doing the hard work. What you currently need to do:

It's all just too much!

What could really work well, is use some tunnelling service like ngrok, tunnelto.dev (open source, rust) or cloudflare tunnels.

joepio commented 3 years ago

I've got pktriot working. Atomic-server is running in HTTP mode, since pktriot deals with TLS.

  1. Register on packetriot.com, no need to add credit card if you're OK with a single random subdomain domain
  2. Install the pktriot cli
  3. Configure it pktriot configure
  4. Open a tunnel pktriot http 8080, note the tunnel domain
  5. install / download atomic-server
  6. Adjust the .env (or copy template.env): set HTTPS to false, HTTP_PORT to 8080, and the domain to the newly created tunnel domain
  7. run atomic-server
  8. Visit your domain

But there still is a problem: the returned @id does not match, since the server is thinking it's serving HTTP instead of HTTPS. Maybe add a RETURN_HTTPS flag?