Preheat your smoker according to the manufacturer's instructions to 225-250°F (107-121°C). (I used a pellet grill for this recipe.)
Line a baking or cookie sheet pan with foil paper and top it with a cookie rack. Set aside.
Pour about 1 tablespoon of oil into a small-medium saucepan and heat it on medium.
Add onions, garlic, thyme, and bell pepper. Saute for a minute or two to let the flavors bloom; be careful not to burn it. Let it cool.
Mix the ground beef, breadcrumbs, egg, black pepper, Worcestershire sauce, beef bouillon powder, milk, and cayenne pepper (if using) in a medium bowl. Add the cooled onion mixture. Mix it gently until everything is thoroughly combined. DO NOT OVERMIX.
Form the meatloaf like a log on a smooth surface, then transfer the meatloaf to a rack. Glaze with about ⅔ of the ketchup mixture.
Place the meatloaf in the smoker (or pellet grill) and smoke for 2-3 hours or until an instant-read thermometer inserted into the center registers 160°F (71°C).
While the meatloaf is smoking, prepare the glaze by mixing the ketchup, Dijon mustard, and brown sugar in a small bowl.
Once the meatloaf has reached the desired internal temperature, brush the glaze over the top and let it smoke for 10-15 more minutes so the glaze caramelizes.
Remove the smoked meatloaf from the pellet smoker and let it rest for a few minutes before slicing and serving.