> For the complete documentation index, see [llms.txt](https://docs.hipersnipe.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hipersnipe.com/for-operators/deployment.md).

# Deployment

## Server requirements

| Resource | Minimum          | Recommended      |
| -------- | ---------------- | ---------------- |
| CPU      | 2 vCPU           | 4 vCPU           |
| RAM      | 4 GB             | 8 GB             |
| Disk     | 20 GB SSD        | 40 GB SSD        |
| OS       | Ubuntu 22.04 LTS | Ubuntu 24.04 LTS |

## Deploy script

`deploy.sh` automates pull, dependency install, and service restart. Review before running in production.

## systemd service

See [Running the bot](/for-operators/running-the-bot.md) for unit file example.

Service name in production is often `solana-bot`.

## Environment file

Place `.env` in project root. Restrict permissions:

```bash
chmod 600 .env
chmod 700 secure_storage/
```

## Database

* `users.db` created on first run
* **Do not** commit or overwrite in deployments
* Back up before upgrades

## Process management

| Script            | Purpose                          |
| ----------------- | -------------------------------- |
| `start_bot.py`    | Launch bot + limit engine        |
| `restart_bot.py`  | Kill tree via `bot.pid`, restart |
| Admin Hard Reboot | Same from Telegram               |

## Upgrades

```bash
git pull origin main
source venv/bin/activate
pip install -r requirements.txt
sudo systemctl restart solana-bot
```

Migrations run automatically on startup—no manual SQL required.

## Monitoring

See [Monitoring and logs](/for-operators/monitoring.md).

## Firewall

Only SSH (22) needs to be public. The bot uses outbound HTTPS/WSS only—no inbound ports required.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hipersnipe.com/for-operators/deployment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
