diff --git a/cmd/logcli/config.go b/cmd/logcli/config.go
new file mode 100644
index 0000000000000000000000000000000000000000..f465470f3cd79140f1e9fc9a0a04453e74fae8ac
--- /dev/null
+++ b/cmd/logcli/config.go
@@ -0,0 +1,20 @@
+package main
+
+// Config is the root config for Logcli.
+type Config struct {
+	Addr     string `yaml:"addr,omitempty"`
+	Username string `yaml:"username,omitempty"`
+	Password string `yaml:"password,omitempty"`
+}
+
+func getConfig(configFile string) (*Config, error) {
+	var config Config
+
+	// if not specify config file, keep same with default value
+	if configFile == "" {
+		config = Config{Addr: "https://logs-us-west1.grafana.net"}
+		return &config, nil
+	}
+
+	return &config, nil
+}
diff --git a/cmd/logcli/logcli-config.yaml b/cmd/logcli/logcli-config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..5e499bb6839c9e9693ef86b9f7fb968440511de0
--- /dev/null
+++ b/cmd/logcli/logcli-config.yaml
@@ -0,0 +1,5 @@
+addr: https://logs-us-west1.grafana.net
+
+username:
+
+password:
diff --git a/cmd/logcli/main.go b/cmd/logcli/main.go
index 28d65eeaf68c73e68e90335f3439c69f7a75517b..3ca1db269b296b2effb1fec62773f34b9444df6b 100644
--- a/cmd/logcli/main.go
+++ b/cmd/logcli/main.go
@@ -8,10 +8,11 @@ import (
 )
 
 var (
-	app      = kingpin.New("logcli", "A command-line for loki.")
-	addr     = app.Flag("addr", "Server address.").Default("").Envar("GRAFANA_ADDR").String()
-	username = app.Flag("username", "Username for HTTP basic auth.").Default("").Envar("GRAFANA_USERNAME").String()
-	password = app.Flag("password", "Password for HTTP basic auth.").Default("").Envar("GRAFANA_PASSWORD").String()
+	app = kingpin.New("logcli", "A command-line for loki.")
+
+	config = app.Flag("config", "Logcli config.").Default("").String()
+
+	addr, username, password *string
 
 	queryCmd  = app.Command("query", "Run a LogQL query.")
 	queryStr  = queryCmd.Arg("query", "eg '{foo=\"bar\",baz=\"blip\"}'").Required().String()
@@ -26,6 +27,17 @@ var (
 )
 
 func main() {
+	// get val from config file
+	cfg, err := getConfig(*config)
+	if err != nil {
+		fmt.Println(err)
+		os.Exit(1)
+	}
+
+	addr = app.Flag("addr", "Server address.").Default(cfg.Addr).Envar("GRAFANA_ADDR").String()
+	username = app.Flag("username", "Username for HTTP basic auth.").Default(cfg.Username).Envar("GRAFANA_USERNAME").String()
+	password = app.Flag("password", "Password for HTTP basic auth.").Default(cfg.Password).Envar("GRAFANA_PASSWORD").String()
+
 	switch kingpin.MustParse(app.Parse(os.Args[1:])) {
 	case queryCmd.FullCommand():
 		if *addr == "" {
diff --git a/docs/logcli.md b/docs/logcli.md
index 8d05a4db9f33a6969db70938fb036b8e3fe15a07..ebc984024bcef0c3f7c4728c2470f4a553c193db 100644
--- a/docs/logcli.md
+++ b/docs/logcli.md
@@ -20,6 +20,12 @@ Common labels: {job="cortex-ops/consul", namespace="cortex-ops"}
 2018-06-25T12:52:09Z {instance="consul-8576459955-pl75w"} 2018/06/25 12:52:09 [INFO] raft: Snapshot to 475409 complete
 2018-06-25T12:52:09Z {instance="consul-8576459955-pl75w"} 2018/06/25 12:52:09 [INFO] raft: Compacting logs from 456973 to 465169
 ```
+You may use `--config=path/to/file` to load configuration options from a file. For an example file see `cmd/logcli/logcli-config.yaml`
+
+Configuration values are considered in the following order (lowest to highest):
+- config file
+- environment value
+- command line
 
 The URLs of the requests are printed to help with integration work.
 
@@ -34,6 +40,7 @@ Flags:
   --addr=""      Server address, need to specify.
   --username=""  Username for HTTP basic auth.
   --password=""  Password for HTTP basic auth.
+  --config=""    Configuration file for logcli.
 
 Commands:
   help [<command>...]