Self-hosted app·Privacy and networking
SWAG (Secure Web Application Gateway) hosting
on a Panama VPS.
SWAG (Secure Web Application Gateway) hosting on a Panama VPS: Docker Compose setup, wildcard certs via DNS, fail2ban, sizing and cost from $12.99/mo.
- LinuxServer.io
- NGINX
- Let's Encrypt
- Docker
PTY1·Panama City
In stockRecommended for this use case
- 1 Gbps port15 TB of transfer a monthIncluded
- Debian 13preinstalled with the orderIncluded
- DDoS protection, 1 IPv4VNC console and full rootIncluded
Optional: daily backups +20% · extra IPv4 $2 · priority support $10
Pay yearly: $116.99 a year, about 25% less
- No KYC
- Crypto only
- Panama jurisdiction
- 4 vCPU, 4 GB RAM
- 160 GB NVMe local storage
- 15 TB transfer on a 1 Gbps port
- DDoS protection included
- Panamanian law
01/06
Short answer.
Yes. SWAG runs on any of our Cloud VPS plans in PTY1, Panama City, and we recommend VPS Standard on Debian 13: 4 vCPU, 4 GB RAM, 160 GB NVMe and 15 TB of monthly transfer for $12.99. SWAG on its own would fit on Starter. We size for Standard because a reverse proxy is never the only thing on the machine, and the applications behind it are what consume memory.
The one thing that matters most: SWAG should be the only container that publishes ports. Docker handles published ports in the nat table, before packets reach the INPUT chain where ufw or your own ruleset lives, so a backend published "temporarily" on :8080 is reachable from the whole internet without TLS, without fail2ban and without whatever authentication you configured in nginx. Put the applications on an internal Docker network, give them no ports: entry at all, and let SWAG reach them by container name.
02/06
What SWAG is
and who maintains it.
SWAG is a container image maintained by LinuxServer.io, the volunteer group behind the lscr.io/linuxserver/* images. It was published as linuxserver/letsencrypt until August 2020 and, despite both names, has no affiliation with Let's Encrypt. One Alpine-based image bundles nginx as web server and reverse proxy, PHP-FPM (PHP 8.5 since the rebase to Alpine 3.24 in July 2026), a certbot client that obtains and renews certificates from Let's Encrypt or ZeroSSL, and fail2ban with five nginx jails active by default. It also ships a library of preset proxy configurations for common self-hosted applications; you activate one by removing .sample from its file name, and each contains commented include lines for Authelia, Authentik, Tinyauth or LDAP authentication.
The tag follows certbot's version number. The current release, 5.8.0-ls488, was published on 3 October 2026: 5.8.0 is certbot, ls488 is LinuxServer's build counter. Images exist for amd64 and arm64.
People who choose SWAG over Nginx Proxy Manager or Traefik are usually those who already read nginx configuration and want to keep it as text. Every proxy rule is a file under /config/nginx, so it diffs, goes into git and survives a rebuild without a database export. If you would rather click through a web interface, NPM suits you better; if containers come and go and you want routing declared in labels, Traefik does. SWAG's weakness is the other side of its strength: upstream changes to configuration templates are not merged into files you have edited, so you own the drift.
Our servers are in Panama City and answer to Panamanian law. A US DMCA notice has no legal effect here, and we act only on valid orders from competent Panamanian authorities.
03/06
Requirements and sizing.
LinuxServer.io publishes no minimum hardware figures, and we have not measured them on our own plans.
| Resource | What SWAG needs |
|---|---|
| CPU | No published minimum; load comes from TLS handshakes, plus PHP if you serve PHP from SWAG itself |
| Disk | One image; /config grows with logs |
| Ports | 443/tcp required; 80/tcp for HTTP validation and the HTTP→HTTPS redirect; 443/udp only if you enable HTTP/3 |
| Privileges | NET_ADMIN capability, so fail2ban can write iptables rules |
| Architecture | amd64 or arm64 |
The plan follows from what sits behind the proxy. The column on the right is a rule of thumb based on what the backends typically need, not a benchmark of SWAG.
| Plan | Specs | Comfortable for |
|---|---|---|
| VPS Starter, $6.99/mo | 2 vCPU / 2 GB / 80 GB NVMe / 10 TB / 1 Gbps | SWAG plus static sites or one or two small services |
| VPS Standard, $12.99/mo | 4 vCPU / 4 GB / 160 GB NVMe / 15 TB / 1 Gbps | SWAG plus a typical stack: cloud VPS with MariaDB, a password manager, a few light apps |
| VPS Pro, $22.99/mo | 6 vCPU / 8 GB / 320 GB NVMe / 20 TB / 1 Gbps | Media servers, several databases, anything that transcodes |
VPS transfer is metered: each plan includes the monthly volume shown. In theory a 1 Gbps port moves at most 125 MB/s, about 10.8 TB a day, so Standard's 15 TB could be used up in roughly a day and a half of saturated traffic. Where the backend lives matters more than the port. If the applications run in containers on the same VPS, traffic between them and SWAG stays on the Docker bridge and never touches the network interface. If SWAG is the public front for a server at home reached over WireGuard, every byte served arrives through the tunnel and leaves again towards the visitor.
04/06
Deploying SWAG
on a PTY1 VPS.
- 01
Order and DNS
Order VPS Standard with Debian 13 from the VPS Standard deploy link. No-KYC: an email address is enough to open the account (how no-KYC accounts work with us), and payment is in crypto. Point an
Arecord for your domain at the VPS IPv4, plus either a wildcard*record or one record per subdomain.Choose the validation method before the first start, because it decides what you publish. Every hostname on a publicly trusted certificate is written into the public Certificate Transparency logs, which anyone can search. A certificate obtained by HTTP validation with
SUBDOMAINS=vault,nextcloud,grafanais a public inventory of your services; a wildcard obtained by DNS validation lists only*.example.com. SWAG supports several dozen DNS providers for this, among them deSEC, Njalla, Porkbun, Cloudflare and Hetzner, and reads their credentials from/config/dns-conf/<plugin>.ini. That token can rewrite your zone, so treat the file like an SSH private key and scope the token to a single zone where the provider allows it. - 02
Docker Engine
Debian 13 (trixie) is on Docker's supported list. Use Docker's repository rather than Debian's
docker.iopackage:apt update && apt install -y ca-certificates curl install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc chmod a+r /etc/apt/keyrings/docker.asc tee /etc/apt/sources.list.d/docker.sources <<EOF Types: deb URIs: https://download.docker.com/linux/debian Suites: trixie Components: stable Architectures: $(dpkg --print-architecture) Signed-By: /etc/apt/keyrings/docker.asc EOF apt update && apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin - 03
Compose file
Save as
/opt/swag/compose.yaml. Vaultwarden stands in for whatever you put behind the proxy.services: swag: image: lscr.io/linuxserver/swag:5.8.0-ls488 # pinned; bump deliberately container_name: swag cap_add: - NET_ADMIN environment: - PUID=1000 - PGID=1000 - TZ=America/Panama - URL=example.com - VALIDATION=dns - SUBDOMAINS=wildcard - DNSPLUGIN=desec - STAGING=true # set to false once validation succeeds - SWAG_AUTORELOAD=true volumes: - ./config:/config ports: - "443:443" - "80:80" # only for the HTTP->HTTPS redirect networks: - proxy restart: unless-stopped vaultwarden: image: vaultwarden/server:latest # pin this one too in production container_name: vaultwarden volumes: - ./vaultwarden:/data networks: - proxy restart: unless-stopped # no "ports:" - only SWAG talks to it networks: proxy: name: proxyEMAILis left out on purpose. Let's Encrypt stopped sending expiry notices on 4 June 2025 and deleted the addresses it held against ACME accounts, so with Let's Encrypt the variable only gives away an address. Set it if you switch to ZeroSSL, which requires one. - 04
First start, then production
cd /opt/swag docker compose up -d nano config/dns-conf/desec.ini # dns_desec_token = <your token> docker restart swag docker logs -f swag # wait for "Server ready"The first start fails validation until the token is in place; that is expected. Once a staging certificate comes through, set
STAGING=falseand rundocker compose up -dagain. SWAG compares its settings with those recorded at the previous start and requests a production certificate. Staging first is worth the extra minute: Let's Encrypt rate-limits repeated failures, and a mistyped token in a restart loop can block new attempts for a while.Then enable the preset for your application:
cd /opt/swag/config/nginx/proxy-confs cp vaultwarden.subdomain.conf.sample vaultwarden.subdomain.confWith
SWAG_AUTORELOAD=true, nginx picks up the file without a restart. The preset expects the upstream container to be calledvaultwarden. Keep container names lowercase: nginx lowercases hostnames before resolving them through Docker's DNS, soVaultWardenwould never resolve. - 05
Updates, renewals and backups
Pinning the tag means reading the changelog before each bump. SWAG does not rewrite configuration files you have edited; it logs a warning at start when one of them is older than its template. The entry of 20 October 2026 is typical:
proxy.confand the Authelia, Authentik and Tinyauth server files changed how the Host header is passed upstream, and anyone with edited copies had to apply the change by hand.Renewal needs no attention. SWAG checks certificates twice a day using ACME Renewal Information, which keeps up as Let's Encrypt shortens lifetimes: its default profile moves to 64-day certificates on 10 February 2027 and to 45 days on 16 February 2028. What breaks in that transition is any other job on the server that renews on a fixed 60-day schedule. Since expiry emails are gone, point an external monitor at your certificates.
Everything that matters lives in
/config: private keys, certificates, nginx configuration, the DNS API token and the fail2ban database. Back it up encrypted and off the server. restic to an object storage bucket over the S3 API does this, and its client-side encryption matters here because the DNS token is in the archive:export AWS_ACCESS_KEY_ID=<access key> AWS_SECRET_ACCESS_KEY=<secret key> restic -r s3:https://<endpoint>/<bucket>/swag init restic -r s3:https://<endpoint>/<bucket>/swag backup /opt/swag/config
05/06
Cost.
| Item | Price |
|---|---|
| VPS Standard, monthly | $12.99 |
| VPS Standard, billed yearly (≈ −25 %) | $116.99/year, ≈ $9.75/month (the yearly price divided by twelve) |
| VPS Standard with daily backups (+20 %) | ≈ $15.59/month (theoretical: 12.99 × 1.2) |
| Extra IPv4 | $2/month |
| Object storage, 250 GB bucket for restic | $1.99/month |
| VPS Starter, if SWAG runs alone | $6.99/month |
Standard includes 4 vCPU, 4 GB RAM, 160 GB NVMe and 15 TB of transfer on a 1 Gbps port, with one IPv4 address. SWAG itself costs nothing. A Standard VPS with a 250 GB bucket for backups comes to $14.98 a month.
Payment is crypto only (AVAX, BCH, BNB, BTC, DOGE, ETH, LTC, SOL, TRX, USDC, USDT, XMR), with prices and balances in US dollars. Top-ups run from $25 to $5,000, with a bonus of 5 % from $50, 10 % from $100, 15 % from $250 and 20 % from $500. In theory a $100 top-up becomes $110 of credit, eight full months of Standard. The unused paid part of a top-up is refundable within 14 days. The full grid is on the pricing page.
06/06
Limits, acceptable use
and your obligations.
TLS terminates inside your VM, and the server sits in PTY1 under Panamanian law. Article 29 of the Constitution allows private communications to be intercepted only on the order of a judicial authority. That is a procedure, not immunity: Panama and the United States have had a mutual legal assistance treaty in criminal matters in force since 6 September 1995, so a US criminal request reaches a Panamanian server through that treaty and a Panamanian authority. As of 31 October 2026 the US Department of Justice lists CLOUD Act executive agreements only with the United Kingdom and Australia, none with Panama. The offshore hosting page covers the jurisdiction in more detail.
SWAG writes nginx access logs under /config/log/nginx, client IP addresses included. Those are personal data under Panama's Law 81 of 2019, implemented by Executive Decree 285 of 2021. Logrotate inside the container rotates the files; how long you keep them is your decision, and it should be one you can justify. If your visitors are in the EU, Panama has no adequacy decision, so transfers of their data need safeguards such as the 2021 standard contractual clauses.
A reverse proxy is also the standard tool of phishing kits: point nginx at somebody else's login page, put it behind a look-alike domain and collect credentials. Proxying or mirroring a third-party site to impersonate it is phishing, which our acceptable use policy excludes along with malware distribution and anything Panamanian law forbids. Do not build an open relay by accident either: a proxy_pass whose upstream comes from the request ($host, $http_host or a query argument) lets anyone push traffic through your IP, and abuse reports about it land on you. A DMCA notice has no legal effect on servers in Panama. We forward copyright complaints to the customer and act on a decision of a competent Panamanian authority, or where the content is manifestly unlawful.
You are responsible for everything served under your domains, including the applications of friends you proxy for. Answer forwarded complaints, keep the image current, and put admin interfaces behind authentication. Bear in mind that fail2ban in SWAG bans inside the container's network namespace: it protects what nginx serves, not SSH on the host. Harden SSH separately with keys only and a host-level rate limit, and note that running SWAG with a read-only filesystem disables fail2ban altogether.
Catalogue·Options
Every configuration, every option, every price.
Six cloud VPS plans on AMD EPYC with local NVMe. Transfer is included on every plan, from 10 TB to 100 TB a month.
| Plan | vCPU | Memory | NVMe | Transfer | Port | Price | Deploy |
|---|---|---|---|---|---|---|---|
| StarterStaging, dev | 2 | 2 GB | 80 GB | 10 TB / month | 1 Gbps | $6.99/mo | Deploy Starter |
| StandardRecommendedSmall apps | 4 | 4 GB | 160 GB | 15 TB / month | 1 Gbps | $12.99/mo | Deploy Standard |
| ProProduction | 6 | 8 GB | 320 GB | 20 TB / month | 1 Gbps | $22.99/mo | Deploy Pro |
| PowerHeavy workloads | 12 | 16 GB | 640 GB | 40 TB / month | 2 Gbps | $42.99/mo | Deploy Power |
| UltraDatabases | 16 | 32 GB | 1000 GB | 60 TB / month | 2 Gbps | $65.99/mo | Deploy Ultra |
| TitanDense hosts | 32 | 64 GB | 2000 GB | 100 TB / month | 5 Gbps | $119.99/mo | Deploy Titan |
Every plan runs on AMD EPYC with local NVMe. Yearly billing costs about 25% less.
Every plan
- AMD EPYCon every host
- Local NVMenot network storage
- DDoS protectionalways on
- 1 IPv4 addressmore at $2 each
- VNC consoleand full root access
FAQ
Questions
people ask first.
Short answers about running this in PTY1. If yours is not here, open a ticket from your panel.
Can I run SWAG without owning a domain?
Yes, with a free DuckDNS subdomain. DuckDNS has one restriction: a DNS-validated certificate covers either yourname.duckdns.org itself or the wildcard below it, not both at once. For anything you intend to keep, a real domain with DNS validation is less trouble.
SWAG, Nginx Proxy Manager or Traefik on a 4 GB VPS?
Choose by how you want to manage configuration rather than by footprint. SWAG keeps plain nginx files and is the only one of the three that bundles fail2ban; Nginx Proxy Manager gives you a web interface backed by a database; Traefik discovers containers through labels. All three run on VPS Standard with room for the applications behind them.
Can a Panama VPS front services that run at home?
Yes, and it is a common reason to rent one. Run a WireGuard tunnel between the VPS and the home server, set $upstream_app in the proxy conf to the home server's tunnel address, and your DNS only ever shows the PTY1 address. The cost is an extra network hop and transfer counted on the VPS. See cloud VPS.
Does port 80 have to stay open?
Only for HTTP validation and for redirecting http:// to https://. With DNS validation you can drop the 80:80 mapping and renewals carry on; visitors who type the bare domain then get a refused connection instead of a redirect, which is why most people keep it.
Who holds the private key for my certificates?
You do. certbot generates it inside the container and stores it under /config/etc/letsencrypt on your VM's disk; we do not issue or manage your certificates. As with any VPS, the provider runs the hypervisor. If that is part of your threat model, a dedicated server removes the shared host layer, from $64.99 a month for the Iron model.
Does hosting SWAG in Panama put my site outside US jurisdiction?
No host can promise that. The server and its data are governed by Panamanian law, Panama has no CLOUD Act agreement, and US criminal requests go through the 1995 treaty and a Panamanian authority. Your registrar, your DNS provider and your certificate authority are separate links with jurisdictions of their own; Let's Encrypt is operated by ISRG, a US non-profit.
Sources
Every fact on this page, with its source
Checked 5 Nov 2026 unless noted.
Panamanian law and authorities
EU and other countries
- US Department of Justice, CLOUD Act resources (executive agreements with the United Kingdom and Australia only)justice.gov · verified 31 Oct 2026
- Regulation (EU) 2016/679, Article 46eur-lex.europa.eu
Industry, providers and software
Other references
- LinuxServer.io, linuxserver/swag image documentation: parameters, fail2ban jails, ARI renewal checks, QUIC, read-only caveats, changelog (19.07.26 rebase to Alpine 3.24 with PHP 8.5; 20.10.26 config update)docs.linuxserver.io
- LinuxServer.io, SWAG setup guide: validation methods, DuckDNS limitation, proxy-conf structure, Docker networking and lowercase container namesdocs.linuxserver.io
- Docker documentation, "Packet filtering and firewalls", section "Docker and ufw"docs.docker.com
- Let's Encrypt, "Ending Support for Expiration Notification Emails", 22 January 2025letsencrypt.org
- Let's Encrypt, "Expiration Notification Service Has Ended", 26 June 2025letsencrypt.org
- ISRG, "Decreasing Certificate Lifetimes to 45 Days" (64-day default from 10 February 2027, 45 days from 16 February 2028)isrg.org
- RFC 9162, "Certificate Transparency Version 2.0", December 2021rfc-editor.org
- US Department of State, Panama–United States Mutual Legal Assistance Treaty (signed 1991, in force 6 September 1995)state.gov
Your server in Panama,
ready when you are.
Cloud VPS start at $6.99 a month and are ready 60 to 120 seconds after you order.