--- a/cmd/geoipupdate/main.go
+++ b/cmd/geoipupdate/main.go
@@ -4,6 +4,8 @@
 import (
 	"context"
 	"log"
+	"os"
+	"path/filepath"
 
 	"github.com/maxmind/geoipupdate/v6/pkg/geoipupdate"
 	"github.com/maxmind/geoipupdate/v6/pkg/geoipupdate/vars"
@@ -22,12 +24,17 @@
 func main() {
 	log.SetFlags(0)
 
+	ex, err := os.Executable()
+	if err != nil {
+		panic(err)
+	}
+
 	if defaultConfigFile != "" {
-		vars.DefaultConfigFile = defaultConfigFile
+		vars.DefaultConfigFile = filepath.Join(filepath.Dir(ex), "..", "etc", "GeoIP.conf")
 	}
 
 	if defaultDatabaseDirectory != "" {
-		vars.DefaultDatabaseDirectory = defaultDatabaseDirectory
+		vars.DefaultDatabaseDirectory = filepath.Join(filepath.Dir(ex), "..", "var", "lib", "GeoIP")
 	}
 
 	args := getArgs()
