[SOLVED] How to configure Blynk server?

I already did it, but i do not know where to get char auth = “YourAuthToken”?

You get this token when you create a widget for your new project for example. Let’s say you gotten past logging on to your local server. You would then create a new project. In the process of naming the new project below the section where you select the Hardware mode there is a section called “Auth Token” there’s a string of number and characters there. You would copy and and paste this on your code.

I had lots of problem getting my server working.
I started it and logs-files were created, I tried to create a user from my iPhone app, didn’t work!
My solution was Windows Firewall, I shut it off and then I was able to create a user.

Hello fellow Blynker,

I have this problem in configuring the local server, I downloaded the latest local server jar file, server-0.13.1.jar. I run the file and its working fine. I could log on in my local server but the problem is when I send my Auth Token from my mobile phone the server is not accepting my email address. below is the server log when I send my Auth Token.

18:10:32.331 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 v1sm3747273wjf.49 - gsmtp

18:11:08.657 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 ks5sm3809488wjb.13 - gsmtp

18:12:50.186 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 ys9sm3759396wjc.35 - gsmtp

I also created a mail.properties file with my email and password and save in the same folder with server jar file.

I would highly appreciate if somebody could help me configure my local server, Thanks.

Did you read this? Look at NOTE

Hello Dmitriy,

I follow the procedure in the Quick local server setup. Server is running but when I send the Auth Token from my mobile phone the server is not accepting my log on emial. I also created a mail.properties file as per information in the blynk website.

Hope you could help me, Thanks.

Please read all “Email setup” section carefully. It has explanation of what you have to do in order to enable emaling.

NOTE : you'll need to setup Gmail to allow less secured applications. Go here and then click "Allow less secure apps".

Hello Dmitriy,

I already allow less secured app in gmail setup and I follow this instruction in

Enabling mail on Local server

In order to enable mail notifications on Local server you need to provide own mail credentials. To do that you need to create file “mail.properties” within same folder where server.jar is. Mail properties :

mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.host=smtp.gmail.com
mail.smtp.port=587
mail.smtp.username=YOUR_EMAIL_HERE
mail.smtp.password=YOUR_EMAIL_PASS_HERE

It may be a stupid question, but have you tried logging in to gmail on the web wit the same credentials? The error code and FAQ is quit clear. It looks like a wrong username/password combination. Is there any two factor authentication you use on google or maybe a different password?

Yes, Im using gmail email with same username and password.

this are the logs from the server:

From blynk logs:

02:35:52.843 INFO - Using data dir ‘\path’
02:35:53.202 INFO - Initializing mail transport. Username : example@gmail.com. SMTP host : smtp.gmail.com:587
02:35:53.530 INFO - Plain tcp/ip hardware server port 8442.
02:35:53.530 INFO - Enabling SSL for hardware.
02:35:53.530 WARN - ATTENTION. Certificate C:\Users\Jun\Blynk\Server and key C:\Users\Jun\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
02:35:53.984 INFO - SSL hardware port 8441.
02:35:53.984 INFO - Enabling SSL for application.
02:35:53.984 WARN - ATTENTION. Server certificate paths cert : ‘C:\Users\Jun\Blynk\Server’, key : ‘C:\Users\Jun\Blynk\Server’ - not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
02:35:54.249 INFO - Application server port 8443.
02:35:54.265 INFO - Enabling HTTP API.
02:35:54.265 INFO - HTTP API port 8080.
02:35:54.265 INFO - Enabling HTTPS API.
02:35:54.265 WARN - ATTENTION. Certificate C:\Users\Jun\Blynk\Server and key C:\Users\Jun\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
02:35:54.406 INFO - HTTPS API port 9443.
02:35:54.421 INFO - Enabling HTTPS for admin UI.
02:35:54.421 WARN - ATTENTION. Certificate C:\Users\Jun\Blynk\Server and key C:\Users\Jun\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
02:35:54.693 INFO - HTTPS admin UI port 7443.
02:35:54.693 INFO - Enabling Web Sockets.
02:35:54.693 INFO - Web Sockets port 8082.
02:35:54.693 INFO - Enabling Web SSL Sockets.
02:35:54.693 WARN - ATTENTION. Certificate C:\Users\Jun\Blynk\Server and key C:\Users\Jun\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
02:35:54.959 INFO - Web SSL Sockets port 8081.
08:41:18.363 INFO - junxxxxx@gmail.com app joined.

