Coder Social home page Coder Social logo

nas-docker's Introduction

NAS docker

Repository containing the docker-compose setup for my NAS / homeserver

Features:

Environment

You need to have the following environment variables setup or replaced in your docker-compose.yml and your storage mounted in /mnt/storage/cloud and /mnt/storage/shares for nextcloud and plex respectively.

example /etc/environment

DOCKER_USER_ID=1002
DOCKER_USER_GROUP_ID=1002

TIMEZONE=Europe/Berlin

STORAGE_PATH=/mnt/storage

[email protected]

PLEX_HOSTNAME=nas
PLEX_ADVERTISE_IP=http://<IP of your nas here>:32400/
PLEX_VIRTUAL_HOST=plex.example.com

NEXTCLOUD_VIRTUAL_HOST=cloud.example.com
NEXTCLOUD_MYSQL_ROOT_PASSWORD=yourRootPasswordHere
NEXTCLOUD_MYSQL_PASSWORD=yourPasswordHere

KIBANA_VIRTUAL_HOST=kibana.example.com

HOME_ASSISTANT_VIRTUAL_HOST=hass.example.com

HACKMD_VIRTUAL_HOST=hackmd.example.com
HACKMD_POSTGRES_PASSWORD=yourPasswordHere

GITEA_VIRTUAL_HOST=git.example.com
GITEA_MYSQL_ROOT_PASSWORD=yourRootPasswordHere
GITEA_MYSQL_PASSWORD=yourPasswordHere

INVOICENINJA_VIRTUAL_HOST=invoice.example.com
INVOICENINJA_APP_KEY=yourAppKeyHere
INVOICENINJA_MYSQL_ROOT_PASSWORD=yourRootPasswordHere
INVOICENINJA_MYSQL_PASSWORD=yourPasswordHere
INVOICENINJA_MAIL_HOST=smtp.example.com
[email protected]
INVOICENINJA_MAIL_PASSWORD=yourPasswordHere
INVOICENINJA_MAIL_FROM_NAME=Your Name
[email protected]

PYLOAD_VIRTUAL_HOST=downloads.example.com

(you need to have correct DNS records set for the domains you want to use and probably setup port forwarding of ports 80 and 443 to your nas in order to get remote access and let's encrypt working)

Setup

  1. Make sure to have docker and docker-compose installed on your system.
  2. You also need to have some sort of dynamic DNS setup to your (public) IP. Point the Domain(s) you are using to this IP.
  3. Add a static rule to your router for the system you are running this on, so the (private) IP doesn't change. Then forward ports 80 and `443 to this IP
  4. Clone the repo to /opt
  5. Run docker-compose -f /opt/docker-compose.yml up -d
  6. Services should be available at the hosts specified in your environment.

Shares

As I wanted to have certain directories directly accessible in my network, I created a user shareuser, which owns the shared dir and used the following config for /etc/samba/smb.conf:

[global]
  workgroup = WORKGROUP
  server string = nas
  security = user
  guest ok = yes
  map to guest = Bad Password

  log file = /var/log/samba/%m.log
  max log size = 50
  printcap name = /dev/null
  load printers = no

# Samba Shares
[nas]
  comment = Storage on NAS
  path = /mnt/storage/shares
  browseable = yes
  public = yes
  writeable = yes
  create mask = 0644
  directory mask = 0755
  force user = shareuser

You will need to restart samba for config changes to take effect

nas-docker's People

Contributors

schliflo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nas-docker's Issues

Raspbian

What OS are you running this server on? I attempted to run this on a raspberry pi but it fails on "/bin/sh -c bin/elasticsearch-plugin install ingest-attachment"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.