diff --git a/R/mix.R b/R/mix.R
index 74b70be980d44176d1dae7fee962426cad86b479..e9ea8fe21a5c9493165031b3233daed1106b5827 100644
--- a/R/mix.R
+++ b/R/mix.R
@@ -592,3 +592,8 @@ read_setid <- function(fn,known,unk) {
     assertthat::assert_that(nrow(natmp)==0,msg=paste("The following IDs from set table have not been found in the compound table:","------",print_table(natmp),"------",sep = "\n"))
     tmp
 }
+
+
+write_conf <- function(conf,fn) {
+    yaml::write_yaml(x=conf,file=fn)
+}
diff --git a/R/shiny-ui-base.R b/R/shiny-ui-base.R
index 62e8c48ddb767cc8e8068f6110cce86acf4b4459..70787e1b707f3d1b0bd227a53a99c6ecefa29659 100644
--- a/R/shiny-ui-base.R
+++ b/R/shiny-ui-base.R
@@ -16,7 +16,11 @@ react_v <- shiny::reactiveValues
 react_f <- shiny::reactive
 react_e <- shiny::eventReactive
 obsrv <- shiny::observe
+obsrv_e <- shiny::observeEvent
 vols <- shinyFiles::getVolumes
+vol_f <- vols()
+validate <- function(expr,msg) shiny::validate(need(expr,msg))
+
 
 path2vol <- function(path) {
     ## This function returns shinyFiles compatible volumes.
@@ -81,3 +85,9 @@ txt_file_input <- function(inputId,input,fileB,label,volumes) {
     }
     
 }
+
+rv_conf2conf <- function(rv) {
+    x <- shiny::reactiveValuesToList(rv$conf)
+    x$compounds<-shiny::reactiveValuesToList(rv$conf$compounds)
+    x
+}
diff --git a/R/shiny-ui-config.R b/R/shiny-ui-config.R
index 87932030cbc7dbadde54606bb60230c3a8a5811d..3820798982055d943a449fd41de19ed18d18d8a6 100644
--- a/R/shiny-ui-config.R
+++ b/R/shiny-ui-config.R
@@ -67,8 +67,8 @@ mk_ui_config <- function() {
                           shinyFiles::shinySaveButton("saveConfB",
                                                       "Save configuration.",
                                                       title="Save",
-                                                      filename = "conf-state.rds",
-                                                      "rds"),
+                                                      filename = "conf-state.yaml",
+                                                      "yaml"),
                           shinyFiles::shinyFilesButton("restoreConfB",
                                                        label="Restore configuration.",
                                                        multiple=F,
@@ -135,7 +135,7 @@ react_conf_f <- function(input,output,session,rv,rf) {
         vls <- vols()() #Ugly! :)
         vol <- path2vol(path)
         sel<-match(vol,vls)
-        validate(need(sel,"Yikes! Unable to detect current project's volume."))
+        validate(sel,msg="Yikes! Unable to detect current project's volume.")
         res<-names(vls)[[sel]]
         res
     })
@@ -174,6 +174,14 @@ server_conf <- function(input,output,session,rv,rf) {
                                 defaultPath=dpath(),roots=vs)
     shinyFiles::shinyDirChoose(input, 'switchProjB',roots=vs)
 
+    obsrv_e(input$saveConfB, {
+        conf<-rv_conf2conf(rv)
+        vol <- vol_f()
+        fn <- shinyFiles::parseSavePath(roots=vol_f,input$saveConfB)[["datapath"]]
+        validate(fn,msg="Invalid file to save config to.")
+        write_conf(conf,fn)
+    })
+
   
     
 }