whatisgithub

What is amneziawg-api?

taphix/amneziawg-api — explained in plain English

Analysis updated 2026-05-18

60ShellAudience · developerComplexity · 3/5LicenseSetup · moderate

In one sentence

An HTTP control plane that manages AmneziaWG VPN clients across multiple remote servers over SSH.

Mindmap

mindmap
  root((amneziawg-api))
    What it does
      HTTP control plane
      SSH orchestration
      Config delivery
    Tech stack
      FastAPI
      SQLite
      Docker
      SSH
    Use cases
      Provision VPN clients
      Billing integration
      Track server status
    Audience
      Developers
      VPN operators

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Provision new VPN clients across many servers through one API instead of manual SSH sessions.

USE CASE 2

Let a dashboard or billing system create, extend, or remove VPN client subscriptions automatically.

USE CASE 3

Download ready-to-import AmneziaWG config files and QR codes for each client.

USE CASE 4

Track connection status of VPN servers and clients from a single control plane.

What is it built with?

PythonFastAPISQLiteDockerSSHShell

How does it compare?

taphix/amneziawg-apicode-leafy/g2rayxcodeleafyayghri/i-have-adhd
Stars606061
LanguageShellShellShell
Setup difficultymoderatemoderateeasy
Complexity3/53/51/5
Audiencedeveloperdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires an existing AmneziaWG installation on each managed server plus SSH key access from the control plane.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

AmneziaWG is a VPN tool similar to WireGuard that encrypts internet traffic. When you run AmneziaWG on multiple servers, the normal approach is to log into each server separately and run shell commands. This project adds a single HTTP control layer on top so that other software, dashboards, or billing systems can manage those VPN servers through a standard web API instead. The core idea is straightforward: this application runs on one machine (the control plane), holds SSH credentials to reach your VPN servers, and translates API calls into shell commands on the remote machines. When you ask it to create a new VPN client, it connects to the target server over SSH, runs the management script there, collects the resulting config file and QR code, and stores them locally so you can download them through the API. The API covers the main tasks: registering a VPN server by providing its address and SSH key path, creating a client with a name and expiration date, listing active clients with their connection status, extending a subscription, removing a client, and downloading the generated config file or QR image. All requests require a bearer token you set in an environment file. A per-server command queue prevents two operations from conflicting on the same host at the same time. The project runs as a Python application using FastAPI and SQLite for storage. You can start it directly with a virtual environment or use the included Docker Compose file, which is designed to sit behind a reverse proxy. The README covers both paths and includes working example curl commands for every API endpoint. One thing this project does not do is install AmneziaWG on your servers. You need a working AmneziaWG setup on each remote machine before this control plane is useful. The project is licensed under MIT.

Copy-paste prompts

Prompt 1
Help me deploy amneziawg-api with Docker Compose behind a reverse proxy.
Prompt 2
Walk me through registering a VPN server and creating my first client via the API.
Prompt 3
Explain how the per-server command queue prevents conflicting SSH operations.
Prompt 4
Show me how to set up the required bearer token and SSH key access securely.

Frequently asked questions

What is amneziawg-api?

An HTTP control plane that manages AmneziaWG VPN clients across multiple remote servers over SSH.

What language is amneziawg-api written in?

Mainly Shell. The stack also includes Python, FastAPI, SQLite.

What license does amneziawg-api use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is amneziawg-api to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is amneziawg-api for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.