2020-03-11 06:54:10 +00:00
# Full Setup Instructions
2018-08-01 00:04:34 +00:00
2021-11-02 11:24:23 +00:00
## Running the App
Create a `docker-compose.yml` file:
```yml
2023-03-21 23:41:19 +00:00
version: '3.8'
2021-11-02 11:24:23 +00:00
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
# These ports are in format < host-port > :< container-port >
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
# Add any other Stream port you want to expose
# - '21:21' # FTP
# Uncomment the next line if you uncomment anything in the section
# environment:
2023-03-20 06:56:52 +00:00
# Uncomment this if you want to change the location of
2021-11-02 11:24:23 +00:00
# the SQLite DB file within the container
# DB_SQLITE_FILE: "/data/database.sqlite"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
```
Then:
```bash
docker-compose up -d
```
## Using MySQL / MariaDB Database
2018-08-01 00:04:34 +00:00
2020-08-06 04:27:29 +00:00
If you opt for the MySQL configuration you will have to provide the database server yourself. You can also use MariaDB. Here are the minimum supported versions:
2019-05-10 05:26:12 +00:00
- MySQL v5.7.8+
- MariaDB v10.2.7+
It's easy to use another docker container for your database also and link it as part of the docker stack, so that's what the following examples
are going to use.
2018-08-01 00:04:34 +00:00
2021-11-02 11:24:23 +00:00
Here is an example of what your `docker-compose.yml` will look like when using a MariaDB container:
2018-08-01 00:04:34 +00:00
```yml
2023-03-21 23:41:19 +00:00
version: '3.8'
2018-08-01 00:04:34 +00:00
services:
app:
2020-11-07 18:37:35 +00:00
image: 'jc21/nginx-proxy-manager:latest'
2021-06-07 22:48:26 +00:00
restart: unless-stopped
2018-08-24 06:59:03 +00:00
ports:
2021-11-02 11:24:23 +00:00
# These ports are in format < host-port > :< container-port >
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
2021-03-18 04:20:47 +00:00
# Add any other Stream port you want to expose
# - '21:21' # FTP
2020-04-07 00:43:19 +00:00
environment:
2023-03-20 06:56:52 +00:00
# Mysql/Maria connection parameters:
2020-11-07 12:24:01 +00:00
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD: "npm"
DB_MYSQL_NAME: "npm"
2020-04-07 00:43:19 +00:00
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
2018-08-01 00:04:34 +00:00
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
depends_on:
- db
2021-11-02 11:24:23 +00:00
2018-08-01 00:04:34 +00:00
db:
2021-02-08 01:56:21 +00:00
image: 'jc21/mariadb-aria:latest'
2021-06-07 22:48:26 +00:00
restart: unless-stopped
2018-08-01 00:04:34 +00:00
environment:
2020-04-07 00:43:19 +00:00
MYSQL_ROOT_PASSWORD: 'npm'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'npm'
2023-11-27 22:27:11 +00:00
MARIADB_AUTO_UPGRADE: '1'
2018-08-01 00:04:34 +00:00
volumes:
2023-03-30 05:37:59 +00:00
- ./mysql:/var/lib/mysql
2018-08-01 00:04:34 +00:00
```
2021-11-02 11:24:23 +00:00
::: warning
2020-11-07 12:24:01 +00:00
2021-11-02 11:24:23 +00:00
Please note, that `DB_MYSQL_*` environment variables will take precedent over `DB_SQLITE_*` variables. So if you keep the MySQL variables, you will not be able to use SQLite.
2018-08-01 00:04:34 +00:00
2021-11-02 11:24:23 +00:00
:::
2018-08-01 00:04:34 +00:00
2021-03-21 16:02:53 +00:00
## Running on Raspberry PI / ARM devices
2018-08-01 00:04:34 +00:00
2020-02-19 04:55:06 +00:00
The docker images support the following architectures:
- amd64
- arm64
- armv7
2018-08-01 00:04:34 +00:00
2020-02-19 04:55:06 +00:00
The docker images are a manifest of all the architecture docker builds supported, so this means
2019-05-10 05:26:12 +00:00
you don't have to worry about doing anything special and you can follow the common instructions above.
2019-02-18 11:14:26 +00:00
2020-05-20 11:14:00 +00:00
Check out the [dockerhub tags ](https://hub.docker.com/r/jc21/nginx-proxy-manager/tags )
2019-05-10 05:26:12 +00:00
for a list of supported architectures and if you want one that doesn't exist,
2022-02-17 03:15:15 +00:00
[create a feature request ](https://github.com/NginxProxyManager/nginx-proxy-manager/issues/new?assignees=&labels=enhancement&template=feature_request.md&title= ).
2019-05-10 05:26:12 +00:00
Also, if you don't know how to already, follow [this guide to install docker and docker-compose ](https://manre-universe.net/how-to-run-docker-and-docker-compose-on-raspbian/ )
on Raspbian.
2018-08-20 22:33:51 +00:00
2021-11-02 11:24:23 +00:00
Please note that the `jc21/mariadb-aria:latest` image might have some problems on some ARM devices, if you want a separate database container, use the `yobasystems/alpine-mariadb:latest` image.
2018-08-20 22:33:51 +00:00
2021-03-21 16:02:53 +00:00
## Initial Run
2018-08-20 22:33:51 +00:00
After the app is running for the first time, the following will happen:
2023-03-21 08:26:28 +00:00
1. GPG keys will be generated and saved in the data folder
2. The database will initialize with table structures
2020-03-11 06:54:10 +00:00
3. A default admin user will be created
2018-08-20 22:33:51 +00:00
This process can take a couple of minutes depending on your machine.
2021-03-21 16:02:53 +00:00
## Default Administrator User
2018-08-20 22:33:51 +00:00
```
Email: admin@example.com
Password: changeme
```
Immediately after logging in with this default user you will be asked to modify your details and change your password.
2020-11-07 12:24:01 +00:00