Quick start
Runs the Publisher on your machine with Docker, to try it before installing it on a server.
Requirements
-
Docker with the Compose plugin: Docker Engine on Linux, or Docker Desktop, which includes Compose, on macOS and Windows. On Linux, add yourself to the
dockergroup or prefix thedockercommands withsudo. -
Git,
makeandopenssl: on macOS,xcode-select --installprovides Git andmake, andopensslships with the system. On Windows, run the steps in WSL. On Ubuntu or Debian:sudo apt-get install -y git make openssl
Check them:
docker compose version
git --version
make --version
openssl version
Steps
-
Clone the repository with its submodule:
git clone --recurse-submodules https://github.com/smswithoutborders/RelaySMS-Publisher.git cd RelaySMS-Publisher -
Create
.envwith fresh encryption keys:make .env -
Build and start. The first build compiles the payload library in Rust and takes several minutes:
docker compose up -d --build -
Check that it’s up:
curl http://localhost:16000/healthYou should see
{"status":"ok"}. If the connection fails, the container is still applying migrations;docker compose logs -fshows its progress. -
Create an administrator credential:
docker compose exec publisher \ python -m publisher creds create --username admin --administratorImportant
The password is printed only once.
-
Use it on the REST API:
curl -u admin:<PASSWORD> http://localhost:16000/v1/auth/meYou should see
"username":"admin"and"administrator":true.
To stop the Publisher, run docker compose down. To start again from scratch, also run sudo rm -rf data .env.
Next steps
The pages below run the admin CLI as sudo ./publisher.sh; with Docker, use docker compose exec publisher python -m publisher instead.
- Add a platform
- Register a gateway client
- Install on a server for production