-
-
Notifications
You must be signed in to change notification settings - Fork 56
Configuration Settings (.env)
This article will explain the configuration options of your .env file.
Since version 3.2 and higher, the application configuration is located in the config.yml file.
In the future, please only use the config.yml file for application configuration values and the .env file for server and hosting configuration values.
For backwards compatibility reasons, application configuration values will continue to be read from the .env file if any have been configured there and these values are missing or commented out in the config.yml file. Values from the config.yml file always take precedence over values from the .env file.
This backwards compatibility is available from version 3.2 to version 4.0 and will be deactivated thereafter.
- MYSQL_USER
- MYSQL_ROOT_PASSWORD
- MYSQL_DATABASE
- MYSQL_LOCAL_PORT
- ADMINER_DESIGN
- ADMINER_LOCAL_PORT
- APP_LOCAL_PORT
- NGINX_WWW_ROOT
- NGINX_LOCAL_PORT
- DB_HOST
- DB_PORT
- DB_NAME
- DB_USER
- DB_PASS
- PORT
- STORAGE_SERVER
- STORAGE_PATH
- IMPORT_DIR
- MEDIA_DIR
- MEDIA_DIR_ALT
Usually you shouldn't touch these options (don't ask me for help if you change them).
They are useful if you are running other applications/servers and you need to change default ports for compatibility.
A user name for your local MySQL Server.
root
by default.
Root password for your local MySQL Server.
123456
by default.
Name of the Snap Camera Server database.
snapcamera
by default.
Local port of your local MySQL Server.
3306
by default.
Allows you to change the default design of your database manager (Adminer).
Try dracula
for a dark design.
You can find different designs at:
https://github.com/vrana/adminer/tree/master/designs
Local port of your Adminer database manager.
8080
by default.
Local port of your Node.js application server.
5645
by default.
nginx web root directory inside your docker container.
/var/www/snapcamera
by default.
Local port of your nginx web server.
80
by default.
You should not touch these options if you are using the default configuration instructions with docker compose.
They are commented out because Docker automatically manages these options for you in the docker-compose.yml file.
These values are intended for custom hosting solutions and represent the equivalent of Docker configuration.
IP or Hostname of the database (MySQL) server.
localhost
by default.
Port of the database (MySQL) server.
3306
by default.
Name of the database (MySQL) server.
snapcamera
by default.
Username of the database (MySQL) server.
root
by default.
Password of the database (MySQL) server.
123456
by default.
Port of the Node.js application server.
This is the actual Snap Camera Server.
5645
by default.
Full URL of the storage emulation server that will serve all the lens and image files.
This is done by the nginx web server.
http://studio-app.snapchat.com:80
by default.
Local server base path to store all lens and image files.
The storage server will serve all files from this location.
/var/lib/snapcamera
by default.
Directory for importing cached lenses and custom uploads.
The content of this directory will be available through the storage server URL.
(e.g. http://studio-app.snapchat.com:80/import/)
import
by default.
Directory with default media files.
The content of this directory will be available through the storage server URL.
(e.g. http://studio-app.snapchat.com:80/snap-camera-media/)
snap-camera-media
by default.
Directory with alternative default media files.
The content of this directory will be available through the storage server URL.
(e.g. http://studio-app.snapchat.com:80/snap-camera-media-alt/)
snap-camera-media-alt
by default.
###########################
# Docker Configuration
###########################
MYSQL_USER=root
MYSQL_ROOT_PASSWORD=123456
MYSQL_DATABASE=snapcamera
MYSQL_LOCAL_PORT=3306
MYSQL_DOCKER_PORT=3306
#https://github.com/vrana/adminer/tree/master/designs
ADMINER_DESIGN=
ADMINER_LOCAL_PORT=8080
ADMINER_DOCKER_PORT=8080
APP_LOCAL_PORT=5645
APP_DOCKER_PORT=5645
NGINX_WWW_ROOT=/var/www/snapcamera
NGINX_LOCAL_PORT=80
NGINX_DOCKER_PORT=80
##############################################################
# Changes below this line are not required and not recommended
# Docker Compose will auto set everything correctly
# These values are meant for standalone usage without Docker
# Running inside a virtual machine for example
##############################################################
# values will be set by Docker if you run docker compose
#DB_HOST=localhost
#DB_PORT=3306
#DB_NAME=snapcamera
#DB_USER=root
#DB_PASS=123456
#PORT=5645
#STORAGE_SERVER=http://studio-app.snapchat.com:80
#STORAGE_PATH=/var/lib/snapcamera
#IMPORT_DIR=import
#MEDIA_DIR=snap-camera-media
#MEDIA_DIR_ALT=snap-camera-media-alt
###########################
# Application Configuration
###########################
# relay source for missing lenses, leave blank to disable
RELAY_SERVER=https://snapchatreverse.jaku.tv
# relay connection timeout in milliseconds
RELAY_TIMEOUT=6000
# https://github.com/ptrumpis/snap-camera-signature-patch
# web source unlocks all lenses even those created after January 25, 2023
# it requires a patched binary with disabled signature checks
ENABLE_WEB_SOURCE=TRUE
# https://github.com/ptrumpis/snap-lens-cache-import
# enable import of cached application lenses through special api
# if you run a public server, you should set this to FALSE
# otherwise anyone can upload files to your server
ENABLE_CACHE_IMPORT=TRUE
# mirrors and downloads all your search results
# comes with increased disk space usage
# but helps to back up lenses in case they disappear
MIRROR_SEARCH_RESULTS=FALSE
# ignore alternative media download
# turning it on has no downside and saves alot of disk space
# IGNORE_ALT_MEDIA takes precedence over IGNORE_IMG_SEQUENCE
IGNORE_ALT_MEDIA=TRUE
IGNORE_IMG_SEQUENCE=TRUE
###########################
# Docker Configuration
###########################
MYSQL_USER=root
MYSQL_ROOT_PASSWORD=123456
MYSQL_DATABASE=snapcamera
MYSQL_LOCAL_PORT=3306
MYSQL_DOCKER_PORT=3306
#https://github.com/vrana/adminer/tree/master/designs
ADMINER_DESIGN=
ADMINER_LOCAL_PORT=8080
ADMINER_DOCKER_PORT=8080
APP_LOCAL_PORT=5645
APP_DOCKER_PORT=5645
NGINX_WWW_ROOT=/var/www/snapcamera
NGINX_LOCAL_PORT=80
NGINX_DOCKER_PORT=80
##############################################################
# Changes below this line are not required and not recommended
# Docker Compose will auto set everything correctly
# These values are meant for standalone usage without Docker
# Running inside a virtual machine for example
##############################################################
# values will be set by Docker if you run docker compose
#DB_HOST=localhost
#DB_PORT=3306
#DB_NAME=snapcamera
#DB_USER=root
#DB_PASS=123456
#PORT=5645
#STORAGE_SERVER=http://studio-app.snapchat.com:80
#STORAGE_PATH=/var/lib/snapcamera
#IMPORT_DIR=import
#MEDIA_DIR=snap-camera-media
#MEDIA_DIR_ALT=snap-camera-media-alt