Installation
Option 1: Download Binary (Recommended)
Pre-built binaries are available for Linux x86_64:
# Download latest release
wget https://github.com/lre66/jsrealm/releases/latest/download/jsrealm-linux-x86_64.tar.gz
tar xzf jsrealm-linux-x86_64.tar.gz
The binary is ready to use
./jsrealm --help
Debug Version
For development and debugging, you can download the debug version with memory leak detection:
wget https://github.com/lre66/jsrealm/releases/latest/download/jsrealm-debug-linux-x86_64.tar.gz
tar xzf jsrealm-debug-linux-x86_64.tar.gz
Option 2: Build from Source
Requirements
- GCC
- Make
- libcares (optional, for DNS)
- libssl-dev (optional, for HTTPS)
- zlib1g-dev (optional, for Gzip)
Build
git clone --recursive https://github.com/lre66/jsrealm.git
cd jsrealm
make jsrealm
The binary will be at jsrealm.
Debug Build
make jsrealm-debug
Debug builds include:
- Memory leak detection
- Additional debug logging
- No optimizations (-O0)
Build Options
| Option | Default | Description |
|---|---|---|
| JS_DNS | 1 | DNS support (requires libcares) |
| JS_SSL | 1 | HTTPS support (requires OpenSSL) |
| JS_GZIP | 1 | Gzip compression (requires zlib) |
| ASAN | 0 | AddressSanitizer for debugging |
Example:
make JS_DNS=0 ASAN=1
Systemd Service
Create /etc/systemd/system/jsrealm.service:
[Unit]
Description=JSRealm Gateway
After=network.target
[Service]
Type=simple
User=jsrealm
Group=jsrealm
WorkingDirectory=/opt/jsrealm
ExecStart=/opt/jsrealm/jsrealm
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
Enable and start:
sudo systemctl enable jsrealm
sudo systemctl start jsrealm