from the user logs:

09:18:59.883 INFO - Generated token for user junxxx@gmail.com and dashId 1 is 4d0548bc3ffd40ed80e64c3182e623c0.
15:58:23.924 INFO - Creating new dashboard.
15:58:23.955 INFO - Generated token for user junxxx@gmail.com and dashId 2 is e6c33e8bfd9e457883f7e3477645551a.
15:58:34.887 INFO - Deleting dashboard 2.
15:58:49.701 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 m6sm12838288wje.21 - gsmtp

15:58:56.014 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 n10sm12845960wjf.28 - gsmtp

16:04:05.132 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 74sm8620465wmn.17 - gsmtp

16:04:05.163 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 s66sm8669115wmb.6 - gsmtp

Can you post your server.properties and your mail.properties?

Server Properties:

server.ssl.cert=/test-certs/mutual/server.crt
server.ssl.key=/test-certs/mutual/server.pem
server.ssl.key.pass=blynkawesome
client.ssl.cert=
client.ssl.key=

#hardware ssl port
hardware.ssl.port=9441

#hardware plain tcp/ip port
hardware.default.port=9442

#application ssl port
app.ssl.port=9443

#https port
https.port=10443

#web sockets ssl port
ssl.websocket.port=18081
#web sockets plain tco port
tcp.websocket.port=18082

#http port
http.port=8080

#by default System.getProperty(“java.io.tmpdir”)/blynk used
data.folder=

#folder for logs.
#logs.folder=./logs

#log debug level. trace|debug|info|error. Defines how precise logging will be.
log.level=trace

#defines maximum allowed number of user dashboards. Needed to limit possible number of tokens.
user.dashboard.max.limit=10

#user is limited with 100 messages per second.
user.message.quota.limit=100
#in case of consistent quota limit exceed during long term, sending warning response back to exceeding channel
#for performance reason sending only 1 message within interval. In millis
user.message.quota.limit.exceeded.warning.period=2000

#this setting defines how often we can send mail/tweet/push or any other notification. Specified in seconds
notifications.frequency.user.quota.limit=60
#maximum size of user profile in kb’s
user.profile.max.size=16

#period in millis for saving all user DB to disk.
profile.save.worker.period=100

server.workers.threads=2

#specifies maximum period of time when application socket could be idle. After which
#socket will be closed due to non activity. In seconds. Default value 600 if not provided.
app.socket.idle.timeout=600
#specifies maximum period of time when hardware socket could be idle. After which
#socket will be closed due to non activity. In seconds. Default value 15 if not provided.
hard.socket.idle.timeout=15

#if enabled - native epoll transport will be used. should be turned on only if you 100% sure.
#may not work on some environment. Used to increase server performance.
enable.native.epoll.transport=false

#mostly required for local servers setup in case user want to log raw data in CSV format
#from his hardware
enable.raw.data.store=true

#https port
administration.https.port=7443

#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=127.0.0.1

Mail Properties:

mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.host=smtp.gmail.com
mail.smtp.port=587
mail.smtp.username=My Gmail Email
mail.smtp.password=My Gmail Password

I do notice something weird. When I restart my local server I see this in blynk.log:

15:41:59.925 INFO - Initializing mail transport. Username : whizzcat@gmail.com. SMTP host : smtp.gmail.com:587

In your log I see:

02:35:53.202 INFO - Initializing mail transport. Username : example@gmail.com. SMTP host : smtp.gmail.com:587

Almost as if Blynk doesn’t detect the correct username?

1 Like

Or @Junesp made a typo in “mail.properties” file :slightly_smiling:

in the mail.properties file I used my gmail email and password it is the same email and password when i log to the local blynk server.

Anyway I will re-install the local server and post the procedure how I install and you guys can make a comment which part of my procedure is wrong.

thanks for helping me.

This is my procedure in installing the local blynk server, please post comment where I made mistake in installing the Blynk Server:

  1. Downloaded the following File:

