Self-hosted bridge (Docker)
The curl-sms Bridge is the Synology app for any server: a local SMS gateway as a Docker image or a single program for Linux, Windows and macOS, with REST API, GET link, email to SMS (SMTP), MQTT, webhook and an offline queue.
Your devices send to the bridge in your network, the bridge forwards to curl-sms.com. You need an account with an API key. On a Synology NAS use the Synology app instead.
Quick start with Docker
docker run -d --name curlsms-bridge --restart unless-stopped \
-p 8080:8080 -p 3456:3456 -p 2525:2525 \
-v curlsms-data:/data \
ndemme/curlsms-bridge:latest
Then open http://<host>:8080 and follow the setup: admin password, API key, security, inputs, test SMS. Under Inputs the bridge shows ready-to-copy examples with your address and token.
The image is available for linux/amd64, linux/arm64 and linux/arm/v7 (Raspberry Pi). It runs as a non-root user; all data lives in the volume /data.
Docker Compose
services:
bridge:
image: ndemme/curlsms-bridge:latest
container_name: curlsms-bridge
restart: unless-stopped
ports:
- "8080:8080" # web interface
- "3456:3456" # REST API, GET link, webhook
- "2525:2525" # email to SMS (SMTP)
volumes:
- curlsms-data:/data
environment:
CURLSMS_API_KEY: ck_live_… # optional, see below
volumes:
curlsms-data:
Start with docker compose up -d.
First start
Setting the admin password in the browser needs a one-time setup code. The bridge prints it to the log at startup:
docker logs curlsms-bridge
# or
docker exec curlsms-bridge /curlsms-bridge setup-code
Without Docker: curlsms-bridge setup-code. If you open the interface on the same machine (localhost) while the program runs natively, no code is needed.
For automated setups, set the password as a hash instead (it cannot be changed in the interface then):
docker run --rm -i ndemme/curlsms-bridge hash-password # type the password, press Enter
Put the result into CURLSMS_ADMIN_PASSWORD_HASH. In Docker Compose write every $ as $$.
Forgot the password? Stop the bridge, run docker run --rm -v curlsms-data:/data ndemme/curlsms-bridge reset-password (without Docker: curlsms-bridge reset-password) and set a new one in the browser.
Environment variables
A setting given as an environment variable always wins: it applies on every start and shows as locked in the interface. Everything else is set in the interface and stored in the data directory.
| Variable | Default | Meaning |
|---|---|---|
CURLSMS_API_KEY |
– | API key from curl-sms.com |
CURLSMS_CLOUD_URL |
https://curl-sms.com |
Server |
CURLSMS_SECURITY |
token |
token, lan_open (no token from private networks) or ip_allowlist |
CURLSMS_ALLOW_IPS |
– | For ip_allowlist: addresses/networks, comma-separated |
CURLSMS_ALLOW_HOSTS |
– | Extra host names for the interface, e.g. behind a reverse proxy |
CURLSMS_LOCAL_TOKEN |
generated | Local token (nas_ + 32 × [a-z0-9]) |
CURLSMS_QUEUE |
hours |
Offline queue: off, hours, unlimited |
CURLSMS_QUEUE_HOURS |
24 |
Hours for hours |
CURLSMS_REST_PORT |
3456 |
REST API, GET link and webhook |
CURLSMS_REST_ENABLED, CURLSMS_GET_ENABLED |
true |
REST API, GET link on/off |
CURLSMS_SMTP_ENABLED |
false |
Email input |
CURLSMS_SMTP_PORT |
2525 |
SMTP port |
CURLSMS_SMTP_ALLOW_FROM |
– | Allowed senders, comma-separated (ups@example.com,@example.org) |
CURLSMS_SMTP_BODY |
both |
SMS text from subject, body or both |
CURLSMS_MQTT_BROKER |
– | e.g. tcp://192.168.1.10:1883 (turns MQTT on) |
CURLSMS_MQTT_ENABLED, CURLSMS_MQTT_USER, CURLSMS_MQTT_PASS, CURLSMS_MQTT_TOPIC_PREFIX |
–, –, –, curlsms |
MQTT details |
CURLSMS_WEBHOOK_RECEIVER |
– | Fixed recipient of the webhook, +49… (turns the webhook on) |
CURLSMS_WEBHOOK_ENABLED |
false |
Webhook on/off |
CURLSMS_UI_PORT |
8080 |
Port of the web interface |
CURLSMS_UI_HOST |
all | Bind address of the web interface, e.g. 127.0.0.1 |
CURLSMS_DATA_DIR |
see below | Data directory |
CURLSMS_ADMIN_PASSWORD_HASH |
– | Admin password as hash (argon2id or bcrypt) |
CURLSMS_ADMIN_PASSWORD |
– | Admin password in plain text, only used on the very first start |
CURLSMS_COOKIE_SECURE |
auto |
auto, true or false |
Booleans accept true/false, 1/0, yes/no, on/off.
Download
The program is a single file without dependencies. Version and checksums:
| System | File (version 0.1.0) |
|---|---|
| Linux x86-64 | curlsms-bridge_0.1.0_linux_amd64 |
| Linux ARM64 (Raspberry Pi 64-bit) | curlsms-bridge_0.1.0_linux_arm64 |
| Linux ARMv7 (Raspberry Pi 32-bit) | curlsms-bridge_0.1.0_linux_armv7 |
| Windows x64 | curlsms-bridge_0.1.0_windows_amd64.exe |
| Windows ARM64 | curlsms-bridge_0.1.0_windows_arm64.exe |
| macOS Apple silicon | curlsms-bridge_0.1.0_darwin_arm64 |
| macOS Intel | curlsms-bridge_0.1.0_darwin_amd64 |
Checksums (SHA-256), also as SHA256SUMS:
5dd036e59d357fdb3b62adf1af61a230fb191f316e4cc86b8d66857063640eaf curlsms-bridge_0.1.0_linux_amd64
ea489c9825778d188bb0b3b4b7cbc10d426369b908678d9c3ccb990aea3a22c1 curlsms-bridge_0.1.0_linux_arm64
fea4a909c14e0028f6edda21c21c37c433246270fee6545a5a836be645828423 curlsms-bridge_0.1.0_linux_armv7
56ee4ce78828686f7dba60e3ae90c5f710f1b050e39d4949f9cc4d3eb052d417 curlsms-bridge_0.1.0_windows_amd64.exe
09fc692a3d029ef34a0cebfbefbc842937959685f261d9c15e332ac4a9c83b05 curlsms-bridge_0.1.0_windows_arm64.exe
3a3d032dbd22917947e5d021e6b5f6a02cfacd6fd38fbe7f825915103b7eeeea curlsms-bridge_0.1.0_darwin_arm64
865774a26950a0707a900ed7ba5cf68d9863f9e8739f7b9f72258343040fbd94 curlsms-bridge_0.1.0_darwin_amd64
Check and start on Linux:
sha256sum -c SHA256SUMS --ignore-missing
chmod +x curlsms-bridge_*_linux_amd64
./curlsms-bridge_*_linux_amd64
On macOS use shasum -a 256 -c SHA256SUMS --ignore-missing, on Windows Get-FileHash .\curlsms-bridge_*.exe. The programs are not signed: Windows SmartScreen and macOS Gatekeeper may warn on first start (macOS: xattr -d com.apple.quarantine <file>).
Default data directory: Linux /var/lib/curlsms-bridge (root) or ~/.local/share/curlsms-bridge, Windows %ProgramData%\curlsms-bridge, macOS ~/Library/Application Support/curlsms-bridge. Change it with -data <dir>.
Run as a service
Linux (systemd), as root:
install -m 755 curlsms-bridge_*_linux_amd64 /usr/local/bin/curlsms-bridge
useradd --system --home /var/lib/curlsms-bridge --shell /usr/sbin/nologin curlsms
install -d -o curlsms -m 700 /var/lib/curlsms-bridge
curlsms-bridge service install -data /var/lib/curlsms-bridge -user curlsms
curlsms-bridge service start
journalctl -u curlsms-bridge -f
Environment variables go into the unit: systemctl edit curlsms-bridge, then Environment=CURLSMS_API_KEY=….
Windows, in an administrator PowerShell:
.\curlsms-bridge_0.1.0_windows_amd64.exe service install
.\curlsms-bridge_0.1.0_windows_amd64.exe service start
Data and log (bridge.log) are in %ProgramData%\curlsms-bridge. Keep the program in a fixed place (e.g. C:\Program Files\curlsms-bridge\) before installing the service.
macOS (launchd): sudo ./curlsms-bridge service install, then sudo ./curlsms-bridge service start. The log is bridge.log in the data directory.
service stop, restart, status and uninstall work the same on every system.
Ports and firewall
| Port | Use | Who needs access |
|---|---|---|
| 8080/tcp | Web interface | Your browser |
| 3456/tcp | REST API, GET link, webhook | Devices and scripts in your network |
| 2525/tcp | Email to SMS (SMTP), off by default | Devices that send mail |
Open these ports in the host firewall for your local network only. Outgoing, the bridge needs HTTPS (443) to curl-sms.com and, if used, your MQTT broker. Do not expose 3456 or 2525 to the internet. For the interface over the internet, use a reverse proxy with HTTPS and set CURLSMS_ALLOW_HOSTS to its host name.
Updating
- Docker:
docker pull ndemme/curlsms-bridge:latest, then remove and start the container again with the same command (docker rm -f curlsms-bridge,docker run …). Compose:docker compose pull && docker compose up -d. The volume keeps settings, token and history. - Program: stop the service, replace the file, start it again. The data directory stays; it is updated automatically on start.
Troubleshooting
- Setup code not found: until the password is set, the bridge logs a new code on every start; only the latest one is valid.
setup-codeprints it. - "Unknown host name" in the browser: open the interface by IP address or add the name to
CURLSMS_ALLOW_HOSTS. - Devices blocked in
lan_openorip_allowlistmode: with Docker port mapping (especially Docker Desktop) the bridge may see the address of the Docker network instead of the device. Use token mode, or--network hoston Linux. - Port in use: change it with
CURLSMS_REST_PORT,CURLSMS_SMTP_PORTorCURLSMS_UI_PORT(Docker: change the left side of-p). - Health check:
curlsms-bridge healthexits with 0 when the interface answers; the Docker image uses it asHEALTHCHECK. - Self test: the page Self test checks every input from the bridge itself, without sending an SMS.
- Questions to help@curl-sms.com.