Do you use a comma or semicolon before however?

Both are possible when however is used as a conjunctive adverb to mean “but.”

We put a semicolon before however when it is showing contrast between two independent clauses (e.g., “We have not reached our goal; however, we are only at the beginning of our journey”).

We put a comma before however when it is used at the beginning or at the end of a sentence or clause (e.g. “We are, however, only at the beginning,” “We are only at the beginning, however”).