blynk-server-0.13.1 (source code)
server-0.13.1.jar
client-0.13.1.jar

  1. Save the above files in c/users/Junesp111/Blynk/Server

3.Check the Java verion in my PC (java vesion “1.8.0_73”)

  1. Run the server server-0.13.1.jar via command prompt as per blynk website instruction.

    Output from command prompt:
    Blynk Server Successfully started.
    All server output is stored in folder ‘C:\Users\Junesp111\Blynk\Server.\logs’ file

  2. Created a mail.properties file save in the same folder where server-0.13.1.jar is located.

mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtp.host=smtp.gmail.com
mail.smtp.port=587
mail.smtp.username=My gmail email (same logon ID for the local blynk server)
mail.smtp.password=My gmail password (same Password for the local blynk server)

Sever response when I send the Auth Token from my mobile device (andriod):

   Email was not send to your login acc.

Server Logs:

from blynk file:

21:32:36.690 INFO - Using data dir ‘\path’
21:32:36.799 INFO - Initializing mail transport. Username : example@gmail.com. SMTP host : smtp.gmail.com:587
21:32:37.409 INFO - Plain tcp/ip hardware server port 8442.
21:32:37.409 INFO - Enabling SSL for hardware.
21:32:37.409 WARN - ATTENTION. Certificate C:\Users\Junesp111\Blynk\Server and key C:\Users\Junesp111\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
21:32:37.924 INFO - SSL hardware port 8441.
21:32:37.924 INFO - Enabling SSL for application.
21:32:37.924 WARN - ATTENTION. Server certificate paths cert : ‘C:\Users\Junesp111\Blynk\Server’, key : ‘C:\Users\Junesp111\Blynk\Server’ - not valid. Using embedded server certs and one way ssl. This is not secure. Please replace it with your own certs.
21:32:38.174 INFO - Application server port 8443.
21:32:38.190 INFO - Enabling HTTP API.
21:32:38.190 INFO - HTTP API port 8080.
21:32:38.190 INFO - Enabling HTTPS API.
21:32:38.190 WARN - ATTENTION. Certificate C:\Users\Junesp111\Blynk\Server and key C:\Users\Junesp111\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
21:32:38.456 INFO - HTTPS API port 9443.
21:32:38.456 INFO - Enabling HTTPS for admin UI.
21:32:38.456 WARN - ATTENTION. Certificate C:\Users\Junesp111\Blynk\Server and key C:\Users\Junesp111\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
21:32:38.643 INFO - HTTPS admin UI port 7443.
21:32:38.643 INFO - Enabling Web Sockets.
21:32:38.643 INFO - Web Sockets port 8082.
21:32:38.643 INFO - Enabling Web SSL Sockets.
21:32:38.643 WARN - ATTENTION. Certificate C:\Users\Junesp111\Blynk\Server and key C:\Users\Junesp111\Blynk\Server paths not valid. Using embedded certs. This is not secure. Please replace it with your own certs.
21:32:38.799 INFO - Web SSL Sockets port 8081.
21:45:49.418 INFO - Trying register user : junxxxx@gmail.com
21:45:49.480 INFO - Registered junxxxx@gmail.com.
21:45:49.543 INFO - junxxxx@gmail.com app joined.

from the user file:

21:45:54.635 INFO - Creating new dashboard.
21:45:54.682 INFO - Generated token for user junxxxx@gmail.com and dashId 1 is 91c4a022c5414999ba80e0c006402d90.
21:46:28.310 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 e25sm1872837wmi.21 - gsmtp

21:47:01.107 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 i1sm14032150wjs.45 - gsmtp

21:48:04.972 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 cb2sm14211540wjc.16 - gsmtp

21:48:05.237 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 e127sm9896877wma.20 - gsmtp

21:48:21.893 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 v1sm14118021wjf.49 - gsmtp

21:48:39.279 ERROR - Error performing blocking IO. 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/answer/14257 gb9sm14149131wjb.26 - gsmtp

How do you exactly run jar file and from where?

from the command prompt.

C/Users/Junesp111/Blynk/Server/java -jar server-0.13.1.jar -dataFolder /path

Did you restart the Blynk server after you created the mail.properties file? If you don’t it will not work.

1 Like

Do you run that from folder where jar is?

yes.

the jar file is inside the server folder