diff --git a/docs/awesome-remnawave.md b/docs/awesome-remnawave.md index 1830333..9b67c1b 100644 --- a/docs/awesome-remnawave.md +++ b/docs/awesome-remnawave.md @@ -379,9 +379,26 @@ ansible-playbook playbook.yml -K --- +### Remnawave Telegram Shop Bot + +A Telegram bot for selling subscriptions with integration to Remnawave. This service allows users to purchase and manage subscriptions through Telegram with multiple payment system options. YooKass | Telegram Stars | CryptoBot + +Author: [jolymmiles](https://github.com/Jolymmiles) + +
+
+
+ +
+ Remnawave Telegram Shop Bot +
+ +--- + ## Add project to the list -If you want to add your project to the list, please open a PR on [GitHub](https://github.com/remnawave/panel/blob/main/docs/awesome-remnawave/index.md). +If you want to add your project to the list, please open a PR on [GitHub](https://github.com/remnawave/panel/blob/main/docs/awesome-remnawave.md). Make sure that the target branch is `main`. diff --git a/docs/install/remnawave-node.md b/docs/install/remnawave-node.md index 6fdca76..4f4b39a 100644 --- a/docs/install/remnawave-node.md +++ b/docs/install/remnawave-node.md @@ -68,7 +68,7 @@ docker compose up -d && docker compose logs -f -t You can mount additional geosite files into the `/usr/local/share/xray/` directory in the container. -:::caution +:::caution Do not mount the entire folder. Otherwise, you will overwrite the default Xray geosite files. Mount each file individually. ::: @@ -110,3 +110,51 @@ Usage in xray config: ] } ``` +### Log from Node + +You can access logs from the node by mounting them to your host's file system. + +:::caution +You **must** set up log rotation, otherwise the logs will fill up your disk! +::: + +Add the following to the `docker-compose.yml` file: + +```yaml +services: + remnanode: + container_name: remnanode + hostname: remnanode + image: remnawave/node:latest + restart: always + network_mode: host + env_file: + - .env + // highlight-next-line-green + volumes: + // highlight-next-line-green + - '/var/lib/remna:/var/lib/remna' +``` + +Usage in xray config: + +```json + "log": { + "error": "/var/lib/remna/error.log", + "access": "/var/lib/remna/access.log", + "loglevel": "warning" + } +``` + +Log rotation using logrotate: + +```bash + /var/lib/remna/*.log { + size 50M + rotate 5 + compress + missingok + notifempty + copytruncate + } +``` diff --git a/docs/install/remnawave-subscription-page.md b/docs/install/remnawave-subscription-page.md index 409d1e3..2724d31 100644 --- a/docs/install/remnawave-subscription-page.md +++ b/docs/install/remnawave-subscription-page.md @@ -68,8 +68,8 @@ You can replace it parameter with, for example, - CUSTOM_SUB_PREFIX=sub ``` -to get an additional nested path for the subscription page. -But in that case, in the `.env` file for the `remnawave` container, you will need to set the corresponding parameter correctly: `SUB_PUBLIC_DOMAIN=link.domain.com/sub`. +to get an additional nested path for the subscription page. +But in that case, in the `.env` file for the `remnawave` container, you will need to set the corresponding parameter correctly: `SUB_PUBLIC_DOMAIN=link.domain.com/sub`. And you will need to specify similar changes to the valid path in your configurations for Nginx/Caddy. ::: @@ -693,7 +693,67 @@ Some applications require the subscription URL to be Base64 encoded: "isNeedBase64Encoding": true ``` -### Mounting to the subscrion-page +--- + +### Mounting custom template + +This can be helpful if you want fully change UI of the subscription page. + +- **`index.html`** + Must be mounted at: + ```yaml + volumes: + - ./index.html:/opt/app/frontend/index.html + ``` +- **Static assets (all files in the `assets` directory)** + Must be mounted at: + + ```yaml + volumes: + - ./assets:/opt/app/frontend/assets + ``` + + :::tip + You can find the source index.html here: + [subscription-page/frontend/index.html](https://github.com/remnawave/subscription-page/blob/main/frontend/index.html) + ::: + +#### Template Variables + +Your HTML template must include three variables: + +| Variable | Description | +| ------------------------ | ---------------------------------------------------------------------------------------------------------- | +| `<%= metaTitle %>` | Will be resolved as META_TITLE (from .env) | +| `<%= metaDescription %>` | Will be resolved as META_DESCRIPTION (from .env) | +| `<%- panelData %>` | Base64‑encoded data (string), exactly matching the response from the /api/sub/``/info endpoint. | + +
+Example of using panelData + +```js +let panelData +panelData = '<%- panelData %>' +try { + panelData = JSON.parse(atob(panelData)) +} catch (error) { + console.error('Error parsing panel data:', error) +} +``` + +
+ +:::danger +After mounting your template, ensure all three variables are present and used correctly in your code. If so, your subscription page will work out of the box without any further modifications. +::: + +Restart the subscription-page container to apply the changes. + +```bash +docker compose down && docker compose up -d && docker compose logs -f +``` + +### Custom app-config.json (custom apps) Modify your docker-compose.yml file to mount the app-config.json file to the subscription-page container: diff --git a/docs/migrate/marzban.md b/docs/migrate/marzban.md index d912505..0b4005f 100644 --- a/docs/migrate/marzban.md +++ b/docs/migrate/marzban.md @@ -35,8 +35,8 @@ Download the precompiled Remnawave migration tool from the GitHub releases page. # Create and navigate to a working directory mkdir -p /opt/remnawave && cd /opt/remnawave -# Download the latest version (v1.3.0 as of this guide) -wget https://github.com/remnawave/migrate/releases/download/v1.3.0/remnawave-migrate-v1.3.0-linux-amd64.tar.gz +# Download the latest version (v1.4.0 as of this guide) +wget https://github.com/remnawave/migrate/releases/download/v1.4.0/remnawave-migrate-v1.4.0-linux-amd64.tar.gz ``` ### 2.2. Extracting the Tool @@ -45,7 +45,7 @@ Unpack the downloaded archive to access the binary. ```bash # Extract the tarball -tar -xf remnawave-migrate-v1.3.0-linux-amd64.tar.gz +tar -xf remnawave-migrate-v1.4.0-linux-amd64.tar.gz ``` :::tip @@ -84,10 +84,21 @@ The tool supports the following flags and their corresponding environment variab | `--batch-size` | `BATCH_SIZE` | Number of users to process per batch | `100` | | `--last-users` | `LAST_USERS` | Migrate only the last N users (0 = all users) | `0` | | `--preferred-strategy` | `PREFERRED_STRATEGY` | Traffic reset strategy for all users | - | -| `--preserve-status` | `PRESERVE_STATUS` | Preserve user status from source panel | `false` | +| `--source-headers` | `SOURCE_HEADERS` | Additional headers for source panel | - | +| `--dest-headers` | `DEST_HEADERS` | Additional headers for Remnawave (e.g., X-Api-Key) | - | +| `--preserve-status` | `PRESERVE_STATUS` | Preserve user status from source panel | `false` | :::tip +If you’re using Remnawave with additional security provided by Caddy, you need to follow these steps: +1. Log in to the Auth Portal and navigate to API Keys +2. Issue a new API key +3. Pass this key using the --dest-headers flag in the following format: + ```bash + --dest-headers="X-Api-Key:api-key-from-auth-portal" + ``` + ::: +:::tip - Use `--last-users=5` for a test migration with a small subset of users. - Obtain your Remnawave API token from the Remnawave panel settings (e.g., under API or Integrations). ::: @@ -126,13 +137,14 @@ services: hostname: remnawave-subscription-page restart: always environment: - - REMNAWAVE_PLAIN_DOMAIN=domain.com - - SUBSCRIPTION_PAGE_PORT=3010 + - APP_PORT=3010 + - REMNAWAVE_PANEL_URL=http://remnawave:3000 ports: - '127.0.0.1:3010:3010' networks: - remnawave-network - + volumes: + - ./app-config.json:/opt/app/frontend/assets/app-config.json networks: remnawave-network: driver: bridge @@ -151,17 +163,18 @@ services: hostname: remnawave-subscription-page restart: always environment: - - REMNAWAVE_PLAIN_DOMAIN=domain.com - - SUBSCRIPTION_PAGE_PORT=3010 + - APP_PORT=3010 + - REMNAWAVE_PANEL_URL=http://remnawave:3000 - MARZBAN_LEGACY_LINK_ENABLED=true - MARZBAN_LEGACY_SECRET_KEY=secret - REMNAWAVE_API_TOKEN=token - - CUSTOM_SUB_PREFIX=custom + - CUSTOM_SUB_PREFIX=sub ports: - '127.0.0.1:3010:3010' networks: - remnawave-network - + volumes: + - ./app-config.json:/opt/app/frontend/assets/app-config.json networks: remnawave-network: driver: bridge @@ -172,8 +185,8 @@ networks: | Variable | Description | Example Value | | ----------------------------- | ----------------------------------------------------------------------------------------------- | ------------------ | -| `REMNAWAVE_PLAIN_DOMAIN` | The address of your Remnawave panel (without `https://`). | `panel.domain.com` | -| `SUBSCRIPTION_PAGE_PORT` | The port on which the subscription page service runs. | `3010` | +| `REMNAWAVE_PANEL_URL` | Remnawave Panel URL, can be http://remnawave:3000 or https://panel.example.com | `http://remnawave:3000` | +| `APP_PORT` | The port on which the subscription page service runs. | `3010` | | `MARZBAN_LEGACY_LINK_ENABLED` | Enables support for legacy Marzban subscription links. Must be `true` to use the options below. | `true` | | `MARZBAN_LEGACY_SECRET_KEY` | The secret key from your Marzban database, required for decrypting legacy links. | `secret` | | `REMNAWAVE_API_TOKEN` | The API token generated from your Remnawave panel dashboard (under "API Tokens"). | `token` | diff --git a/docs/sdk/typescript-sdk.md b/docs/sdk/typescript-sdk.md index 6a06566..b69c866 100644 --- a/docs/sdk/typescript-sdk.md +++ b/docs/sdk/typescript-sdk.md @@ -28,6 +28,8 @@ Always pick and pin the correct version of the SDK to match the version of the R | Contract Version | Remnawave Panel Version | | ---------------- | ----------------------- | +| 0.7.2 | 1.6.3 | +| 0.7.1 | 1.6.2 | | 0.7.1 | 1.6.1 | | 0.7.0 | 1.6.0 | | 0.4.5 | 1.5.7 | diff --git a/static/awesome/remnawave-telegram-shop-bot.webp b/static/awesome/remnawave-telegram-shop-bot.webp new file mode 100644 index 0000000..c775cbb Binary files /dev/null and b/static/awesome/remnawave-telegram-shop-bot.webp differ