BlogStreamlit

How to deploy a Streamlit app.

Streamlit deploys with one sentence. Antideploy finds your entry file and starts it with the flags it needs behind a proxy.

How the Agent API works
  • Entry file foundstreamlit_app.py, app.py, main.py and more
  • Started for youWith the port and proxy flags set
  • WebSockets stay openNo time limit of our own
  • 1 GB of memoryLoad big models lazily

The short answer

To deploy a Streamlit app, give your coding agent the sentence below. Antideploy finds Streamlit in your requirements, finds the file that imports it, and starts it with the flags it needs behind a proxy. You do not set the port or write a start command. Each app has 1 GB of memory, so load large models when first needed rather than at startup.

Say this to your coding agent

Set this project up to deploy on Antideploy. Fetch https://antideploy.com/agent.md and follow it.

What Antideploy detects

  • Streamlit. Detected from streamlit in requirements.txt or pyproject.toml. If a project also imports Flask, it is still treated as Streamlit.
  • The entry file. It looks for streamlit_app.py, app.py, dashboard.py, main.py and home.py, in that order, in the folder of your requirements. The first one that contains import streamlit wins. Otherwise it uses any .py file that imports Streamlit.
  • The start command. streamlit run <entry> --server.port $PORT --server.address 0.0.0.0 with --server.headless true, --server.enableCORS false and --server.enableXsrfProtection false. Those flags are what make Streamlit work behind a proxy.
  • The port. It starts the app with PORT set, and the start command passes it to Streamlit.

What your project needs

requirements.txt
streamlit
pandas

Nothing else is required. You do not call a server from your code, and you do not change the port.

WebSockets and sessions

Streamlit keeps a WebSocket open to every browser tab. Antideploy sets no time limit of its own on a connection, and each app is one long-running process, so sessions behave as they do on your own machine. An idle WebSocket to a Streamlit app stayed open for 330 seconds in our test on 19 September 2026, until we closed it.

Memory

Every app gets 1 GB. A Streamlit app that loads a model or a large dataset when the script starts can run out of memory and be stopped before it listens. The deploy tells you when that happens. The usual fix is to load the data the first time it is needed, and cache it with st.cache_resource.

Step by step

  1. Check your requirements

    streamlit is listed, and any model or dataset is loaded lazily.

  2. Paste the sentence and approve one link

    Your agent creates the app and builds it.

  3. Deploy and open the link

    Antideploy installs your requirements, starts Streamlit and checks that it answers. Your agent tells you the address.

Secrets

Keep API keys out of your code and out of any file you commit. Use environment variables, and read them with os.environ. Values you save on Antideploy are encrypted and write-only.

01Before you commit

Here's where it stops.

A platform that only tells you what it is good at is one you find the edges of in production. These are the ones to know before your first deploy.

  1. Apps sleep when idle

    On every plan, an app nobody is using goes to sleep and the next visit wakes it. The first request took 2.9 to 13.9 seconds in our measurements, depending on the stack. There are no always-on workers, so use a cron job or a webhook for background work.

  2. One instance, no previews

    Each app is one instance with 1 shared vCPU and 1 GB of memory, and a Java app gets 1 dedicated vCPU and 2 GB. There are no preview deployments and no per-branch URLs.

  3. The disk forgets

    Anything written to local disk is gone on the next deploy. Apps that speak S3 get a bucket instead.

02Questions

Streamlit questions, answered.

Anything else? Write to us and a person answers.

support@antideploy.com
Why is the first load slow?

Apps sleep when idle. Measured on 19 September 2026, the first request after sleeping took 4.3 to 5.8 seconds for Streamlit, and the next request about 0.14 to 0.15 seconds.

Why is my page blank after it loads?

Streamlit's checks can refuse the WebSocket behind a proxy. Antideploy sets the flags that prevent this. If you started Streamlit with your own start command, add them.

Can I use a Dockerfile?

Yes. If there is a Dockerfile at the root, Antideploy uses it, and its own start command.

Can I keep data between runs?

Use a database or a bucket. The app's disk is replaced on every deploy.

What does it cost?

A Streamlit app counts as one live app. The Free plan includes 1 live app with a server.

Deploy something. Start with one sentence.

Paste one sentence into your coding agent, click Approve once, and get a live link. No card, no trial clock.

Start from GitHub or a folder
Prompt copied Paste it into Claude Code, Codex or Cursor and press Enter.