diff --git a/examples/nanocoap_server/Makefile b/examples/nanocoap_server/Makefile
index 07cef0e4c97576295e182715f255e44ccb11779e..ec2b6e1b0e099d8a926bf280e2318fd7baa6f285 100644
--- a/examples/nanocoap_server/Makefile
+++ b/examples/nanocoap_server/Makefile
@@ -22,9 +22,7 @@ USEMODULE += gnrc_sock_udp
 # Additional networking modules that can be dropped if not needed
 USEMODULE += gnrc_icmpv6_echo
 
-USEPKG += nanocoap
-# optionally enable nanocoap's debug output
-#CFLAGS += -DNANOCOAP_DEBUG
+USEMODULE += nanocoap_sock
 
 # include this for nicely formatting the returned internal value
 USEMODULE += fmt
diff --git a/examples/nanocoap_server/coap_handler.c b/examples/nanocoap_server/coap_handler.c
index 4eadff6ea974c5aff8736262b2668cb06a4c2b1d..5c1716a3bce8b981706b21540d9ba665d4cb097b 100644
--- a/examples/nanocoap_server/coap_handler.c
+++ b/examples/nanocoap_server/coap_handler.c
@@ -11,7 +11,7 @@
 #include <string.h>
 
 #include "fmt.h"
-#include "nanocoap.h"
+#include "net/nanocoap.h"
 
 /* internal value that can be read/written via CoAP */
 static uint8_t internal_value = 0;
diff --git a/examples/nanocoap_server/main.c b/examples/nanocoap_server/main.c
index c600d20fd6403619c582f91d6618fd341289c67d..91ce26ef9a51676181133550991da7f875e2aef6 100644
--- a/examples/nanocoap_server/main.c
+++ b/examples/nanocoap_server/main.c
@@ -19,8 +19,8 @@
 
 #include <stdio.h>
 
-#include "nanocoap.h"
-#include "nanocoap_sock.h"
+#include "net/nanocoap.h"
+#include "net/nanocoap_sock.h"
 
 #include "xtimer.h"