# Install using a dist file {#install-using-a-dist-file}


If you are going to host Shlink yourself, you need to make sure your server fulfils its requirements:

- PHP 8.3, 8.4 or 8.5
- The next PHP extensions: json, curl, pdo, intl, gd and gmp/bcmath.
  - apcu extension is recommended if you don't plan to use RoadRunner.
  - ~xml extension is required if you want to generate QR codes in svg format.~ (QR code generation is deprecated, see [this issue](https://github.com/shlinkio/shlink/issues/2408) for details).
  - sockets and bcmath extensions are required if you want to integrate with a RabbitMQ instance, or use [RoadRunner to serve Shlink](https://sourcey-shlink.pages.dev/documentation/supported-runtimes/serve-with-roadrunner/index.md).
- MySQL, MariaDB, PostgreSQL, MicrosoftSQL or SQLite.
  - You will also need the corresponding pdo variation for the database you are planning to use: `pdo_mysql`, `pdo_pgsql` or `pdo_sqlsrv`.
- One of the [supported runtimes](https://sourcey-shlink.pages.dev/documentation/supported-runtimes/index.md).


## Installation steps {#installation-steps}


- Download the latest distributable file and decompress it at the location of your choice (you will find a dist file for every supported PHP version).
  <div class="mt-2 mb-1">
    [Download](https://github.com/shlinkio/shlink/releases/latest)
  </div>

- Create an empty database (not necessary if you are going to use SQLite).
- Recursively grant write permissions to the `data` directory.
- Set-up and customize Shlink by either:
  - Running the [installation tool](https://sourcey-shlink.pages.dev/documentation/command-line-interface/installation-tool/index.md) (`vendor/bin/shlink-installer install`). It's an interactive tool that will guide you through the installation process.
  - Providing your configuration via [env vars](https://sourcey-shlink.pages.dev/documentation/environment-variables/index.md) (since v2.9.0). Useful to pre-define the configuration or if you don't have shell access to the server.
- Optionally, you can create a symlink to the `bin/cli` script in a folder which is in your path.<br />For example `/usr/local/bin` for linux systems. This will allow you to easily run Shlink from anywhere in the command line.
- Generate your first API key (you will need it in order to interact with Shlink's API):
  - For Shlink older than 3.3.0, run `bin/cli api-key:generate`.
  - For Shlink 3.3.0 or newer, the installation tool will create an API key for you. Just copy-paste it.
- Set-up Shlink's runtime:
  - [Serve Shlink using RoadRunner](https://sourcey-shlink.pages.dev/documentation/supported-runtimes/serve-with-roadrunner/index.md).
  - [Serve Shlink with a classic web server](https://sourcey-shlink.pages.dev/documentation/supported-runtimes/classic-web-server/index.md).
- Finally, access to [https://app.shlink.io](https://app.shlink.io) and configure your server to start creating short URLs.
