> For the complete documentation index, see [llms.txt](https://guides.getalby.com/user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guides.getalby.com/user-guide/alby-hub/alby-hub-flavors/linux.md).

# Linux

How to run Alby Hub on Linux?

Do you want to build and run Alby Hub from source on an Ubuntu VM or other Linux architecture? We've got you covered.

{% hint style="warning" %}
The Alby Hub HTTP server listens on all network interfaces by default. Run it only on a secure private network and use a firewall to block its HTTP port from the public internet. For remote access, use a VPN or an HTTPS reverse proxy that restricts who can connect.
{% endhint %}

## Setup code

The official Linux and Raspberry Pi install scripts generate a random setup code automatically and print both the code and a setup link containing it. Open that link on your trusted network, or enter the code when Alby Hub prompts you. Keep the code and link private. The setup-code feature requires Alby Hub v1.24.7 or later.

If you install the HTTP server manually or run it from source instead of using the install scripts, we recommend setting a random `SETUP_CODE` environment variable before the first start. Generate a code with `openssl rand -hex 16` and pass it to the Hub process through your environment or service configuration.

The code protects initial setup, including importing a migration file into a new Hub. It is not your unlock password or recovery phrase and is no longer required once setup is complete. It does not make exposing the HTTP port to the public internet safe.

[Click here to get started.](https://github.com/getAlby/hub?tab=readme-ov-file#deploy-it-yourself)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://guides.getalby.com/user-guide/alby-hub/alby-hub-flavors/linux.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
