Skip to main content

Back to the list

Hosting a gateway that costs nothing: three ways, one of them free

What the machine actually has to do

Before choosing where to run it, it helps to know how little is being asked. The gateway is a single binary. Its database is a file next to it. There is no broker, no cache server, no cluster, nothing to compile on the machine. It holds a connection to each of your phones and answers HTTP calls from your own software.

That is a workload a small server absorbs without noticing, which is why the hosting line of the budget can be zero.

The dashboard of a running gateway: two phones connected, the traffic of the last 24 hours and the uptime of each phone.
The dashboard of a running gateway: two phones connected, the traffic of the last 24 hours and the uptime of each phone.

Option 1: a free cloud instance

Oracle Cloud's Always Free tier gives you a small ARM server at no monthly cost, and the gateway is published for ARM as well as x86, so Docker picks the right image by itself. It needs little memory and nothing runs beside it except a small HTTPS server.

That is the option we document step by step, because it is the one that costs nothing and is reachable from anywhere: your phones connect over HTTPS, including on mobile data, wherever they are. The guide walks through creating the instance, opening ports 80 and 443 at both filtering levels, pointing a domain at it and running the install command.

Read it here: Oracle Cloud Always Free.

Option 2: a server you already pay for

If you already run a VPS for a website or an internal tool, the gateway fits beside it. One command installs it, and it takes its own port behind your existing HTTPS front end. The marginal cost is zero because the machine is already there and already paid for.

This is the most common case among people who already self-host something. The gateway does not ask for the machine to itself.

Option 3: a box in the office

The gateway can also run on a small machine on your own network, next to the phones. It is the fastest path, because there is no domain to configure and no certificate to obtain: the dashboard answers on a local address.

The trade-off is honest and worth stating. On a local network the link is plain HTTP, which is fine on a network you trust and only on a network you trust. And your phones must be on that same network, or reach it, so a phone that leaves the office stops sending until it comes back. Read Local server before choosing this one.

What still costs money

Three lines, and the first two were already in your budget.

Your SIM plan. You were paying it anyway. What it gives you in bundled messages is what your marginal cost becomes.

The phones. Any Android phone will do, and an old one does the job: it sends SMS, it holds a connection, it stays on its charger. Most businesses find two in a drawer.

The licence, once. That is the line that replaces the subscription, and it does not come back.

The point of counting these three separately is that only the third is ours. The first two are yours whatever you decide, which is exactly why a route you already own is worth looking at before renting another.