[GH-ISSUE #2119] QR import format for AmneziaWG profiles #937

Open
opened 2026-10-13 20:31:20 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @SlenderF on GitHub (Jan 8, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/2119

Hi team,
We’re running a self‑hosted AmneziaWG server on a VPS. Importing the .conf file into the iOS app works correctly. However, when we generate a QR code ourselves (using Python to convert the .conf → JSON → zlib → base64), the app always fails with error 900. The logs show:

qUncompress: Input data is corrupted
stopDecodingQr

We verified that:

  • The QR payload base64‑decodes correctly
  • zlib decompresses correctly
  • The resulting JSON is valid
  • The structure matches what we see in the app’s own backup export

But the app still imports an empty profile.

To avoid further guesswork, could you clarify:

1. The exact JSON schema required for QR import (fields, types, nesting).
2. Whether last_config must be a JSON string or object.
3. Whether config must contain the full WG config as a string.
4. Which AWG fields are required for manual private VPN setups.
5. A minimal valid QR payload example for AmneziaWG.

This would help us generate QR codes fully compatible with the app for self‑hosted private VPN setups.

Thanks!

Originally created by @SlenderF on GitHub (Jan 8, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/2119 Hi team, We’re running a **self‑hosted AmneziaWG server on a VPS**. Importing the `.conf` file into the iOS app works correctly. However, when we generate a QR code ourselves (using Python to convert the `.conf` → JSON → zlib → base64), the app always fails with **error 900**. The logs show: ``` qUncompress: Input data is corrupted stopDecodingQr ``` We verified that: - The QR payload base64‑decodes correctly - zlib decompresses correctly - The resulting JSON is valid - The structure matches what we see in the app’s own backup export But the app still imports an **empty profile**. To avoid further guesswork, could you clarify: **1. The exact JSON schema required for QR import (fields, types, nesting). 2. Whether `last_config` must be a JSON **string** or **object**. 3. Whether `config` must contain the full WG config as a string. 4. Which AWG fields are required for **manual private VPN** setups. 5. A minimal valid QR payload example for AmneziaWG.** This would help us generate QR codes fully compatible with the app for self‑hosted private VPN setups. Thanks!
Author
Owner

@ne0x commented on GitHub (Jan 28, 2026):

I’ve found way to generate correct QR, if it can help you.
https://github.com/ne0x/wg-easy/blob/feat/amneziavpn-qr/src/server/utils/wgHelper.ts

See: ‘generateAmneziaVPNClientConfig’ and ‘buildAmneziaQrPack’ methods

<!-- gh-comment-id:3814106499 --> @ne0x commented on GitHub (Jan 28, 2026): I’ve found way to generate correct QR, if it can help you. https://github.com/ne0x/wg-easy/blob/feat/amneziavpn-qr/src/server/utils/wgHelper.ts See: ‘generateAmneziaVPNClientConfig’ and ‘buildAmneziaQrPack’ methods
Author
Owner

@pohuenix commented on GitHub (Mar 26, 2026):

I’ve found way to generate correct QR, if it can help you. https://github.com/ne0x/wg-easy/blob/feat/amneziavpn-qr/src/server/utils/wgHelper.ts

See: ‘generateAmneziaVPNClientConfig’ and ‘buildAmneziaQrPack’ methods

Perhaps the Amnezia team could add a QR code generator in the AmneziaWG format to their website, like someone did for Wireguard (https://www.wireguardconfig.com/qrcode)?
That would be very helpful, because I'm using wiktorbgu's version of AmneziaWG in a Mikrotik container (https://hub.docker.com/r/wiktorbgu/amneziawg-mikrotik), and I can't connect to it via SSH from the AmneziaVPN app. Actually, I can connect via SSH (I had to add several packages to the container), but the AmneziaVPN app doesn't recognize the installed AmneziaWG services, unfortunately. Consequently, I can't generate a QR code, which would be very useful so my elderly parents, who live in another, less-than-free country, could easily add a config to their phone, as they have a hard time understanding how to manage files on Android...
Or at least some kind of command-line tool. I'm a simple system administrator, and unfortunately, I don't understand code =)

<!-- gh-comment-id:4138762820 --> @pohuenix commented on GitHub (Mar 26, 2026): > I’ve found way to generate correct QR, if it can help you. https://github.com/ne0x/wg-easy/blob/feat/amneziavpn-qr/src/server/utils/wgHelper.ts > > See: ‘generateAmneziaVPNClientConfig’ and ‘buildAmneziaQrPack’ methods Perhaps the Amnezia team could add a QR code generator in the AmneziaWG format to their website, like someone did for Wireguard (https://www.wireguardconfig.com/qrcode)? That would be very helpful, because I'm using wiktorbgu's version of AmneziaWG in a Mikrotik container (https://hub.docker.com/r/wiktorbgu/amneziawg-mikrotik), and I can't connect to it via SSH from the AmneziaVPN app. Actually, I can connect via SSH (I had to add several packages to the container), but the AmneziaVPN app doesn't recognize the installed AmneziaWG services, unfortunately. Consequently, I can't generate a QR code, which would be very useful so my elderly parents, who live in another, less-than-free country, could easily add a config to their phone, as they have a hard time understanding how to manage files on Android... Or at least some kind of command-line tool. I'm a simple system administrator, and unfortunately, I don't understand code =)
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#937
No description provided.