Skip to content

Deploy the server ​

One Linux machine runs everything: the database, the server, the dashboard, these pages, and an HTTPS proxy that obtains its own certificate.

You need ​

  • A machine with Docker and the Compose plugin. 2 GB of memory is enough to start.
  • A domain name whose DNS record points at the machine.
  • Ports 80 and 443 open to the internet. The proxy needs both to obtain a certificate.

Start it ​

sh
git clone https://github.com/GerardNgabo/yoursms-gateway.git
cd yoursms-gateway/infrastructure
cp .env.example .env

Open .env and fill it in:

SettingValue
YOURSMS_DOMAINYour domain, for example sms.example.com
POSTGRES_PASSWORDA secret you generate
YOURSMS_JWT_SECRETA secret you generate
YOURSMS_ENCRYPTION_KEYA secret you generate

Generate each secret with:

sh
openssl rand -base64 48

Then:

sh
docker compose up -d --build

The first start builds the server and the website, which takes a few minutes.

Check it ​

sh
curl https://YOUR_DOMAIN/actuator/health

answers {"status":"UP"} once the server is ready.

AddressWhat is there
https://YOUR_DOMAINThis website
https://YOUR_DOMAIN/loginThe dashboard
https://YOUR_DOMAIN/api/v1The API
https://YOUR_DOMAIN/swagger-ui.htmlThe API reference

Open the dashboard and choose Create a new team to make the first account.

Anyone who can reach the dashboard can create a team

There is no setting yet that closes registration. If your server is on the public internet, anyone can create their own team on it. They cannot see your team or use your phones, but they use your server. Restrict who can reach it with your firewall if that matters to you.

Keep the keys safe ​

Store a copy of .env somewhere other than this machine.

  • Without YOURSMS_ENCRYPTION_KEY, the signing secrets of your webhooks cannot be read, and the webhooks must be created again.
  • Changing YOURSMS_JWT_SECRET signs everyone out.

Next: install the Android app and pair a phone.