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
git clone https://github.com/GerardNgabo/yoursms-gateway.git
cd yoursms-gateway/infrastructure
cp .env.example .envOpen .env and fill it in:
| Setting | Value |
|---|---|
YOURSMS_DOMAIN | Your domain, for example sms.example.com |
POSTGRES_PASSWORD | A secret you generate |
YOURSMS_JWT_SECRET | A secret you generate |
YOURSMS_ENCRYPTION_KEY | A secret you generate |
Generate each secret with:
openssl rand -base64 48Then:
docker compose up -d --buildThe first start builds the server and the website, which takes a few minutes.
Check it
curl https://YOUR_DOMAIN/actuator/healthanswers {"status":"UP"} once the server is ready.
| Address | What is there |
|---|---|
https://YOUR_DOMAIN | This website |
https://YOUR_DOMAIN/login | The dashboard |
https://YOUR_DOMAIN/api/v1 | The API |
https://YOUR_DOMAIN/swagger-ui.html | The 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_SECRETsigns everyone out.
Next: install the Android app and pair a phone.
