Skip to content

Instantly share code, notes, and snippets.

@JonTheNiceGuy
Created June 15, 2017 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonTheNiceGuy/aaecbfa50605ddd3399b74b933ba7760 to your computer and use it in GitHub Desktop.
Save JonTheNiceGuy/aaecbfa50605ddd3399b74b933ba7760 to your computer and use it in GitHub Desktop.
How I make Sandstorm with Sandcats work on my home network
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# Note this script relies on https://github.com/juanjux/sandstorm-sandcats-cert-installer having been cloned in /opt/
0 */12 * * * root perl -e 'sleep int(rand(3600))' && python /opt/sandstorm-sandcats-cert-installer/get_sandcats_certs.py --certs_origin_dir='/opt/sandstorm/var/sandcats/https/jontheniceguy.sandcats.io' --certs_dest_dir='/etc/nginx/ssl' --key_filename='sandstorm.key' --cert_filename='sandstorm.pem'
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 192.168.1.100:443 ssl;
server_name *.jontheniceguy.sandcats.io jontheniceguy.sandcats.io;
ssl_certificate /etc/nginx/ssl/sandstorm.pem;
ssl_certificate_key /etc/nginx/ssl/sandstorm.key;
ssl_session_timeout 5m;
include /etc/nginx/ssl_params.conf;
client_max_body_size 10G; # change this value it according to $UPLOAD_MAX_SIZE
location / {
proxy_pass https://127.0.0.1;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Real-IP $remote_addr;
}
}
SERVER_USER=sandstorm
PORT=6080
MONGO_PORT=6081
BIND_IP=127.0.0.1
BASE_URL=https://jontheniceguy.sandcats.io
WILDCARD_HOST=*.jontheniceguy.sandcats.io
UPDATE_CHANNEL=dev
ALLOW_DEV_ACCOUNTS=false
SMTP_LISTEN_PORT=30025
SANDCATS_BASE_DOMAIN=sandcats.io
HTTPS_PORT=443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment