> For the complete documentation index, see [llms.txt](https://antsankov.gitbook.io/go-live/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://antsankov.gitbook.io/go-live/usecases/production-site-hosting.md).

# Production Site Hosting

## Running a Production Server

{% hint style="warning" %}
go-live does not support HTTPS yet, but it is on the roadmap! We recommend Cloudflare for now to handle SSL.
{% endhint %}

Serving a site in production is trivial with go-live. This process is very efficient and can be used with small and inexpensive compute instances. An example of serving a production site is:

```
go-live --dir production-site/ --port 80 --quiet
```

![Running two servers side by side with Tmux. Note the different ports.](/files/-MPqeDFXPFECksXmYkdL)

### Recommended: Start the Process in tmux

To start a persistent session with tmux. Tmux means when you close your SSH session your server won't shut down. Learn about tmux: <https://www.hamvocke.com/blog/a-quick-and-easy-guide-to-tmux/>

```
$ tmux
$ go-live --dir production-site/ --port 80 --quiet
```

### Recommended: Using with a Frontend (nginx)

You can start nginx on the same host as go-live and use it to proxy connections.  Here is an example nginx.conf (located in /etc/nginx/nginx.conf) for example.com on Port 9000.  The go-live process runs on Port 9000, and users connect through nginx on Port 80.&#x20;

```
events {
  worker_connections  4096;  ## Default: 1024
}

http {
server {

    listen 80;
    listen [::]:80;
    server_name example.com;

    location ^~ /{
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;
        proxy_pass    http://127.0.0.1:9000/;
    }
}
}
```

### Recommended: Using with a CDN (Cloudflare)

Cloudflare can provide caching and DDOS protection for your go-live server. We recommend setting up Cloudflare as the DNS provider and then proxying requests to your go-live server IP address on Port 80.\
\
Cloudflare can also provide HTTPS support for users who connect through it.


---

# 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://antsankov.gitbook.io/go-live/usecases/production-site-hosting.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.
