# Installation Checklist

## Creating the MySQL user and database

* [ ] Log in to the MySQL instance:

```
sudo mysql -uroot -p
[sudo] password for aundro:
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14306
Server version: 10.1.48-MySQL-0+deb9u2 Debian 9.13
```

* [ ] Create the user:

```
MySQL [(none)]> create user lumina@localhost;
Query OK, 0 rows affected (0.00 sec)
```

* [ ] Set the user password:

```
MySQL [(none)]> set password for lumina@localhost = PASSWORD('<snipped>');
Query OK, 0 rows affected (0.00 sec)
```

* [ ] Grant all privileges to the new user:

```
MySQL [(none)]> grant all on *.* to lumina@localhost;
Query OK, 0 rows affected (0.00 sec)
```

* [ ] Use native password:

```
MySQL [(none)]> ALTER USER lumina@localhost IDENTIFIED WITH mysql_native_password BY '<snipped>';
Query OK, 0 rows affected (0.00 sec)
```

* [ ] Create the database:

```
MySQL [(none)]> create database lumina_db;
Query OK, 1 row affected (0.00 sec)
MySQL [(none)]> [Ctrl+C] Bye
```

## New Lumina server

* [ ] Create the Lumina server in the portal. See: [Add servers](/getting-started/licensing.md#add-servers)

## Download the required files

* [ ] Download the **Lumina server license** and **certificate bundle** from the [Servers tab](https://my.hex-rays.com/dashboard/servers).
* [ ] Download the installers (**Lumina server** and **IDA Pro**) from the [Download center](https://my.hex-rays.com/dashboard/download-center/installers/release).

## Installation

* [ ] Start the Lumina server installer and follow the steps on the screen.
* [ ] Copy the Lumina server license, the certificate and the private key previously downloaded to the installation directory.
* [ ] Change the license, certificate and private key ownership and access mode:

```
>cd /opt/lumina
>cp .../path/to/lumina_server.crt .
>cp .../path/to/lumina_server.key .
>cp .../path/to/lumina_server_<LID>.hexlic .
>chown lumina:lumina lumina_server.crt lumina_server.key lumina_server_<LID>.hexlic
>chmod 640 lumina_server.crt lumina_server.key lumina_server_<LID>.hexlic
```

## Initializing the database

Choose either the **Lumina** setup or the **Teams** setup (if the Teams add-on is part of your subscription).

### Lumina setup

The Lumina server manages user authentication.

* [ ] Initialize the database:

```
>sudo -u lumina ./lumina_server --config-file lumina.conf \
                                --certchain-file lumina_server.crt \
                                --privkey-file lumina_server.key \
                                --recreate-schema lumina lumina
Hex-Rays Lumina Server v8.0 Hex-Rays (c) 2022-2024
2022-09-02 10:28:30 Database has been initialized; exiting.
```

### Teams setup

The Teams server (vault server) manages user authentication.

* [ ] Initialize the database:

```
>sudo -u lumina ./lumina_server --config-file lumina.conf \
                                --certchain-file lumina_server.crt \
                                --privkey-file lumina_server.key \
                                --recreate-schema lumina vault
Hex-Rays Lumina Server v8.0 Hex-Rays (c) 2022-2024
2022-09-02 10:28:30 Database has been initialized; exiting.
```

* [ ] Update `lumina.conf` configuration file:

```
VAULT_HOST="<teams-server-host>:<teams-server-port>"
```

## Testing and starting the server

* [ ] Test the Lumina server:

```
>sudo -u lumina ./lumina_server --config-file lumina.conf \
                      --certchain-file lumina_server.crt \
                      --privkey-file lumina_server.key
Hex-Rays Lumina Server v8.0 Hex-Rays (c) 2022-2024
2022-09-22 12:14:37 Listening on 0.0.0.0:443...
```

* [ ] <kbd>Ctrl</kbd> + <kbd>C</kbd> to stop the server.
* [ ] Start the service: `systemctl start lumina`
* [ ] Check that the service is active: `systemctl status lumina`

In case of startup problems, check the [troubleshooting](/extensions/lumina/admin/lumina-server.md#troubleshooting) section.

## Creating the administrator (Lumina setup)

* [ ] Create the administrator:

```
>cd /opt/lumina
>./lc -hlumina.acme.com -u<user> -p<password> info
	Hex-Rays Lumina Server v8.0
	Lumina time: 2022-09-01 14:28:02, up since 2022-09-01 14:27:58
	MAC address: <snipped macaddr>
	Client name: alice *ADMIN*
	Client host: 127.0.0.1
```


---

# Agent Instructions: 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:

```
GET https://docs.hex-rays.com/extensions/lumina/admin/lumina-server/lumina-server-checklist.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
