Deployment & installation

DocsNG installs several ways — from a cloud marketplace, directly on a Windows or Linux host, or as a Docker container. This guide covers each method, database configuration, first run and post-installation.

Installation methods & support matrix

  • Cloud marketplaces — AWS, Azure and Google Cloud.
  • Direct install — on a Windows (IIS) or Linux (NGINX) host.
  • Docker — run as a container with Docker Compose.

Databases: PostgreSQL (preferred/default), MySQL/MariaDB, Microsoft SQL Server, Oracle. Application servers: IIS, Apache, NGINX. Operating systems: Windows, macOS, Alpine, CentOS, Debian, Fedora, openSUSE, SLES, Ubuntu.

Minimum hardware: 2 GHz single core, 1 GB RAM, 500 MB disk. Runtime: .NET 7.0+ SDK and ASP.NET Core 7.0 runtime (Windows Hosting Bundle on IIS).

Install from a cloud marketplace

AWS Marketplace

DocsNG is available as an Amazon Machine Image (AMI). In the AWS Marketplace, search for DocsNG, Continue to Subscribe, accept terms, then Launch with EC2. Once the instance is running, access it at:

URL:      https://[Public IPv4 DNS]:5002
Username: admin
Password: DocsNG*[Instance ID]   e.g. DocsNG*i-0a12345bac4566

Azure & Google Cloud marketplaces

DocsNG is a VM product on both. Find DocsNG in the marketplace, configure machine type/network/storage, deploy, then access it over HTTPS on the default port 443:

URL:      https://[Public IPv4 DNS]
Username: admin
Password: DocsNG*[VM ID]

Install with Docker Compose

Create a docker-compose.yml:

version: '3.7'
services:
  web:
    container_name: 'docsng'
    image: 'nextarp/docsng'
    environment:
      DB_CONNECTIONSTRING: "host=postgres;port=5432;database=docsng;username=docsng;password=ComplexDocsNGPass"
      DB_PROVIDER: "Postgres"
    ports:
      - "5001:5001"
      - "5002:5002"
    depends_on: [ "postgres" ]
    networks: [ docsng-network ]
  postgres:
    container_name: 'postgres'
    image: postgres
    environment:
      POSTGRES_DB: "docsng"
      POSTGRES_USER: "docsng"
      POSTGRES_PASSWORD: "ComplexDocsNGPass"
    restart: always
    ports: [ "10000:5432" ]
    networks: [ docsng-network ]
    volumes: [ "postgres_data:/var/lib/postgresql/data" ]
networks:
  docsng-network:
    driver: bridge
volumes:
  postgres_data:

Set your own POSTGRES_DB, POSTGRES_USER and POSTGRES_PASSWORD, and reflect them in DB_CONNECTIONSTRING. Then, from the directory containing the file:

docker-compose up -d
Do not commit secrets. Inject the database password and admin password from your environment or secret manager for production.

Install on a host

Linux (NGINX)

  1. Install the .NET SDK and runtimes:
    sudo apt-get update
    sudo apt-get install -y dotnet-sdk-7.0 dotnet-runtime-7.0 aspnetcore-runtime-7.0
    sudo apt-get install -y nginx
  2. Extract the DocsNG package to a directory, then add an NGINX server block that reverse-proxies to the app on port 5001:
    server {
      listen 80;
      server_name docsng.example.com;
      location / {
        proxy_pass         http://localhost:5001;
        proxy_http_version 1.1;
        proxy_set_header   Upgrade $http_upgrade;
        proxy_set_header   Connection keep-alive;
        proxy_set_header   Host $host;
        proxy_cache_bypass $http_upgrade;
      }
    }
  3. Create a systemd service /etc/systemd/system/DocsNG.service:
    [Unit]
    Description=DocsNG .NET Web App
    [Service]
    WorkingDirectory=/path/to/DocsNG
    ExecStart=/usr/bin/dotnet /path/to/DocsNG/DocsNG.dll
    Restart=always
    RestartSec=10
    KillSignal=SIGINT
    User=www-data
    Environment=ASPNETCORE_ENVIRONMENT=Production
    [Install]
    WantedBy=multi-user.target
  4. Enable and start it, then restart NGINX:
    sudo systemctl enable DocsNG.service
    sudo systemctl start DocsNG.service
    sudo systemctl restart nginx

Windows (IIS)

  1. Install the .NET 7 SDK and the .NET 7 Hosting Bundle, and enable IIS (Web Server role).
  2. Extract the DocsNG package to a folder.
  3. In IIS Manager, Add Website pointing its physical path at that folder, choose bindings and an application pool, and browse the site.

Database configuration (appsettings.json)

For host installs, edit appsettings.json in the DocsNG root. Set DbProvider to Sqlite, Postgres, Mssql, Mysql or Oracle, and the matching connection string:

"DbProvider": "Postgres",
"ConnectionStrings": {
  "Sqlite":   "Data Source=nextdoc.db",
  "Postgres": "Host=localhost;Database=mydatabase;Username=myuser;Password=mypassword",
  "Mssql":    "Server=(localdb)\\mssqllocaldb;Database=mydatabase;Trusted_Connection=True;MultipleActiveResultSets=true",
  "Mysql":    "Server=localhost;Database=mydatabase;User=myuser;Password=mypassword;TreatTinyAsBoolean=true",
  "Oracle":   "User Id=myuser;Password=mypassword;Data Source=mydatasource"
}

For Docker, set DB_PROVIDER and DB_CONNECTIONSTRING as environment variables instead. If the database runs on another machine, use its hostname/IP in the connection string. Restart the app/NGINX after changes.

First run

Access the web interface:

  • https://[Server IP or Domain]:5002 — DocsNG installs a self-signed TLS certificate by default; you can upload a password-free PFX under Settings → Server Settings.
  • http://[Server IP or Domain]:5001 — only if TLS is terminated upstream (firewall/reverse proxy).
Never run DocsNG in production without TLS. Default admin credentials on a host install are admin / !DocsNGAdmin12 — change the password immediately.

Post-installation

Environment variables (Docker)

VariablePurpose
DB_PROVIDERPostgres, Mssql, Sqlite, Mysql or Oracle
DB_CONNECTIONSTRINGConnection string for the selected provider
DOCSNG_ADMIN_PASSWORDFirst-run admin password (set this)
DOCSNG_ADMIN_USERNAME / DOCSNG_ADMIN_EMAILFirst-run admin username / email

Ports: 5001 (HTTP) and 5002 (HTTPS).


Need help? Contact us or try the live demo.