diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,8 @@
 Changelog for Hoogle
 
+2.0.17.1, released 2018-01-27
+    #238, only identify the database by the first three version components
+    #236, in --local mode replace file:// links in Haddock pages
 5.0.17, released 2018-01-17
     Add lower bounds for time and bytestring
     #234, allow http-conduit-0.15
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -71,6 +71,10 @@
 
 Which will download and build Hoogle databases.
 
+## Command Line UI
+
+There is a terminal/curses based UI available through [`cabal install bhoogle`](https://hackage.haskell.org/package/bhoogle).
+
 ## Chrome Integration
 
 **As a keyword search:** With a keyword search you can type `h map` directly into the location bar to perform a Hoogle search. Go to the [Hoogle website](http://haskell.org/hoogle/) in Chrome, right-click in the Hoogle search field and select "Add as a search engine...". Give it a keyword such as "h".
diff --git a/hoogle.cabal b/hoogle.cabal
--- a/hoogle.cabal
+++ b/hoogle.cabal
@@ -1,7 +1,7 @@
 cabal-version:      >= 1.18
 build-type:         Simple
 name:               hoogle
-version:            5.0.17
+version:            5.0.17.1
 license:            BSD3
 license-file:       LICENSE
 category:           Development
@@ -15,7 +15,7 @@
     or by approximate type signature.
 homepage:           http://hoogle.haskell.org/
 bug-reports:        https://github.com/ndmitchell/hoogle/issues
-tested-with:        GHC==8.2.1, GHC==8.0.2, GHC==7.10.3
+tested-with:        GHC==8.2.2, GHC==8.0.2, GHC==7.10.3
 extra-doc-files:
     README.md
     CHANGES.txt
diff --git a/src/Action/CmdLine.hs b/src/Action/CmdLine.hs
--- a/src/Action/CmdLine.hs
+++ b/src/Action/CmdLine.hs
@@ -14,6 +14,7 @@
 import System.FilePath
 import Data.List.Extra
 import Data.Version
+import General.Util
 import Paths_hoogle(version)
 
 data Language = Haskell | Frege deriving (Data,Typeable,Show,Eq,Enum,Bounded)
@@ -74,7 +75,7 @@
 defaultDatabaseLang :: Language -> IO FilePath
 defaultDatabaseLang lang = do
     dir <- getAppUserDataDirectory "hoogle"
-    return $ dir </> "default-" ++ lower (show lang) ++ "-" ++ showVersion version ++ ".hoo"
+    return $ dir </> "default-" ++ lower (show lang) ++ "-" ++ showVersion (trimVersion 3 version) ++ ".hoo"
 
 getCmdLine :: [String] -> IO CmdLine
 getCmdLine args = do
diff --git a/src/Action/Server.hs b/src/Action/Server.hs
--- a/src/Action/Server.hs
+++ b/src/Action/Server.hs
@@ -125,8 +125,15 @@
         let file = intercalate "/" $ filter (not . (== "..")) (x:xs)
         return $ OutputFile $ file ++ (if hasTrailingPathSeparator file then "index.html" else "")
     "file":xs | local -> do
-        let x = ['/' | not isWindows] ++ intercalate "/" xs
-        return $ OutputFile $ x ++ (if hasTrailingPathSeparator x then "index.html" else "")
+        let x = ['/' | not isWindows] ++ intercalate "/" (dropWhile null xs)
+        let file = x ++ (if hasTrailingPathSeparator x then "index.html" else "")
+        if takeExtension file /= ".html" then
+            return $ OutputFile file
+         else do
+            src <- readFile file
+            -- Haddock incorrectly generates file:// on Windows, when it should be file:///
+            -- so replace on file:// and drop all leading empty paths above
+            return $ OutputHTML $ lstrPack $ replace "file://" "/file/" src
     xs ->
         -- avoid "" and ".." in the URLs, since they could be trying to browse on the server
         return $ OutputFile $ joinPath $ htmlDir : filter (not . all (== '.')) xs
diff --git a/src/General/Store.hs b/src/General/Store.hs
--- a/src/General/Store.hs
+++ b/src/General/Store.hs
@@ -35,8 +35,9 @@
 import Paths_hoogle
 import Prelude
 
--- ensure the string is always 25 chars long, so version numbers don't change its size
-verString = BS.pack $ take 25 $ "HOOGLE-" ++ showVersion version ++ repeat ' '
+-- Ensure the string is always 25 chars long, so version numbers don't change its size
+-- Only use the first two components of the version number to identify the database
+verString = BS.pack $ take 25 $ "HOOGLE-" ++ showVersion (trimVersion 3 version) ++ repeat ' '
 
 ---------------------------------------------------------------------
 -- SERIALISATION HELPERS
diff --git a/src/General/Util.hs b/src/General/Util.hs
--- a/src/General/Util.hs
+++ b/src/General/Util.hs
@@ -17,6 +17,7 @@
     inRanges,
     readMaybe,
     parseTrailingVersion,
+    trimVersion,
     exitFail,
     prettyTable,
     hackagePackageURL, hackageModuleURL, hackageDeclURL, ghcModuleURL,
@@ -43,6 +44,7 @@
 import Control.DeepSeq
 import Control.Exception.Extra
 import Test.QuickCheck
+import Data.Version
 import Data.Int
 import System.IO
 import System.Exit
@@ -311,6 +313,9 @@
         isLegal '.' = True
         isLegal c = isAscii c && isAlphaNum c
 
+
+trimVersion :: Int -> Version -> Version
+trimVersion i v = v{versionBranch = take 3 $ versionBranch v}
 
 parseTrailingVersion :: String -> (String, [Int])
 parseTrailingVersion = (reverse *** reverse) . f . reverse
