How old is it?
If it is a young pup, then sleep on a mattress next to the crate for the first few nights: that way it won't feel scared and alone: you just stick your hand into the crate and stroke it, but also, if the pup has been carefully reared, it won't want to pee in the crate: you take it outside every few hours for the first week or so by which time a pup will usually have the hang of the housetraining thing, but bear in mind that young pups can't hold their pee for very long at all: they need to go every couple of hours or so.
That's what I had to do with my saluki x. She