# BLYNK LOCAL SERVER **Repository Path**: lin_xiaoyan/blynk-local-server ## Basic Information - **Project Name**: BLYNK LOCAL SERVER - **Description**: BLYNK LOCAL SERVER - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 4 - **Created**: 2023-04-30 - **Last Updated**: 2023-04-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # BLYNK LOCAL SERVER #### 介绍 BLYNK LOCAL SERVER #### 源文件 https://github.com/blynkkk/blynk-server https://codechina.csdn.net/mirrors/blynkkk/blynk-server https://github.com/Peterkn2001/blynk-server #### Advanced local server setup For more flexibility you can extend server with more options by creating ```server.properties``` file in same folder as ```server.jar```. Example could be found [here](https://github.com/blynkkk/blynk-server/blob/master/server/core/src/main/resources/server.properties). You could also specify any path to ```server.properties``` file via command line argument ```-serverConfig```. You can do the same with ```mail.properties``` via ```-mailConfig``` and ```sms.properties``` via ```-smsConfig```. For example: java -jar server-0.41.16-java8.jar -dataFolder /home/pi/Blynk -serverConfig /home/pi/someFolder/server.properties Available server options: + Blynk app, https, web sockets, admin port https.port=9443 + Http, hardware and web sockets port http.port=8080 + For simplicity Blynk already provides server jar with built in SSL certificates, so you have working server out of the box via SSL/TLS sockets. But as certificate and it's private key are in public this is totally not secure. So in order to fix that you need to provide your own certificates. And change below properties with path to your cert. and private key and it's password. See how to generate self-signed certificates [here](#generate-ssl-certificates) #points to cert and key that placed in same folder as running jar. server.ssl.cert=./server_embedded.crt server.ssl.key=./server_embedded.pem server.ssl.key.pass=pupkin123 **Note**: if you use Let's Encrypt certificates you'll have to add ```#define BLYNK_SSL_USE_LETSENCRYPT``` before ```#include ``` in the Arduino Sketch for your hardware. + User profiles folder. Folder in which all users profiles will be stored. By default System.getProperty("java.io.tmpdir")/blynk used. Will be created if not exists data.folder=/tmp/blynk + Folder for all application logs. Will be created if it doesn't exist. "." is dir from which you are running script. logs.folder=./logs + Log debug level. Possible values: trace|debug|info|error. Defines how precise logging will be. From left to right -> maximum logging to minimum log.level=trace + Maximum allowed number of user dashboards. user.dashboard.max.limit=100 + 100 Req/sec rate limit per user. You also may want to extend this limit on [hardware side](https://github.com/blynkkk/blynk-library/blob/f4e132652906d63d683abeed89f5d6ebe369e37a/Blynk/BlynkConfig.h#L42). user.message.quota.limit=100 + this setting defines how often you can send mail/tweet/push or any other notification. Specified in seconds notifications.frequency.user.quota.limit=60 + Maximum allowed user profile size. In Kb's. user.profile.max.size=128 + Number of strings to store in terminal widget (terminal history data) terminal.strings.pool.size=25 + Maximum allowed number of notification queue. Queue responsible for processing email, pushes, twits sending. Because of performance issue - those queue is processed in separate thread, this is required due to blocking nature of all above operations. Usually limit shouldn't be reached notifications.queue.limit=5000 + Number of threads for performing blocking operations - push, twits, emails, db queries. Recommended to hold this value low unless you have to perform a lot of blocking operations. blocking.processor.thread.pool.limit=6 + Period for flushing all user DB to disk. In millis profile.save.worker.period=60000 + Specifies maximum period of time when hardware socket could be idle. After which socket will be closed due to non activity. In seconds. Leave it empty for infinity timeout hard.socket.idle.timeout=15 + Mostly required for local servers setup in case user want to log raw data in CSV format. See [raw data] (#raw-data-storage) section for more info. enable.raw.data.store=true + Url for opening admin page. Must start from "/". For "/admin" url path will look like that "https://127.0.0.1:9443/admin". admin.rootPath=/admin + Comma separated list of administrator IPs. Allow access to admin UI only for those IPs. You may set it for 0.0.0.0/0 to allow access for all. You may use CIDR notation. For instance, 192.168.0.53/24. allowed.administrator.ips=0.0.0.0/0 + Default admin name and password. Will be created on initial server start admin.email=admin@blynk.cc admin.pass=admin + Host for reset password redirect and certificate generation. By default current server IP is taken from "eth" network interface. Could be replaced with more friendly hostname. It is recommended to override this property with your server IP to avoid possible problems of host resolving. server.host=blynk-cloud.com + Email used for certificate registration, could be omitted in case you already specified it in mail.properties. contact.email=pupkin@gmail.com