diff --git a/ethereal/config.go b/ethereal/config.go
index 6a42663e794281d46a5792b3b2985fb6c0f1d003..2315d14359882b687467f7063eb4ebd30aaa49cc 100644
--- a/ethereal/config.go
+++ b/ethereal/config.go
@@ -20,6 +20,8 @@ var ImportKey string
 var ExportKey bool
 var AssetPath string
 
+var Datadir string
+
 func Init() {
 	flag.StringVar(&Identifier, "id", "", "Custom client identifier")
 	flag.StringVar(&OutboundPort, "port", "30303", "listening port")
@@ -35,5 +37,7 @@ func Init() {
 	flag.BoolVar(&ExportKey, "export", false, "export private key")
 	flag.StringVar(&ImportKey, "import", "", "imports the given private key (hex)")
 
+	flag.StringVar(&Datadir, "datadir", ".ethereal", "specifies the datadir to use. Takes precedence over config file.")
+
 	flag.Parse()
 }
diff --git a/ethereal/ethereum.go b/ethereal/ethereum.go
index b6e1c681b91311cc030200afc64fb384696bce98..7ace16760720264c7367056357e510b08cf9943e 100644
--- a/ethereal/ethereum.go
+++ b/ethereal/ethereum.go
@@ -43,14 +43,14 @@ func main() {
 	ethchain.InitFees()
 
 	g, err := globalconf.NewWithOptions(&globalconf.Options{
-		Filename: path.Join(ethutil.ApplicationFolder(".ethereal"), "conf.ini"),
+		Filename: path.Join(ethutil.ApplicationFolder(Datadir), "conf.ini"),
 	})
 	if err != nil {
 		fmt.Println(err)
 	} else {
 		g.ParseAll()
 	}
-	ethutil.ReadConfig(".ethereal", ethutil.LogFile|ethutil.LogStd, g, Identifier)
+	ethutil.ReadConfig(Datadir, ethutil.LogFile|ethutil.LogStd, g, Identifier)
 
 	// Instantiated a eth stack
 	ethereum, err := eth.New(eth.CapDefault, UseUPnP)
diff --git a/ethereum/config.go b/ethereum/config.go
index 39dc1172777da6672698fff93b8611c8accdf59d..a80b47a8ef9240bec749cba79b4f01aa4875da36 100644
--- a/ethereum/config.go
+++ b/ethereum/config.go
@@ -24,6 +24,8 @@ var NonInteractive bool
 var StartJsConsole bool
 var InputFile string
 
+var Datadir string
+
 func Init() {
 	flag.Usage = func() {
 		fmt.Fprintf(os.Stderr, "%s [options] [filename]:\n", os.Args[0])
@@ -46,6 +48,8 @@ func Init() {
 	flag.StringVar(&LogFile, "logfile", "", "log file (defaults to standard output)")
 	flag.StringVar(&ImportKey, "import", "", "imports the given private key (hex)")
 
+	flag.StringVar(&Datadir, "datadir", ".ethereum", "specifies the datadir to use. Takes precedence over config file.")
+
 	flag.Parse()
 
 	InputFile = flag.Arg(0)
diff --git a/ethereum/ethereum.go b/ethereum/ethereum.go
index 56ea46122b3508a98f24e89f95b96e1a22eaf7a6..179a3f46211495ac274ac9c26363e1caee531ded 100644
--- a/ethereum/ethereum.go
+++ b/ethereum/ethereum.go
@@ -62,14 +62,14 @@ func main() {
 	}
 
 	g, err := globalconf.NewWithOptions(&globalconf.Options{
-		Filename: path.Join(ethutil.ApplicationFolder(".ethereum"), "conf.ini"),
+		Filename: path.Join(ethutil.ApplicationFolder(Datadir), "conf.ini"),
 	})
 	if err != nil {
 		fmt.Println(err)
 	} else {
 		g.ParseAll()
 	}
-	ethutil.ReadConfig(".ethereum", lt, g, Identifier)
+	ethutil.ReadConfig(Datadir, lt, g, Identifier)
 
 	logger := ethutil.Config.Log