# Deploy an app

Ask your agent to put your app online, no GitHub needed: it uploads the code with a Dockerfile, and Estiba builds it, starts it and keeps it running.

A new account needs credit first: the app waits, ready, and starts by itself once you add some.

## What your agent sends

- **Code**: a `.tar.gz` of the project with its `Dockerfile`, up to 100 MB. Estiba builds the image itself and keeps it in the app's volume (below).
- **Or a project on GitHub or GitLab**: your agent can set it up to build there on every push, publish the image to their registry and have Estiba run each new version by itself.
- **Or an image** from a registry, such as `ghcr.io/you/app:latest`. Estiba keeps running the version it started until you or your agent update it, or updates it by itself with each new version of the tag if you turn that on. An app on ports, such as a game server, updates by itself only once nobody is connected, so no player is thrown out.

Your agent also sets the app's environment variables, its [domains](https://estiba.cloud/docs/domains) and ports, a [private network](https://estiba.cloud/docs/private-network-wireguard) if it needs one, and checks the build and the logs after each change, fixing what fails.

Every environment variable is stored encrypted. Passwords, tokens and API keys go in as secrets: once saved, their values are never shown again, not to your agent and not in the dashboard, and the app still gets them. To change one, give it a new value.

## What Estiba does

- Builds the code and starts the app on one of its servers. If that server goes down, an app without a volume starts on another one by itself within a couple of minutes; one with a volume, as every app built from your code has, waits for it.
- Keeps the logs of each deployment, so you and your agent can see what went wrong. What each problem looks like and what to ask: [My app doesn't work](https://estiba.cloud/docs/troubleshooting).
- A website with no visits for 5 minutes sleeps and costs nothing but its volume; the next visit wakes it in a moment. So does an app on ports, such as a game server, with nobody connected: a client that tries again within a few seconds of its first try wakes it, and gets in once the app has started. Apps that must keep running (scheduled jobs, databases, game servers in a public list) stay always on: your agent sets it. Bots with neither domains nor ports never sleep. Or ask for set hours, such as weekdays from 9 to 7 in your time zone: the app starts by itself when they open and stops when they close, bots too, and while closed it costs nothing but its volume and nothing wakes it, not even the bots and scanners that keep a public website awake all night. Step by step: bots for [Discord](https://estiba.cloud/docs/discord-bot-hosting) and [Telegram](https://estiba.cloud/docs/telegram-bot-hosting), game servers for [Minecraft](https://estiba.cloud/docs/minecraft-server-hosting) and [FiveM](https://estiba.cloud/docs/fivem-server-hosting).
- Each app uses the memory and CPU it needs, with no server sizes to choose. You pay for what it uses: see [Credit and prices](https://estiba.cloud/docs/credit-and-prices).

## Keep files: volumes

A container's files are lost when it is deployed again. To keep them, as a database must, your agent gives the app a volume: folders of the container whose files stay, such as `/var/lib/postgresql/data`. A volume has no size to choose; you pay for what it holds, $0.10 per GB a month. An app built from your code has one too, which holds its image. A database, step by step: [MySQL or MariaDB](https://estiba.cloud/docs/mysql-mariadb-hosting), [PostgreSQL](https://estiba.cloud/docs/postgresql-hosting), [MongoDB](https://estiba.cloud/docs/mongodb-hosting) and [Redis](https://estiba.cloud/docs/redis-hosting).

When an app with a volume moves to another server, its files go with it. If its server goes down, it waits for it instead of starting on another one.

You can reach a volume's files from anywhere with SFTP: FileZilla, WinSCP, Cyberduck, rclone, or a script on another server. Ask your agent for an SFTP user for someone. That user sees the whole volume or one folder of it, such as `backups`, and may download, upload or delete, as you choose. So a person can only read your backups, or only drop files in. Your agent gives you the login and its password, shown only once.

## Take it elsewhere

Estiba builds your app from your code and its `Dockerfile`, which stay yours. Build the same image with `docker build` and run it anywhere.
