No. It is not necessarily centered on the caster (though it can be).
A cube is not a burst power (to borrow a 4e term). The origination point of the cube is anywhere on a face, not necessarily the center. The term face when referring to a cube means the entire square comprising a side.
So you could feasibly center it on yourself, or place yourself in any other point of the cube's effect (and no, you don't have to attack yourself unless you want to).
I wanted to map this out real quick, just so we're all clear. Let's assume we have a 15' cube spell, and let's also use a grid just so we have a bit of clarity, and a limited set of points to operate from. There are 18 possible origin points for a 15' cube, representing two different 3x3 areas (the top and bottom face of a cube). For both of these the graph is the same, but the results are different. If you select the top face, the spell targets the 8 squares in your plane, and the 18 immediately below you. If you choose the origin as the bottom of the cube, then it targets the 8 in your plane and the 18 above you. Now which square is the origin:
XXX
XXX
XXX
Basically, you can be standing in any of the squares that are X and have the burst be those 9 squares. Let's look at a few more examples (Caster is C):
XCX
XXX
XXX
Here you step to a side and have it radiate to your left, right and two rows forward of you.
XXX
XCX
XXX
Here you center it on yourself.
CXX
XXX
XXX
Here you take a corner of the spell and cast it to your left and forward, and radiates out. It seems you should be able to be outside teh area too:
CXXX
XXX
XXX
Since you're adjacent (and heck that could be the middle of a face or the bottom or the top of it. (See the caveat below, this particular form falls much more into the "point" point of origin argument and may or may not be valid in all games.
CAVEAT: There are at least two camps developing around the term "point of origin" used in the text, and depending on which system you came from you may immediately interpret that differently. I have used in this response the version of the term influenced by my 4e experience, which infers that the point of origin is an entire square (this makes a ton of sense when you play with gridded combat as the default, which I do in my 5e games). However, there is a camp that comes from a different point of view that interprets "point of origin" as a singlular point (with an undefined diameter, likely just the part of the cast casting the spell...not sure, I'll let them speak for themselves). This POV would have the caster included in the spell if you cast in the ways that I describe above where the caster is fully within the Xs.
It's important to note that right now both of these interpretations are equally valid and subject to DM interpretation. I'll be using the "point is a whole space unless you don't want it to be" version, feel free to use whichever is most useful in your game (just be consistent about it).