Self-hosted app·Developer tools, backends and AI
Dify.ai hosting
on a Panama VPS.
Dify.ai hosting on a 4 vCPU / 4 GB VPS in Panama City: Docker Compose steps for Dify 1.18.0, honest sizing, cost from $12.99/mo and licence limits.
- Dify
- PostgreSQL
- Redis
- Ollama
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/07
Short answer.
Yes. Dify's Community Edition runs on our Cloud VPS Standard plan (4 vCPU, 4 GB RAM, 160 GB NVMe, 15 TB of transfer a month, $12.99/mo) in PTY1, Panama City, using the Docker Compose stack that ships in the Dify repository. The number that decides the rest is memory. Dify documents 4 GiB as its minimum, and Standard sits on that line: workable for one administrator or a small team calling hosted models, with a swap file as a safety margin. If you expect to index large document collections or let several people run agents at the same time, start on Pro (8 GB, $22.99/mo) rather than finding the limit through the kernel's OOM killer.
Deploy VPS Standard with Debian 13 · Deploy VPS Pro with Debian 13
02/07
What Dify is
and who runs it.
Dify is an open-source platform for building applications on large language models. You assemble chat apps, workflows and chatflows on a visual canvas, attach knowledge bases that Dify chunks, embeds and searches, and publish the result as a web app or behind an API. Version 1.16, released in July 2026, added Dify Agent, a beta agent that runs shell commands inside a Linux sandbox. Models are reached through provider plugins installed from Dify's marketplace, so the server needs outbound HTTPS to the marketplace and to whichever model APIs you configure.
The project is developed by LangGenius, Inc., which also runs the hosted service at cloud.dify.ai and sells an Enterprise edition. What you install on a VPS is the Community Edition, under a modified Apache 2.0 licence covered further down. The current release is 1.18.0 of 23 October 2026. It added agent output routes and a portable .ifpkg app package, and it changed the agent backend's run protocol, a detail that matters the day you upgrade.
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/07
Requirements and sizing.
Dify is a stack rather than a container. The default Compose file starts seven core services (api, api_websocket, worker, worker_beat, web, plugin_daemon, agent_backend) next to a bundled PostgreSQL, Redis, Weaviate as the vector store, a code-execution sandbox, the agent's local sandbox behind its own Squid proxy, and Nginx in front. They all share one machine's RAM. The official floor is 2 CPU cores and 4 GiB of RAM with Docker Compose 2.35.0 or later; the same page asks macOS users to give Docker Desktop 8 GiB, which is a fair indication of where comfort starts.
Disk has no published minimum. Dify 1.17 added an optional cleanup task (ENABLE_CONVERSATION_CLEANUP_TASK) for exactly that reason, and on a public chatbot you will want it.
| Plan | vCPU | RAM | NVMe | Transfer/mo | Price/mo | For Dify |
|---|---|---|---|---|---|---|
| Starter | 2 | 2 GB | 80 GB | 10 TB | $6.99 | Half the documented minimum; the stack will not stay up |
| Standard | 4 | 4 GB | 160 GB | 15 TB | $12.99 | At the floor: small team, hosted models, add swap |
| Pro | 6 | 8 GB | 320 GB | 20 TB | $22.99 | Large knowledge bases, concurrent agent runs |
| Power | 12 | 16 GB | 640 GB | 40 TB | $42.99 | Several teams, heavy indexing |
Only Nginx publishes host ports: 80 by default, and 443 once HTTPS is on. PostgreSQL, Redis, the sandboxes and Weaviate stay on internal Docker networks. Open 22, 80 and 443 and nothing else, and keep one Debian trap in mind: Docker writes its own iptables rules for published ports, so ufw deny 80 does not do what it says. Filter container traffic in the DOCKER-USER chain, as Docker's documentation describes.
Transfer is not the constraint. Standard's 15 TB a month works out, as a theoretical average over a 30-day month, to about 46 Mbit/s sustained around the clock, and a Dify instance mostly moves text. VPS transfer is metered all the same: each plan includes the amount shown, not unlimited traffic.
Running the model on the same VPS is a bad idea. Dify's floor assumes inference happens elsewhere, a quantised 7-billion-parameter model wants several gigabytes of RAM for itself, and none of our plans includes a GPU. If prompts must stay on hardware you control, put Ollama or another OpenAI-compatible server on a dedicated server (Tungsten has 128 GB of DDR5 ECC for $164.99/mo, with CPU-only inference speeds to match) and point Dify's provider plugin at it.
04/07
Deploying Dify 1.18.0
on VPS Standard.
Order the server with Debian 13 from the Standard deploy link, add your SSH key and log in. The commands below assume a root shell.
Start with swap. On a 4 GB machine it turns an indexing spike into a slow minute instead of a killed worker:
fallocate -l 4G /swapfile && chmod 600 /swapfile
mkswap /swapfile && swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstabInstall Docker from Docker's own repository, which lists Debian 13 (trixie) as supported, so the Compose plugin is recent enough for Dify:
apt update && apt install -y ca-certificates curl git openssl
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
cat > /etc/apt/sources.list.d/docker.sources <<'EOF'
Types: deb
URIs: https://download.docker.com/linux/debian
Suites: trixie
Components: stable
Signed-By: /etc/apt/keyrings/docker.asc
EOF
apt update
apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
docker compose version # needs 2.35.0 or laterClone the release tag rather than main, and create the configuration:
git clone --branch 1.18.0 --depth 1 https://github.com/langgenius/dify.git
cd dify/docker
cp .env.example .env
openssl rand -hex 32The .env template ships with development credentials. Replace them before the first docker compose up, because the database password in particular cannot simply be edited later: once PostgreSQL is initialised, you have to change it on the database server first and then in .env.
In docker/.env | Set to |
|---|---|
DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN | the openssl rand -hex 32 output; the agent backend will not start without it |
DB_PASSWORD, REDIS_PASSWORD | strong values |
SANDBOX_API_KEY, CODE_EXECUTION_API_KEY | one strong secret, identical in both |
WEAVIATE_API_KEY | a strong secret, also listed in WEAVIATE_AUTHENTICATION_APIKEY_ALLOWED_KEYS, with WEAVIATE_AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=false |
PLUGIN_DAEMON_KEY, PLUGIN_DIFY_INNER_API_KEY | two different strong values |
DIFY_AGENT_API_TOKEN, DIFY_AGENT_SERVER_SECRET_KEY | a new token, and a secret key in the format Dify's environment reference specifies |
SECRET_KEY | leave it alone; Dify generates one on first start and stores it with its data |
Set INIT_PASSWORD as well. The /install page creates the administrator account for whoever reaches it first, and on a public IP that is not necessarily you. Then start the stack:
docker compose up -d
docker compose ps --allLong-running services should show Up or healthy; init_permissions is a one-off task and should show Exited (0). Open http://<your-server-ip>/install, create the administrator and sign in.
Before anyone else uses it, give it a domain and TLS. Point an A record at the VPS, then either enable HTTPS through the Nginx settings in Dify's environment reference or terminate TLS in a proxy of your own. Real-time collaboration on a remote server also needs NEXT_PUBLIC_SOCKET_URL set to the server's WebSocket address. After any .env change, run docker compose up -d; docker compose restart keeps the containers' old environment, which is a reliable way to lose an afternoon.
Invitations and password resets need mail (MAIL_TYPE and the SMTP_* settings). Outbound port 25 is open on every VPS, so direct delivery works, but an authenticated relay on port 587 will reach more inboxes than a fresh IP address.
Uploaded files go to local disk by default (STORAGE_TYPE is opendal, backed by the filesystem). To keep the NVMe for the databases, set STORAGE_TYPE=s3 with S3_ENDPOINT, S3_BUCKET_NAME, S3_ACCESS_KEY, S3_SECRET_KEY and S3_REGION pointing at a bucket from our S3-compatible object storage; 250 GB costs $1.99/mo. Do it before you upload documents. The buckets speak the S3 API and are not a block device, so PostgreSQL and Weaviate stay on the VPS disk. Dify's documentation notes that file storage also holds workspace encryption keys, which means the bucket's access keys deserve the same care as DB_PASSWORD.
For upgrades, read the target release's notes before touching anything; Dify's recent ones have had teeth. Version 1.17.1 required a staged Weaviate upgrade from 1.27 to 1.39 for existing installs on the bundled Weaviate, and 1.18.0 requires the agent backend and local sandbox images to move together. The procedure itself is short: docker compose stop, back up docker/.env, your local env files and docker/volumes/, then git fetch --tags && git checkout <version>, compare .env.example with your .env, and finish with docker compose pull && docker compose up -d. The daily backups option gives you whole-VPS restore points; for a copy you can restore on another machine, push a pg_dump and the uploaded-files volume to object storage with restic.
05/07
What it costs.
| Item | Per month |
|---|---|
| VPS Standard (4 vCPU, 4 GB, 160 GB NVMe, 15 TB, 1 Gbps) | $12.99 |
| Daily backups (+20 %) | $2.60 |
| Object storage, 250 GB (optional) | $1.99 |
| Extra IPv4 (optional) | $2.00 |
| Priority support (optional) | $10.00 |
Standard with daily backups comes to $15.59 a month. Yearly billing takes roughly 25 % off, about $9.75 a month for the bare plan as a theoretical figure, and Pro is $22.99 before discounts. The plan includes the transfer shown and a public IPv4 with outbound port 25 open. It does not include your model provider's bill, which for an active team is usually larger than the server's.
Payment is in crypto only (AVAX, BCH, BNB, BTC, DOGE, ETH, LTC, SOL, TRX, USDC, USDT or XMR), with prices and balances in US dollars. Top-ups run from $25 to $5,000 and carry a bonus of 5 % from $50, 10 % from $100, 15 % from $250 and 20 % from $500; the unused paid part of a top-up is refundable within 14 days. A $100 top-up becomes $110 of balance, which in theory covers just under eight and a half months of Standard. We accept business customers paying in crypto, and opening an account is no-KYC: an email address is enough. Every plan and option is on the pricing page, and questions before ordering go through a support ticket from the client panel.
06/07
Where your data sits,
and where it does not.
On the VPS in PTY1 live your accounts, app definitions, conversation logs, uploaded documents, embeddings and the model-provider API keys. What leaves the server is every request to the model: the prompt, the retrieved chunks and any file content you pass along go to the provider you configured, under that provider's jurisdiction and retention terms. Hosting Dify in Panama protects the stored corpus and the logs, not the inference call. If that distinction matters to you, the model has to run on hardware you control as well.
For what is stored, the legal setting is Panama's. Panama Host is operated by Cyber Host International, S.A., Addison House Plaza, 1st floor, Panama City. 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. That does not put the server beyond reach. Panama and the United States are bound by a mutual legal assistance treaty in criminal matters, in force since 6 September 1995, so foreign requests travel through Panamanian procedure, and Article 29 of the Constitution allows private communications to be intercepted only on the order of a judicial authority and private documents to be examined only on the order of a competent authority, for specific purposes. Our offshore hosting page goes through the jurisdiction in more depth.
If your knowledge bases or conversations hold personal data of people in the EU, you are the controller and the transfer is yours to document: Panama has no EU adequacy decision, so you need appropriate safeguards such as the 2021 standard contractual clauses. Processing in Panama also falls under Law 81 of 2019 on personal data protection, implemented by Executive Decree 285 of 2021.
07/07
Limits, licence
and acceptable use.
Dify's licence is Apache 2.0 with additional conditions, and it binds you whoever hosts the server. Commercial use is allowed, including Dify as a backend for your own products or as an internal platform. Without written authorisation from LangGenius you may not operate a multi-tenant environment, where one tenant is one workspace, and you may not remove or modify the logo and copyright information in the console or the published apps. Reselling Dify workspaces to clients from one instance therefore needs a commercial licence; LangGenius handles licensing questions at business@dify.ai.
Dify's own release notes say Dify Agent should be offered only to trusted, non-malicious users, because it executes shell commands in a sandbox on your machine. Keep agent apps behind sign-in and keep the sandbox keys private.
On our side, you are responsible for what your Dify apps generate and publish, for respecting your model providers' terms and for securing the instance; an unclaimed /install page hands a stranger the administrator account and, with it, your stored API keys. 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. The rest of what is and is not allowed is set out in our acceptable use policy.
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 Dify run on the $6.99 Starter VPS?
No. Starter has 2 GB of RAM, half of Dify's documented 4 GiB minimum, and PostgreSQL, Weaviate, the plugin daemon and the agent backend all need a share of it. Standard ($12.99/mo, 4 GB) is the smallest plan we recommend for Dify, and Pro ($22.99/mo, 8 GB) is the comfortable one.
Do I have to use Docker to self-host Dify?
Dify supports source installs (1.18.0 needs Python 3.13, Node.js 24 and pnpm), but Docker Compose is the path Dify documents for a single machine and the one its upgrade notes are written against. On a VPS, use Compose unless you have a specific reason not to.
Can I run a local LLM on the same VPS as Dify?
Not sensibly. Dify's minimum assumes inference happens elsewhere, our VPS plans have no GPU, and a local model would compete with PostgreSQL and the workers for the same memory. Run the model on a dedicated server and connect Dify to it through a provider plugin.
Does hosting Dify in Panama keep my prompts private?
It keeps the stored data in PTY1, Panama City: knowledge bases, logs, app definitions and API keys. Prompts and retrieved context still go to the model provider you configure, under that provider's jurisdiction. Only a self-hosted model keeps the whole chain on servers you control.
How do I back up a Dify instance?
Stop the stack and copy docker/.env, your local env files and docker/volumes/, or take a pg_dump while it runs and copy the uploaded-files volume alongside it. Push both to an S3 bucket with restic. The daily backups option (+20 %, $2.60 a month on Standard) adds whole-VPS restore points on top.
Can I offer Dify to my own clients?
As a single-tenant backend behind your own product, yes. Running one instance with a workspace per client is multi-tenant use, which Dify's licence reserves for written authorisation from LangGenius; ask them before you sell it.
Sources
Every fact on this page, with its source
Accessed 4 Nov 2026 unless noted.
Panamanian law and authorities
- Article 29 of the Constitution of PanamaGaceta Oficial 25176 (2004), Legispan
- Law 81 of 26 March 2019 on personal data protection, implemented by Executive Decree 285 of 28 May 2021Gaceta Oficial 28743-A
EU and other countries
- CLOUD Act executive agreements with the United Kingdom and Australia onlyjustice.gov · verified 31 Oct 2026
- No EU adequacy decision for Panama; appropriate safeguards for transfersGDPR, Article 46
Industry, providers and software
- Release 1.18.0 (23 October 2026) and its upgrade guide; 1.17.1 (10 September 2026) staged Weaviate upgrade; 1.17.0 (25 August 2026) conversation cleanup task; 1.16.1 (28 July 2026) agent sandbox behind a Squid proxy; 1.16.0 (17 July 2026) Dify Agent and its trusted-users warninglanggenius/dify releases
- Plugin system and marketplace access introduced with 1.0Dify 1.0.0-beta1 release notes
- Licence conditions (multi-tenant, logo and copyright)Dify LICENSE
- Debian 13 (trixie) supported by Docker Engine; DOCKER-USER chaindocs.docker.com
Other references
- Dify hardware floor (2 cores, 4 GiB), Docker Compose 2.35.0+, bundled PostgreSQL and Weaviate, credentials to replace, published ports, start and health checks, up -d versus restart, upgrade proceduredocs.dify.ai
- Core service names in the default stackDify docs: Docker Compose quick start
- STORAGE_TYPE (default opendal), S3 settings, file storage holding workspace encryption keysDify environment variables reference
- Panama–US mutual legal assistance treaty, signed 1991, in force 6 September 1995US Department of State
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.